/* ==========================================================================
   Acuria Health — in-grid advertisement cards
   Injected by assets/js/ah-ads.js into the product grid (.grid). Cards match
   .p-card dimensions (media 220px, body padding, rounded corners) so rows
   stay aligned and nothing shifts layout.
   ========================================================================== */

.ahad-card{
  /* themable surface — presets below, admin can override via CSS vars */
  --ahad-bg: linear-gradient(160deg,#f6fbfb,#eef7f7);
  --ahad-ink:#12343b;
  --ahad-sub:#4a6b70;
  --ahad-cta: linear-gradient(110deg,#0a6e72,#0d8a8f);
  --ahad-cta-ink:#fff;
  --ahad-chip-bg:#0a6e72; --ahad-chip-ink:#fff;
  --ahad-badge-bg:#fdf3d8; --ahad-badge-ink:#8a6410;
  display:flex; flex-direction:column; overflow:hidden;
  border-radius:18px; border:1px solid #e3ecee;
  background:var(--ahad-bg); color:var(--ahad-ink);
  box-shadow:0 1px 2px rgba(15,23,42,.05), 0 10px 26px -16px rgba(10,110,114,.4);
  transition:transform .25s ease, box-shadow .25s ease;
}
.ahad-card:hover{ transform:translateY(-3px); box-shadow:0 16px 30px -14px rgba(10,110,114,.45); }

/* ---------- theme presets (admin-configurable, not hardcoded in JS) ------- */
.ahad-t-woman{
  --ahad-bg: linear-gradient(165deg,#fff1f6,#fdf2f8 55%,#fce7f3);
  --ahad-ink:#4a1d3a; --ahad-sub:#7b4a69;
  --ahad-cta: linear-gradient(110deg,#9d174d,#be185d);
  --ahad-chip-bg:#9d174d;
}
.ahad-t-connect{
  --ahad-bg: linear-gradient(165deg,#f0fdff,#ecfeff 55%,#e0f2fe);
  --ahad-ink:#083344; --ahad-sub:#3f6474;
  --ahad-cta: linear-gradient(110deg,#0e7490,#0369a1);
  --ahad-chip-bg:#0e7490;
}
.ahad-t-yoga{
  --ahad-bg: linear-gradient(165deg,#f3faf4,#ecfdf5 55%,#dcfce7);
  --ahad-ink:#14361f; --ahad-sub:#4b6a54;
  --ahad-cta: linear-gradient(110deg,#166534,#2f7d4f);
  --ahad-chip-bg:#166534;
}
.ahad-t-ai{
  --ahad-bg: linear-gradient(165deg,#2e1065,#1e1b4b);
  --ahad-ink:#f5f3ff; --ahad-sub:#c9c4f2;
  --ahad-cta: linear-gradient(110deg,#6d28d9,#4f46e5);
  --ahad-chip-bg:#4c1d95; --ahad-badge-bg:rgba(255,255,255,.14); --ahad-badge-ink:#e9d5ff;
}
.ahad-t-diag{
  --ahad-bg: linear-gradient(165deg,#eff6ff,#e0efff 55%,#dbeafe);
  --ahad-ink:#1e3a5f; --ahad-sub:#456b8f;
  --ahad-cta: linear-gradient(110deg,#1d4ed8,#2563eb);
  --ahad-chip-bg:#1d4ed8;
}

/* ---------- header ---------- */
.ahad-head{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:10px 12px 0;
}
.ahad-name{ font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--ahad-sub); }
.ahad-badge{
  flex:none; font-size:9.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  padding:3px 9px; border-radius:999px; background:var(--ahad-badge-bg); color:var(--ahad-badge-ink);
}

/* ---------- media ---------- */
.ahad-media{
  position:relative; margin:10px 12px 0; border-radius:14px; overflow:hidden;
  height:220px; background:#0c1420;
}
.ahad-stage{ position:absolute; inset:0; }
.ahad-asset{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; border:0; }
.ahad-art{
  position:absolute; inset:0;
  background:radial-gradient(90% 80% at 20% 20%, rgba(255,255,255,.35), transparent 60%), var(--ahad-cta);
}
video.ahad-asset{ background:#000; }

/* controls — appear on hover / focus, always visible while paused */
.ahad-ctl{
  position:absolute; left:0; right:0; bottom:0; z-index:3;
  display:flex; align-items:center; gap:7px; padding:7px 9px;
  background:linear-gradient(transparent, rgba(8,18,26,.78));
  opacity:0; transition:opacity .2s;
}
.ahad-card:hover .ahad-ctl, .ahad-ctl:focus-within,
.ahad-media.paused .ahad-ctl{ opacity:1; }
.ahad-ctl button{ flex:none; width:26px; height:26px; padding:5px; border:0; border-radius:8px;
  background:rgba(255,255,255,.16); color:#fff; cursor:pointer; display:grid; place-items:center; }
.ahad-ctl button:hover{ background:rgba(255,255,255,.3); }
.ahad-ctl svg{ width:14px; height:14px; fill:currentColor; }
.ahad-prog{ flex:1; height:4px; border-radius:99px; background:rgba(255,255,255,.3); cursor:pointer; }
.ahad-prog-fill{ height:100%; width:0; border-radius:99px; background:#fff; }
.ahad-time{ font-size:10px; color:rgba(255,255,255,.85); font-variant-numeric:tabular-nums; white-space:nowrap; }

/* mute — small icon bottom-right, spec §5 */
.ahad-mute{
  position:absolute; right:9px; bottom:9px; z-index:4;
  width:30px; height:30px; padding:6px; border:0; border-radius:50%;
  background:rgba(10,20,30,.6); color:#fff; cursor:pointer;
  display:grid; place-items:center;
}
.ahad-mute:hover{ background:rgba(10,20,30,.85); }
.ahad-mute svg{ width:16px; height:16px; fill:currentColor; }
.ahad-ctl:not([hidden]) ~ .ahad-mute, .ahad-media:hover .ahad-mute{ bottom:44px; }

/* autoplay-blocked fallback — prominent centre play button */
.ahad-bigplay{
  position:absolute; inset:0; margin:auto; z-index:4;
  width:64px; height:64px; border:0; border-radius:50%;
  background:rgba(255,255,255,.92); color:#0a6e72; cursor:pointer;
  display:grid; place-items:center; box-shadow:0 8px 30px rgba(0,0,0,.35);
}
.ahad-bigplay svg{ width:28px; height:28px; fill:currentColor; margin-left:3px; }

/* carousel nav + dots */
.ahad-nav button{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:28px; height:28px; border:0; border-radius:50%; padding:5px;
  background:rgba(10,20,30,.55); color:#fff; cursor:pointer; display:grid; place-items:center;
  opacity:0; transition:opacity .2s;
}
.ahad-card:hover .ahad-nav button{ opacity:1; }
.ahad-prev{ left:8px; } .ahad-next{ right:8px; }
.ahad-nav svg{ width:14px; height:14px; fill:currentColor; }
.ahad-dots{ position:absolute; bottom:8px; left:0; right:0; z-index:3; display:flex; justify-content:center; gap:5px; }
.ahad-dot{ width:7px; height:7px; border-radius:50%; border:0; padding:0; background:rgba(255,255,255,.45); cursor:pointer; }
.ahad-dot.on{ background:#fff; }
.ahad-ctl:not([hidden]) ~ .ahad-dots{ bottom:44px; }

/* ---------- content ---------- */
.ahad-body{ padding:12px 12px 0; display:grid; gap:5px; flex:1; min-height:0; }
.ahad-title{ margin:0; font-size:15.5px; font-weight:800; line-height:1.25; color:var(--ahad-ink); }
.ahad-sub{ margin:0; font-size:11.5px; font-weight:700; color:var(--ahad-sub); }
.ahad-taghi{ margin:0; font-size:12px; font-weight:700; color:var(--ahad-ink); }
.ahad-desc{
  margin:0; font-size:12px; line-height:1.5; color:var(--ahad-sub);
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.ahad-topics{
  margin:4px 0 0; padding:8px 10px; list-style:none;
  display:grid; grid-template-columns:1fr 1fr; gap:3px 10px;
  background:rgba(255,255,255,.5); border-radius:10px;
  font-size:10.5px; color:var(--ahad-sub);
  max-height:66px; overflow:hidden;
}
.ahad-topics li::before{ content:"✓ "; color:var(--ahad-chip-bg); font-weight:800; }
.ahad-t-ai .ahad-topics{ background:rgba(255,255,255,.08); }
.ahad-t-ai .ahad-topics li::before{ color:#a78bfa; }
.ahad-offer{ display:flex; align-items:center; gap:8px; font-size:12px; }
.ahad-offer b{ color:var(--ahad-ink); font-size:15px; }
.ahad-offer span{ color:var(--ahad-sub); }

/* ---------- actions ---------- */
.ahad-actions{ padding:10px 12px 12px; display:grid; gap:7px; }
.ahad-cta{
  appearance:none; border:0; border-radius:10px; cursor:pointer; text-decoration:none;
  display:flex; align-items:center; justify-content:center; gap:7px;
  padding:11px 14px; font-size:13px; font-weight:800; font-family:inherit;
}
.ahad-cta1{ background:var(--ahad-cta); color:var(--ahad-cta-ink); box-shadow:0 8px 16px -8px rgba(0,0,0,.4); }
.ahad-cta1:hover{ filter:brightness(1.08); }
.ahad-cta1:active{ transform:scale(.98); }
.ahad-cta2{ background:transparent; color:var(--ahad-ink); border:1.5px solid currentColor; padding:9px 14px; }
.ahad-cta2:hover{ background:rgba(0,0,0,.05); }
.ahad-wa{ background:#25d366; color:#fff !important; padding:9px 14px; font-size:12px; }
.ahad-wa svg{ width:16px; height:16px; fill:currentColor; }
.ahad-tagline{ margin:0; text-align:center; font-size:10.5px; font-weight:700; letter-spacing:.03em; color:var(--ahad-sub); }

/* ---------- responsive ---------- */
@media (max-width:720px){
  .ahad-card{ grid-column:1 / -1; }
  .ahad-media{ height:190px; }
  .ahad-cta{ padding:12px 14px; font-size:14px; }  /* large accessible buttons */
}
@media (min-width:721px) and (max-width:1100px){
  .ahad-media{ height:180px; }
  .ahad-desc{ -webkit-line-clamp:1; line-clamp:1; }
  .ahad-topics{ display:none; }
}

/* reduced motion: no transitions, no hover lift (rotation already off in JS) */
@media (prefers-reduced-motion: reduce){
  .ahad-card, .ahad-ctl, .ahad-nav button{ transition:none !important; }
  .ahad-card:hover{ transform:none; }
}

/* ============================ enquiry modal ============================== */
.ahad-enq{ position:fixed; inset:0; z-index:9999; display:none; }
.ahad-enq.open{ display:block; }
.ahad-enq-back{ position:absolute; inset:0; background:rgba(15,35,40,.55); backdrop-filter:blur(3px); }
.ahad-enq-card{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(480px, 94vw); max-height:92vh; overflow-y:auto;
  background:#fff; border-radius:20px; padding:24px 22px;
  box-shadow:0 24px 80px rgba(0,0,0,.35);
}
.ahad-enq-card h3{ margin:0 0 4px; font-size:19px; color:#12343b; }
.ahad-enq-sub{ margin:0 0 14px; font-size:12.5px; color:#5a7478; }
.ahad-enq-x{
  position:absolute; top:12px; right:12px; width:32px; height:32px; border:0; border-radius:50%;
  background:#f0f4f5; color:#456; font-size:20px; cursor:pointer; line-height:1;
}
.ahad-enq-card .f{ margin-bottom:10px; }
.ahad-enq-card .g2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ahad-enq-card label{ display:block; font-size:11.5px; font-weight:700; color:#456; margin-bottom:4px; }
.ahad-enq-card label i{ font-weight:400; color:#9ab; font-style:normal; }
.ahad-enq-card input, .ahad-enq-card select, .ahad-enq-card textarea{
  width:100%; box-sizing:border-box; padding:9px 11px; border:1.5px solid #d8e4e6; border-radius:9px;
  font-size:13.5px; font-family:inherit; outline:none;
}
.ahad-enq-card input:focus, .ahad-enq-card select:focus, .ahad-enq-card textarea:focus{ border-color:#0d8a8f; }
.ahad-enq-card input[readonly]{ background:#f4f8f8; color:#456; }
.ahad-consent{ display:flex !important; align-items:flex-start; gap:8px; font-size:12px !important; font-weight:500 !important; color:#456 !important; margin:10px 0; }
.ahad-consent input{ width:auto; margin-top:2px; }
.ahad-enq-msg{ font-size:12.5px; margin:8px 0; min-height:0; }
.ahad-enq-msg.err{ color:#c0392b; }
.ahad-enq-btn{
  width:100%; border:0; border-radius:10px; padding:12px; margin-top:6px;
  background:linear-gradient(110deg,#0a6e72,#0d8a8f); color:#fff; font-size:14px; font-weight:800; cursor:pointer;
}
.ahad-enq-btn:disabled{ opacity:.6; cursor:default; }
.ahad-enq-done{ text-align:center; padding:18px 6px; }
.ahad-enq-tick{
  width:54px; height:54px; margin:0 auto 12px; border-radius:50%;
  background:#e7f6ee; color:#1c7c47; font-size:26px; display:grid; place-items:center; font-weight:800;
}
.ahad-enq-done h4{ margin:0 0 6px; color:#12343b; }
.ahad-enq-done p{ margin:0 0 4px; font-size:13px; color:#5a7478; }
.ahad-enq-ref{ font-size:12px; font-weight:800; color:#0a6e72; font-family:monospace; }
@media (max-width:520px){ .ahad-enq-card .g2{ grid-template-columns:1fr; } }
