/* ============================================================
   PowerHouse BD — "Solar & Green" public theme
   Solar amber primary + deep green accent, warm off-white bg.
   CSS vars are re-declared inline per-request in _Layout.cshtml
   from SiteSettings (PrimaryColor/AccentColor/DarkColor); the
   values below are the fallback/default palette.
   ============================================================ */

:root {
  --ph-primary: #F2A71B;
  --ph-primary-ink: #8a5e0e;      /* darker amber for text-on-white (AA contrast) */
  --ph-primary-soft: #FCEACB;
  --ph-accent: #1B5E20;
  --ph-accent-soft: #E3EFE3;
  --ph-dark: #14261C;
  --ph-bg: #FBF8F1;               /* warm off-white, never pure #fff */
  --ph-surface: #FFFFFF;
  --ph-ink: #1E2420;
  --ph-muted: #5B6660;
  --ph-border: #E7E0CF;
  --ph-radius: 14px;
  --ph-shadow: 0 6px 24px rgba(20, 38, 28, 0.08);

  /* aliases so the confirm-dialog / password-toggle drop-ins (which reference --brass)
     resolve on-brand without editing their JS */
  --brass: var(--ph-primary);
  --brass-soft: var(--ph-primary-soft);

  --font-display: "Rajdhani", "Hind Siliguri", sans-serif;
  --font-body: "Inter", "Noto Sans Bengali", sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 15px; scroll-behavior: smooth; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  font-family: var(--font-body);
  background: var(--ph-bg);
  color: var(--ph-ink);
  margin: 0;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ph-dark);
}

a { color: var(--ph-primary-ink); text-decoration: none; }
a:hover { color: var(--ph-accent); }

.btn-solar {
  background: var(--ph-primary);
  border-color: var(--ph-primary);
  color: #241a00;
  font-weight: 600;
}
.btn-solar:hover { background: #e0980f; border-color: #e0980f; color: #241a00; }

.btn-green {
  background: var(--ph-accent);
  border-color: var(--ph-accent);
  color: #fff;
  font-weight: 600;
}
.btn-green:hover { background: #144a18; border-color: #144a18; color: #fff; }

.btn-outline-solar {
  border: 2px solid var(--ph-primary);
  color: var(--ph-primary-ink);
  font-weight: 600;
  background: transparent;
}
.btn-outline-solar:hover { background: var(--ph-primary); color: #241a00; }

.text-solar { color: var(--ph-primary-ink) !important; }
.text-green { color: var(--ph-accent) !important; }
.bg-solar-soft { background: var(--ph-primary-soft) !important; }
.bg-green-soft { background: var(--ph-accent-soft) !important; }

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: .85rem; color: var(--ph-accent);
  background: var(--ph-accent-soft); padding: 6px 14px; border-radius: 999px;
}

.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 10px 0 8px; }
.section-head p { color: var(--ph-muted); max-width: 620px; }

/* ---- Notice bar ---- */
.notice-bar { font-size: .9rem; padding: 8px 0; text-align: center; }
.notice-bar a { color: inherit; text-decoration: underline; }

/* ---- Header ---- */
.site-header {
  background: var(--ph-surface);
  border-bottom: 1px solid var(--ph-border);
  position: sticky; top: 0; z-index: 1030;
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(20,38,28,.08); }
.site-header .navbar-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--ph-dark); }
.site-header .navbar-brand img { max-height: 42px; }
.site-header .nav-link { font-weight: 600; color: var(--ph-ink); }
.site-header .nav-link.active, .site-header .nav-link:hover { color: var(--ph-accent); }
.site-header .dropdown-toggle::after { vertical-align: 2px; }
@media (min-width: 1200px) { .navbar-nav { flex-wrap: nowrap; } }

