/* Modern Advanced Theme - full visual refresh
   Provides a contemporary responsive layout, refined typography,
   elevated hero, card system, and clean footer. Non-destructive.
*/
:root{
  --bg: #FFFFFF;
  --bg-alt: #FBFBFC;
  --panel: #FFFFFF;
  --ink: #0E0E10;
  --ink-soft: #55606A;
  --ink-muted: #898F97;
  --jaggery: #E6882E;
  --jaggery-deep: #B45F1A;
  --accent-2: #0FAF8E;
  --line: #ECEFF1;
  --radius: 12px;
  --maxw: 1280px;
  --gap: 24px;
  --measure: 66ch;
  --header-h: 72px; /* header height used to calculate full-screen hero */
}

/* Base */
body.theme-modern{ background: var(--bg); color: var(--ink); font-family: 'Inter', 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial; }
html { font-size: 16px; }
.container{ max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Utility */
.row{ display:flex; gap: var(--gap); align-items:center; }
.col{ flex:1; }

/* Header */
.site-header{ position: sticky; top:0; z-index:60; background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header .container{ display:flex; align-items:center; justify-content:space-between; height:72px; }
.brand img{ height: 56px; width:auto; filter: contrast(1.06) saturate(1.05); }
.main-nav{ display:flex; align-items:center; gap: 6px; }
.main-nav ul{ display:flex; gap:6px; list-style:none; margin:0; padding:0; }
.main-nav a{ display:inline-flex; align-items:center; padding:10px 14px; color:var(--ink-soft); font-weight:600; border-radius:8px; font-size:0.95rem; }
.main-nav a:hover{ color:var(--jaggery-deep); background: rgba(230,135,46,0.06); }
.main-nav a.is-active{ color:var(--jaggery-deep); box-shadow: inset 0 -3px 0 var(--jaggery); }
.nav-toggle{ display:none; }

@media (max-width: 900px){
  .nav-toggle{ display:inline-flex; z-index:1400; position:relative; width:52px; height:52px; align-items:center; justify-content:center; }
  /* Mobile menu should overlay from top and reserve space for header via padding-top */
  .main-nav{ position:fixed !important; right:0; top:0; background:#fff !important; width:280px; height:100%; transform:translateX(100%); transition:transform .25s ease; z-index:2147483647 !important; box-shadow: 0 12px 40px rgba(2,6,23,0.12); padding-top: var(--header-h); }
  .main-nav.is-open{ transform:translateX(0) !important; }
  .main-nav ul{ flex-direction:column; padding:20px; }
  .main-nav a{ color:var(--ink); padding:14px 12px; display:block; }
  /* Make the hero banner full-bleed and fill the mobile viewport */
  .hero-media{
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    height: calc(100vh - var(--header-h)) !important;
    min-height: 220px !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    z-index:0 !important;
  }
  .hero-slide{
    min-height: 220px !important;
    z-index:0 !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    position: absolute !important;
    top:0; left:0; right:0; bottom:0;
  }
  /* ensure any img elements fill and cover */
  .hero-slide img, .hero-media img{ width:100% !important; height:100% !important; object-fit:cover !important; display:block !important; }
  /* position dots slightly inset */
  .hero-dots{ right: 12px; bottom: 12px; }
}

/* When mobile nav is open, hide hero to avoid stacking issues */
.nav-open .hero-media{ display:none !important; }
.nav-open .hero-slide{ display:none !important; }


/* Hero */
.hero{ display:grid; grid-template-columns: 1fr; align-items:center; gap:24px; padding:80px 0; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
/* Carousel slide visibility improvements */
.hero-slide{ background-size: cover !important; background-position: center center !important; /* remove visual filters and transforms that can soften images */ filter: none !important; transform: none !important; will-change: auto !important; transition: opacity 0.85s ease !important; image-rendering: -webkit-optimize-contrast; }
/* ensure any img inside hero-media displays crisply */
.hero-media img{ image-rendering: auto; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-transform: translateZ(0); transform: translateZ(0); }
.hero{ position: relative; }
.hero > .hero-slide{ z-index:0; }
.hero-dots{ position: absolute; right: 28px; bottom: 26px; z-index:2; }
@media (min-width: 980px){ .hero{ grid-template-columns: 1fr 1fr; padding:96px 0; } }
.hero-media{ position: relative; min-height:420px; border-radius:16px; overflow:hidden; display:block; background: linear-gradient(180deg, #FFF, #FFF); box-shadow: 0 18px 48px rgba(15,15,20,0.06); }
/* Ensure hero-media establishes positioning context for absolutely-positioned slides */

/* Make the banner occupy full visible viewport (full-bleed) */
.hero-media{
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important; /* full-bleed even if inside centered layout */
  height: calc(100vh - var(--header-h)) !important;
  min-height: 420px !important;
  border-radius: 0 !important; /* full-bleed should not be rounded */
}


/* Ensure hero-slide is not absolutely positioned and contributes to document flow
   (original style.css sets .hero-slide absolute; override here to prevent overlap). */
.hero-slide {
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100% !important;
  min-height: 420px !important;
  display: block !important;
  opacity: 0; /* hidden by default */
  transform: none !important;
  background-size: cover !important;
  background-position: center center !important;
  transition: opacity 1s ease, transform 0.6s ease;
}
.hero-slide.is-active { opacity: 1 !important; z-index: 1; }

/* If hero-slide contains an img element, ensure it fills the container */
.hero-slide img { width:100%; height:100%; object-fit:cover; display:block; }

.hero-media img{ width:100%; height:100%; object-fit:cover; }
.hero-content{ padding:10px 6px; }
.hero .eyebrow{ color:var(--ink-muted); font-size:0.85rem; letter-spacing:0.12em; }
.hero-title{ font-size: clamp(2rem, 4.5vw, 3.4rem); line-height:1.02; margin:12px 0 18px; max-width: var(--measure); color:var(--ink); }
.hero-sub{ color:var(--ink-soft); font-size:1.05rem; max-width:54ch; }
.hero-actions{ display:flex; gap:14px; margin-top:18px; }
.btn{ padding:12px 22px; border-radius:10px; font-weight:700; letter-spacing:0.02em; }
.btn-primary{ background: linear-gradient(90deg, var(--jaggery), #FFB86B); color:#fff; box-shadow: 0 10px 30px rgba(230,135,46,0.12); }
.btn-outline{ border:1px solid var(--line); background:transparent; color:var(--ink); }

/* Ledger */
.ledger{ padding:14px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:transparent; }
.ledger-row{ display:flex; gap:12px; overflow:auto; padding: 8px 20px; }
.ledger-item{ padding:10px 16px; background: #fff; border-radius: 999px; border:1px solid var(--line); font-weight:700; color:var(--ink); }

/* Sections */
section{ padding:72px 0; }

/* reduce space specifically for the top banner section (first section under main) */
main > section:first-of-type { padding-top: 12px; padding-bottom: 12px; }

/* slightly tighten hero-media within that section */
main > section:first-of-type .hero-media { min-height: 360px; border-radius:12px; }
.section-head h2{ font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin-top:6px; }

/* Grid for products */
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap:24px; }
@media (max-width:1100px){ .grid-3{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:640px){ .grid-3{ grid-template-columns: 1fr; } }
.product-card{ background: linear-gradient(180deg, var(--panel), #FFF); border-radius:14px; overflow:hidden; border:1px solid var(--line); transition:transform .28s ease, box-shadow .28s ease; }
.product-card:hover{ transform: translateY(-8px); box-shadow: 0 20px 40px rgba(20,20,30,0.08); }
.product-media{ aspect-ratio: 4/3; overflow:hidden; }
.product-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.product-body{ padding:18px; }
.product-body h3{ font-size:1.15rem; margin:6px 0; }
.product-spec{ display:inline-block; padding:6px 10px; border-radius:8px; background: rgba(230,135,46,0.07); color:var(--jaggery-deep); font-weight:700; font-size:0.82rem; }
.product-body p{ color:var(--ink-soft); margin-top:8px; }

/* Gallery */
.gallery-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
@media (max-width:900px){ .gallery-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:480px){ .gallery-grid{ grid-template-columns: 1fr; } }
.gallery-item{ position:relative; border-radius:12px; overflow:hidden; display:block; }
.gallery-item img{ width:100%; height:100%; object-fit:cover; display:block; }
.gallery-caption{ position:absolute; left:12px; bottom:12px; background: rgba(0,0,0,0.5); color:#fff; padding:8px 10px; border-radius:8px; font-weight:600; font-size:0.9rem; }

/* Contact */
.contact-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:28px; }
@media (max-width:860px){ .contact-grid{ grid-template-columns:1fr; } }
.contact-card{ border-radius:12px; padding:6px; border:1px solid var(--line); overflow:hidden; }
.contact-row{ padding:18px; display:flex; gap:16px; align-items:flex-start; border-bottom:1px solid var(--line); }
.contact-row:last-child{ border-bottom:none; }
.contact-row .icon{ width:46px; height:46px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:rgba(230,135,46,0.06); color:var(--jaggery-deep); }

/* CTA band */
.cta-band{ display:flex; align-items:center; justify-content:space-between; gap:20px; padding:28px; border-radius:12px; background: linear-gradient(90deg,var(--jaggery), #FFB86B); color:#fff; }
.cta-band h2{ margin:0; }

/* Footer */
.site-footer{ background:#0F1720; padding:56px 0 28px; color:#BFC8D6; border-top: 4px solid rgba(255,255,255,0.04); }
.footer-top{ display:grid; grid-template-columns: 1.6fr 1fr 1fr; gap:28px; align-items:start; }
.footer-brand img{ height:48px; filter: none; }
.footer-brand p{ color:#9AA3B2; }
.footer-col h5{ color:#E6EDF6; font-weight:700; margin-bottom:12px; }
.footer-col a, .footer-col li{ color:#BFC8D6; }
.footer-col a:hover{ color:#fff; }
.footer-col ul{ list-style:none; padding:0; margin:0; }
.footer-col li{ margin-bottom:8px; }
.footer-bottom{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:20px; font-size:0.95rem; color:#98A2B3; }
.footer-bottom a{ color:#BFC8D6; }
.social-row a{ border:1px solid rgba(255,255,255,0.08); color:#DDE6F0; background: rgba(255,255,255,0.02); }
.social-row a:hover{ border-color: rgba(255,255,255,0.18); color:#fff; background: rgba(255,255,255,0.04); }

/* Lightbox */
.lightbox{ padding:24px; }
.lightbox img{ max-width:1100px; max-height:80vh; border-radius:12px; }
.lightbox-close{ top:18px; right:18px; }

/* Accessibility focus */
:focus{ outline: 3px solid rgba(230,135,46,0.2); outline-offset:3px; }

/* small screens tweaks */
@media (max-width:640px){ .site-header .container{ height:64px; } .brand img{ height:48px; } .hero{ padding:48px 0; } .hero-media{ min-height:220px; height: calc(100vh - 64px) !important; } }
