/* ==========================================================================
   Al-Madeena Traders - shared layout stylesheet (complete)
   Loaded after assets/style.css on every page.
   ========================================================================== */

/* ---------- Top bar icons: solid, orange, readable ---------- */
.tb svg{width:14px;height:14px;fill:var(--orange);stroke:none;flex:none;display:block}
.tb a,.tb span{gap:8px}
.tb a:hover{color:#ffb77d}

/* ---------- Trust strip ---------- */
.trust{padding:14px 0}

/* ---------- Home product cards ---------- */
.hp-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;align-items:stretch}
.hp-item{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;transition:border-color .3s}
.hp-item:hover{border-color:#c9d3e0}
.hp-media{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:var(--soft)}
.hp-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .8s cubic-bezier(.2,.7,.2,1)}
.hp-item:hover .hp-media img{transform:scale(1.04)}
.hp-no{position:absolute;left:12px;top:12px;z-index:2;background:var(--navy);color:#fff;font-size:.75rem;font-weight:700;padding:3px 9px;border-radius:5px}
.hp-cat{position:absolute;right:12px;top:12px;z-index:2;background:rgba(255,255,255,.94);color:var(--navy);font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:4px 9px;border-radius:20px}
.hp-body{display:flex;flex-direction:column;flex:1;padding:18px 20px 20px}
.hp-body h3{font-size:1.12rem;color:var(--navy);line-height:1.3;margin:0 0 8px;min-height:2.6em;display:flex;align-items:flex-end}
.hp-body p{font-size:.92rem;color:var(--mute);line-height:1.55;margin:0 0 14px;min-height:3.1em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hp-specs{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin:auto 0 16px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.hp-specs>div{min-width:0}
.hp-specs dt{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--mute)}
.hp-specs dd{margin:3px 0 0;font-size:.9rem;font-weight:600;color:var(--navy);line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hp-foot{margin-top:0;display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;padding:12px 0;border-bottom:1px solid var(--line)}
.hp-btn{display:inline-flex;align-items:center;font-weight:700;font-size:.92rem;text-decoration:none;background:none;border:0;padding:0;transition:opacity .2s;color:var(--navy);min-width:0}
.hp-btn:hover{opacity:.75}
.hp-enq,.hp-wa{color:var(--navy)}
.hp-grid + p{margin:28px 0 0 !important}
section:has(.hp-grid){padding-bottom:40px}

/* ---------- Brands: auto-scrolling loop ---------- */
.brands-sec{padding:36px 0 40px;background:#fff}
.brand-marq{overflow:hidden;margin-top:20px}
.brand-track{display:flex;width:max-content;animation:brandScroll 30s linear infinite}
.brand-marq:hover .brand-track{animation-play-state:paused}
.brand-item{flex:none;width:200px;height:88px;margin-right:18px;display:flex;align-items:center;justify-content:center;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:#fff}
.brand-item span{font-weight:800;font-size:1.02rem;letter-spacing:.04em;color:var(--navy);text-transform:uppercase}
.brand-item img{max-height:44px;max-width:80%;object-fit:contain;display:block}
@keyframes brandScroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.brand-track{animation:none}}

/* ---------- FAQ: plus / minus markers ---------- */
main details summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:16px;cursor:pointer}
main details summary::-webkit-details-marker{display:none}
main details summary::marker{content:""}
main details summary:after{content:"+";flex:none;font-size:1.5rem;font-weight:400;line-height:1;color:var(--orange)}
main details[open] summary:after{content:"\2212"}

/* ---------- Walkway jali: video and text share one height ---------- */
.vsec .wrap.two{align-items:stretch}
.vsec .vtxt{display:flex;flex-direction:column;justify-content:space-between;gap:0}
.vsec .vtxt .btn{align-self:flex-start}
.vsec .phone{width:100%;max-width:none;margin:0;height:460px;border:0;border-radius:14px;box-shadow:none;background:var(--soft);overflow:hidden}
.vsec .phone video{width:100%;height:100%;object-fit:cover;display:block}

/* ---------- Product detail pages ---------- */
.pgrid.one{grid-template-columns:1fr;max-width:860px;margin:0 auto}
.pp-back{margin-top:28px;text-align:center}
.pp-back a{color:var(--orange);font-weight:700;text-decoration:none}
.pp-back a:hover{text-decoration:underline}
.pd-crumb{font-size:.88rem;color:var(--mute);margin-bottom:22px}
.pd-crumb a{color:var(--mute);text-decoration:none}
.pd-crumb a:hover{color:var(--navy)}
.pd-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:stretch}
.pd-media{position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:14px;background:var(--soft)}
.pd-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.pd-text{display:flex;flex-direction:column;justify-content:center}
.pd-text h2{font-size:2rem;color:var(--navy);line-height:1.2;margin:8px 0 14px}
.pd-lead{color:var(--mute);font-size:1.02rem;line-height:1.65;margin:0 0 24px}
.pd-cta{display:flex;gap:12px;flex-wrap:wrap}
.pd-wa{display:inline-flex;align-items:center;justify-content:center;padding:12px 22px;border:1.5px solid var(--navy);color:var(--navy);border-radius:6px;font-weight:700;text-decoration:none}
.pd-wa:hover{background:var(--navy);color:#fff}
.pd-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;margin-top:24px}
.pd-table th,.pd-table td{padding:14px 20px;text-align:left;border-bottom:1px solid var(--line);font-size:.95rem}
.pd-table th{width:32%;color:var(--navy);font-weight:700;background:var(--soft)}
.pd-table td{color:var(--mute)}
.pd-table tr:last-child th,.pd-table tr:last-child td{border-bottom:0}
.pd-apps{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:28px}
.pd-apps article{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px}
.pd-apps .pd-n{display:inline-block;color:var(--orange);font-weight:800;font-size:.85rem;letter-spacing:.06em;margin-bottom:10px}
.pd-apps h3{font-size:1.05rem;color:var(--navy);margin:0;line-height:1.4}

/* ---------- Floating WhatsApp + phone buttons (bottom right) ---------- */
.fab-stack{position:fixed;right:22px;bottom:22px;display:flex;flex-direction:column;gap:14px;z-index:60}
.fab-wa,.fab-ph{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(15,30,55,.28);transition:transform .2s;color:#fff}
.fab-wa{background:#25D366}
.fab-ph{background:var(--navy)}
.fab-wa:hover,.fab-ph:hover{transform:scale(1.07)}
.fab-ico{display:block;fill:currentColor;stroke:none}
.fab-wa .fab-ico{width:30px;height:30px}
.fab-ph .fab-ico{width:24px;height:24px}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Large tablets and small laptops */
@media(max-width:1100px){
  .brand-item{width:170px}
  .pd-apps{gap:18px}
}

/* Tablets */
@media(max-width:960px){
  .hp-grid{grid-template-columns:repeat(2,1fr)}
  .pd-apps{grid-template-columns:repeat(2,1fr)}
}

/* Mobile landscape and large phones */
@media(max-width:860px){
  .pd-grid{grid-template-columns:1fr;gap:28px}
  .pd-media{aspect-ratio:4/3}
  .vsec .phone{height:auto;aspect-ratio:4/5}
  .vsec .vtxt .btn{align-self:stretch;text-align:center;justify-content:center}
}

/* Phones */
@media(max-width:620px){
  .hp-grid{grid-template-columns:1fr;gap:20px}
  .brand-item{width:150px;height:76px}
  .pd-apps{grid-template-columns:1fr}
  .pd-text h2{font-size:1.65rem}
  .pd-lead{font-size:.98rem}
  .pd-cta{flex-direction:column}
  .pd-cta .btn,.pd-wa{width:100%;justify-content:center;box-sizing:border-box}
  .pd-table th,.pd-table td{padding:12px 14px;font-size:.9rem}
  .pd-table th{width:40%}
  .fab-stack{right:14px;bottom:14px;gap:12px}
  .fab-wa,.fab-ph{width:52px;height:52px}
  .fab-wa .fab-ico{width:26px;height:26px}
  .fab-ph .fab-ico{width:21px;height:21px}
  .tb svg{width:13px;height:13px}
}

/* Small phones */
@media(max-width:380px){
  .hp-foot{grid-template-columns:1fr}
  .hp-body{padding:16px}
  .pd-text h2{font-size:1.45rem}
  .pd-apps article{padding:18px}
  .pd-table th{width:44%}
}

/* ==========================================================================
   HOME PAGE (scoped to body.home)
   ========================================================================== */
.home{--ease:cubic-bezier(.2,.7,.2,1)}

/* ---- Hero entrance ---- */
.home .hero.big .eyebrow,
.home .hero.big h1,
.home .hero.big .cta,
.home .hero-badges{opacity:0;animation:heroUp .9s var(--ease) forwards}
.home .hero.big h1{animation-delay:.25s}
.home .hero.big .cta{animation-delay:.6s}
.home .hero-badges{animation-delay:.75s}
@keyframes heroUp{from{opacity:0;transform:translateY(26px)}to{opacity:1;transform:none}}
.home .grad{background:linear-gradient(90deg,#fff 0%,#ffb77d 55%,#D9772B 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:26px}
.hero-badges span{font-size:.82rem;font-weight:600;color:#fff;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.2);padding:6px 14px;border-radius:30px;backdrop-filter:blur(4px)}

/* ---- Buttons ---- */
.home .btn{box-shadow:0 6px 16px rgba(217,119,43,.25)}
.home .btn:hover{box-shadow:0 10px 24px rgba(217,119,43,.4)}
.mt8{margin-top:8px}
.more{margin-top:44px;text-align:center}
.cta.center{justify-content:center}
.lead-tight{margin-bottom:14px}
.faq{max-width:820px}

/* ---- Trust strip ---- */
.home .trust{background:#fff;border-bottom:1px solid var(--line)}
.home .trust ul{grid-template-columns:repeat(4,1fr)}
.home .trust li{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 12px;border-radius:10px;transition:background .3s,transform .3s var(--ease)}
.home .trust li:before{content:"";width:9px;height:9px;border-radius:50%;background:var(--orange);box-shadow:0 0 0 4px rgba(217,119,43,.15);flex:none}
.home .trust li:hover{background:var(--soft);transform:translateY(-2px)}

/* ---- Sections ---- */
.home section{padding:72px 0}
.home section.alt{background:linear-gradient(180deg,#f6f8fb,#eef2f7)}
.home .lead{font-size:1.02rem}

/* ---- Section headers ---- */
.sec-head{text-align:center;max-width:760px;margin:0 auto 44px}
.sec-head .eyebrow{position:static;padding-left:0;display:inline-block;color:var(--orange)}
.sec-head .eyebrow:before{display:none}
.sec-head h2{margin-bottom:12px}
.sec-head p{color:var(--mute)}

/* ---- Feature cards ---- */
.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.feature{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px;display:flex;gap:16px;align-items:flex-start}
.feature .ico{flex:none;width:46px;height:46px;border-radius:12px;background:linear-gradient(135deg,var(--navy),var(--navy2));display:flex;align-items:center;justify-content:center;transition:transform .35s var(--ease)}
.feature .ico svg{width:22px;height:22px;stroke:#ffb77d;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.feature b{display:block;color:var(--navy);margin-bottom:4px;font-size:1.02rem}
.feature span{font-size:.92rem;color:var(--mute)}
.home .feature.is-in:hover{transform:translateY(-5px);box-shadow:0 18px 36px rgba(31,58,95,.12);border-color:var(--orange);transition-delay:0s}
.home .feature.is-in:hover .ico{transform:rotate(-8deg) scale(1.06)}

/* ---- Product cards ---- */
.home .hp-grid{gap:28px}
.home .hp-item{box-shadow:0 4px 14px rgba(15,30,55,.05)}
.home .hp-item.is-in:hover{transform:translateY(-8px);box-shadow:0 22px 44px rgba(31,58,95,.16);border-color:var(--orange);transition-delay:0s}
.home .hp-media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(14,28,48,.35));opacity:0;transition:opacity .4s;pointer-events:none}
.home .hp-item:hover .hp-media:after{opacity:1}
.home .hp-btn{position:relative}
.home .hp-btn:after{content:"";position:absolute;left:0;bottom:-3px;height:2px;width:0;background:var(--orange);transition:width .35s var(--ease)}
.home .hp-btn:hover:after{width:100%}

/* ---- Gallery ---- */
.home .gal figure{box-shadow:0 6px 16px rgba(15,30,55,.08)}
.home .gal figure.is-in:hover{box-shadow:0 18px 36px rgba(15,30,55,.18);transform:translateY(-4px);transition-delay:0s}

/* ---- Process steps ---- */
.process{position:relative;list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.process:before{content:"";position:absolute;top:30px;left:16%;right:16%;height:2px;background:repeating-linear-gradient(90deg,var(--orange) 0 10px,transparent 10px 20px);opacity:.45;z-index:0}
.process li{position:relative;z-index:1;background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px 24px;text-align:center}
.home .process li.is-in:hover{transform:translateY(-6px);box-shadow:0 18px 34px rgba(31,58,95,.12);transition-delay:0s}
.process .num{width:60px;height:60px;margin:-58px auto 16px;border-radius:50%;background:linear-gradient(135deg,var(--orange),#f0a060);color:#fff;font-weight:800;font-size:1.2rem;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 6px #fff,0 10px 20px rgba(217,119,43,.35)}
.process b{display:block;color:var(--navy);margin-bottom:6px;font-size:1.05rem}
.process span{font-size:.92rem;color:var(--mute)}

/* ---- Cards (applications) ---- */
.home .card.is-in:hover{transform:translateY(-6px);box-shadow:0 14px 30px rgba(31,58,95,.14);border-color:var(--orange);transition-delay:0s}

/* ---- CTA band ---- */
.home .band{position:relative;overflow:hidden;background:linear-gradient(120deg,var(--navy2),var(--navy));padding:64px 0}
.home .band:before,.home .band:after{content:"";position:absolute;border-radius:50%;background:rgba(217,119,43,.12);pointer-events:none}
.home .band:before{width:360px;height:360px;top:-160px;left:-120px;animation:float 9s ease-in-out infinite}
.home .band:after{width:260px;height:260px;bottom:-120px;right:-80px;animation:float 11s ease-in-out infinite reverse}
@keyframes float{50%{transform:translateY(-22px)}}
.home .band .wrap{position:relative;z-index:1}

/* ---- FAQ ---- */
.home details{transition:box-shadow .3s,border-color .3s}
.home details[open]{border-color:var(--orange);box-shadow:0 10px 24px rgba(31,58,95,.08)}
main details summary:after{transition:transform .3s var(--ease)}
main details[open] summary:after{transform:rotate(180deg)}
main details p{animation:fadeIn .4s ease}
@keyframes fadeIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* ---- Scroll reveal (only when JS has added .js to <html>) ---- */
.js [data-reveal]{opacity:0;transform:translateY(28px);transition:opacity .8s ease,transform .8s var(--ease),box-shadow .4s,border-color .4s;transition-delay:var(--d,0s)}
.js [data-reveal="left"]{transform:translateX(-30px)}
.js [data-reveal="right"]{transform:translateX(30px)}
.js [data-reveal].is-in{opacity:1;transform:none}

/* ---- Responsive (home) ---- */
@media(max-width:900px){
  .home section{padding:56px 0}
  .home .trust ul{grid-template-columns:1fr 1fr}
  .feature-grid{grid-template-columns:1fr}
  .process{grid-template-columns:1fr}
  .process:before{display:none}
  .process .num{margin-top:0;margin-bottom:14px}
}
@media(max-width:620px){
  .hero-badges span{font-size:.76rem}
  .sec-head{margin-bottom:32px}
}

/* ---- Reduced motion: no animation, everything visible ---- */
@media(prefers-reduced-motion:reduce){
  .home *,.home *:before,.home *:after{animation:none!important;transition:none!important}
  .home .hero.big .eyebrow,
  .home .hero.big h1,
  .home .hero.big .cta,
  .home .hero-badges,
  .js [data-reveal]{opacity:1!important;transform:none!important}
}

/* ---- Feature cards: icon above text for wider text column ---- */
.feature{flex-direction:column;gap:14px;padding:22px}
.feature .ico{width:44px;height:44px;border-radius:11px}
.feature .ico svg{width:20px;height:20px}
/* ==========================================================================
   Remove empty white space (home page)
   ========================================================================== */

/* Center text and cards vertically in two-column sections */
.home .wrap.two{align-items:center}

/* Feature cards: size to their content instead of stretching */
.home .feature-grid{align-items:start}
.home .feature{flex-direction:column;gap:14px;padding:22px 22px 24px;align-self:start}

/* Walkway jali: text fills the height, no gap in the middle */
.home .vsec .vtxt{justify-content:center;gap:26px}
.home .vsec .vtxt > div{display:flex;flex-direction:column;gap:6px}
.home .vsec .phone{height:auto;aspect-ratio:4/3;min-height:0}

/* Less space between sections */
.home section{padding:56px 0}
.home section:has(.hp-grid){padding-bottom:24px}

@media(max-width:900px){
  .home .wrap.two{align-items:start}
  .home section{padding:44px 0}
}
/* Equal-height cards per row, tighter gap below the section */
.home .feature-grid{align-items:stretch}
.home .feature{align-self:stretch}
.home .wrap.two:has(.feature-grid){padding-bottom:0}
.home section:has(.feature-grid){padding-bottom:40px}
/* Service area: extra content in left column */
.home .contact-list{list-style:none;margin:22px 0 0;display:grid;gap:12px}
.home .contact-list li{display:flex;gap:14px;align-items:baseline;font-size:.95rem;color:var(--ink);line-height:1.5}
.home .contact-list b{flex:none;min-width:58px;color:var(--navy);font-size:.8rem;text-transform:uppercase;letter-spacing:.06em}
.home .contact-list a{color:var(--navy);font-weight:600;text-decoration:none}
.home .contact-list a:hover{color:var(--orange)}
.home .area-label{margin:26px 0 10px;font-size:.8rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--mute)}
.home .cta-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
.home .btn.ghost-dark{background:transparent;color:var(--navy);border:2px solid var(--navy)}
.home .btn.ghost-dark:hover{background:var(--navy);color:#fff}

/* ==========================================================================
   Products dropdown: two columns, no scrollbar (desktop)
   ========================================================================== */
nav ul.sub,
.dd:hover>ul.sub,
.dd:focus-within>ul.sub,
.dd.open>ul.sub{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 6px;
  min-width:560px;
  margin-top:9px;
  left:-215px;
  padding:12px 10px;
  max-height:none;
  overflow:visible;
}
nav ul.sub a{
  padding:9px 14px;
  font-size:.9rem;
  white-space:nowrap;
  line-height:1.35;
}
nav ul.sub a:hover{padding-left:20px}

/* Mobile: back to a single column inside the menu */
@media(max-width:860px){
  nav ul.sub,
  .dd:hover>ul.sub,
  .dd:focus-within>ul.sub,
  .dd.open>ul.sub{
    display:none;
    grid-template-columns:1fr;
    min-width:0;
    left:auto;
    padding:2px 0 10px 10px;
  }
  .dd.open>ul.sub{display:flex;flex-direction:column}
  nav ul.sub a{white-space:normal;padding:11px 12px;font-size:.95rem}
}
/* ==========================================================================
   Products dropdown: stays open while the mouse moves into it
   ========================================================================== */

/* Desktop: hidden by default, shown on hover, with a short fade-out delay */
nav .dd{position:relative}

nav ul.sub{
  display:grid !important;
  visibility:hidden;
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s;
}

/* Invisible bridge over the gap between the link and the panel */
nav ul.sub::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-28px;
  height:28px;
}

.dd:hover>ul.sub,
.dd:focus-within>ul.sub,
.dd.open>ul.sub,
nav ul.sub:hover{
  visibility:visible;
  opacity:1;
  transform:none;
  pointer-events:auto;
  transition:opacity .25s ease,transform .25s ease,visibility 0s;
}

/* Mobile: keep the menu behaviour (tap to open, single column) */
@media(max-width:860px){
  nav ul.sub,
  .dd:hover>ul.sub,
  .dd:focus-within>ul.sub,
  nav ul.sub:hover{
    display:none !important;
    visibility:visible;
    opacity:1;
    transform:none;
    transition:none;
  }
  .dd.open>ul.sub{
    display:flex !important;
    flex-direction:column;
    visibility:visible;
    opacity:1;
    transform:none;
    pointer-events:auto;
  }
  nav ul.sub::before{display:none}
}