.float-actions {
  position: fixed; right: 18px; bottom: 18px; z-index: 1040;
  display: flex; flex-direction: column; gap: 10px;
}
.float-actions a {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 1.4rem; box-shadow: var(--ph-shadow);
}
.float-actions .fa-whatsapp { background: #25D366; }
.float-actions .fa-call { background: var(--ph-accent); }

.fa-top {
  position: fixed; right: 18px; bottom: 88px; z-index: 1039;
  width: 44px; height: 44px; border-radius: 50%; display: none; place-items: center;
  background: var(--ph-dark); color: #fff; box-shadow: var(--ph-shadow);
}
.fa-top.show { display: grid; }

/* ============================================================
   HERO — animated sun rays + battery charge-fill (signature motif)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ph-dark) 0%, #1c3524 100%);
  color: #fff;
  padding: 64px 0 84px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; }
@media (max-width: 991px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } }

.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.15; }
.hero .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
  color: var(--ph-primary); background: rgba(242,167,27,.14);
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; margin-bottom: 14px;
}
.hero p.lead { color: #D9E3DA; font-size: 1.08rem; }
.hero .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 991px) { .hero .hero-ctas { justify-content: center; } }

/* sun + battery visual stage */
.hero-visual {
  position: relative; height: 320px; display: flex; align-items: center; justify-content: center;
}
.sun-wrap { position: absolute; width: 220px; height: 220px; }
.sun-core {
  position: absolute; inset: 60px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE29A, var(--ph-primary) 70%);
  box-shadow: 0 0 60px 10px rgba(242,167,27,.55);
  animation: ph-sun-pulse 3.6s ease-in-out infinite;
}
.sun-rays { position: absolute; inset: 0; animation: ph-sun-rotate 22s linear infinite; }
.sun-rays i {
  position: absolute; left: 50%; top: 50%; width: 4px; height: 26px;
  background: var(--ph-primary); border-radius: 4px; opacity: .85;
  transform-origin: 50% 110px;
}
.sun-rays i:nth-child(1)  { transform: translate(-50%,-110px) rotate(0deg); }
.sun-rays i:nth-child(2)  { transform: translate(-50%,-110px) rotate(30deg); }
.sun-rays i:nth-child(3)  { transform: translate(-50%,-110px) rotate(60deg); }
.sun-rays i:nth-child(4)  { transform: translate(-50%,-110px) rotate(90deg); }
.sun-rays i:nth-child(5)  { transform: translate(-50%,-110px) rotate(120deg); }
.sun-rays i:nth-child(6)  { transform: translate(-50%,-110px) rotate(150deg); }
.sun-rays i:nth-child(7)  { transform: translate(-50%,-110px) rotate(180deg); }
.sun-rays i:nth-child(8)  { transform: translate(-50%,-110px) rotate(210deg); }
.sun-rays i:nth-child(9)  { transform: translate(-50%,-110px) rotate(240deg); }
.sun-rays i:nth-child(10) { transform: translate(-50%,-110px) rotate(270deg); }
.sun-rays i:nth-child(11) { transform: translate(-50%,-110px) rotate(300deg); }
.sun-rays i:nth-child(12) { transform: translate(-50%,-110px) rotate(330deg); }

.battery-body {
  position: relative; z-index: 2; width: 108px; height: 190px;
  border: 5px solid #fff; border-radius: 14px; background: rgba(20,38,28,.55);
  backdrop-filter: blur(2px); overflow: hidden;
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}
.battery-body::before { /* terminal nub */
  content: ""; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 12px; background: #fff; border-radius: 4px 4px 0 0;
}
.battery-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20%;
  background: linear-gradient(180deg, #6FE08A, var(--ph-accent));
  animation: ph-battery-charge 4s ease-in-out infinite;
}
.battery-bolt {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 3;
  color: #fff; font-size: 2.2rem; text-shadow: 0 0 12px rgba(242,167,27,.9);
  animation: ph-bolt-glow 2s ease-in-out infinite;
}

@keyframes ph-sun-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ph-sun-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .92; } }
@keyframes ph-battery-charge { 0% { height: 18%; } 50% { height: 92%; } 100% { height: 18%; } }
@keyframes ph-bolt-glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .sun-rays, .sun-core, .battery-fill, .battery-bolt { animation: none !important; }
  .battery-fill { height: 70%; }
}

/* ============================================================
   Cards, tiles, badges
   ============================================================ */
.category-tile {
  display: block; background: var(--ph-surface); border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius); padding: 26px 18px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease; height: 100%;
}
.category-tile:hover { transform: translateY(-4px); box-shadow: var(--ph-shadow); }
.category-tile .icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 12px; background: var(--ph-primary-soft); color: var(--ph-primary-ink); font-size: 1.6rem;
}
.category-tile h3 { font-size: 1.05rem; margin: 0; color: var(--ph-dark); }

.product-card, .package-card {
  background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius);
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover, .package-card:hover { transform: translateY(-3px); box-shadow: var(--ph-shadow); }
.product-card .thumb, .package-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--ph-bg); }
.product-card .thumb img, .package-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .thumb img, .package-card:hover .thumb img { transform: scale(1.06); }
.product-card .body, .package-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .price { font-family: var(--font-display); font-weight: 700; color: var(--ph-accent); font-size: 1.15rem; }
.product-card .old-price { text-decoration: line-through; color: var(--ph-muted); font-size: .9rem; margin-right: 6px; }
.product-card .spec-chip, .package-card .spec-chip {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--ph-accent-soft); color: var(--ph-accent); margin: 0 4px 4px 0;
}

.trust-badge {
  display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--ph-radius);
  background: var(--ph-surface); border: 1px solid var(--ph-border);
}
.trust-badge i { font-size: 1.5rem; color: var(--ph-primary-ink); }

.brand-strip-item { filter: grayscale(15%); opacity: .9; transition: opacity .2s ease, filter .2s ease; }
.brand-strip-item:hover { filter: none; opacity: 1; }

.testi-card { background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius); padding: 22px; height: 100%; }
.testi-card .stars { color: var(--ph-primary); }

.stat-item { text-align: center; }
.stat-item .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--ph-primary); }
.stat-item .label { color: #cfe0d2; font-weight: 600; }

/* ============================================================
   Load Calculator wizard
   ============================================================ */
.calc-wizard { background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius); box-shadow: var(--ph-shadow); }
.calc-steps { display: flex; gap: 8px; padding: 18px 20px 0; }
.calc-steps .step {
  flex: 1; text-align: center; font-weight: 700; font-size: .82rem; color: var(--ph-muted);
  padding-bottom: 10px; border-bottom: 3px solid var(--ph-border);
}
.calc-steps .step.active { color: var(--ph-accent); border-color: var(--ph-primary); }
.calc-steps .step.done { color: var(--ph-accent); border-color: var(--ph-accent); }

.appliance-card {
  border: 1px solid var(--ph-border); border-radius: 12px; padding: 14px; text-align: center;
  cursor: pointer; user-select: none; transition: border-color .15s ease, background .15s ease;
}
.appliance-card.qty-active { border-color: var(--ph-primary); background: var(--ph-primary-soft); }
.appliance-card i { font-size: 1.6rem; color: var(--ph-accent); }
.appliance-card .qty-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.appliance-card .qty-row button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ph-border); background: #fff; }
.appliance-card .qty-row input { width: 42px; text-align: center; border: none; background: transparent; font-weight: 700; }

.backup-tile {
  border: 2px solid var(--ph-border); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer;
}
.backup-tile.active { border-color: var(--ph-primary); background: var(--ph-primary-soft); }

.calc-result-num { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--ph-accent); }
.calc-result-card { background: var(--ph-accent-soft); border-radius: var(--ph-radius); padding: 20px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ph-dark); color: #C9D6CB; position: relative;
}
.site-footer::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--ph-primary), var(--ph-accent) 60%); }
.site-footer h5 { color: #fff; font-family: var(--font-display); }
.site-footer a { color: #C9D6CB; }
.site-footer a:hover { color: var(--ph-primary); }
.site-footer .socials a { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); align-items: center; justify-content: center; margin-right: 6px; }
.site-footer .socials a:hover { background: var(--ph-primary); color: var(--ph-dark); }
.dev-credit {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--ph-primary); color: #241a00 !important;
  border-radius: 999px; padding: .3rem .85rem; font-size: .78rem; font-weight: 600;
  text-decoration: none !important; transition: filter .2s ease, transform .2s ease;
}
.dev-credit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.dev-credit i { color: #C0392B; animation: dev-heart 1.3s ease-in-out infinite; }
@keyframes dev-heart { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.25); } 40% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .dev-credit i { animation: none; } }

/* ============================================================
   Non-negotiable §12.1 responsive safety net
   ============================================================ */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }

@media (max-width: 991px) {
  .section { padding: 52px 0; }
}
@media (max-width: 767px) {
  .section, .page-hero { padding: 40px 0; }
  .hero { padding: 44px 0 60px; }
  .hero-visual { height: 240px; }
}
@media (max-width: 480px) {
  .calc-steps .step { font-size: .72rem; }
}
@media print {
  .site-header, .site-footer, .float-actions, .fa-top, .notice-bar { display: none !important; }
}

/* ---- Page hero (interior pages) ---- */
.page-hero {
  background: linear-gradient(180deg, var(--ph-dark), #1c3524);
  color: #fff; padding: 56px 0; text-align: center;
}
.page-hero h1 { color: #fff; }
.page-hero .breadcrumb { justify-content: center; }
.page-hero .breadcrumb a { color: #cfe0d2; }
.page-hero .breadcrumb .active { color: var(--ph-primary); }
