/* ============================================================================
   Aavant Peptides — theme shims (header state, hero carousel, drawer, prose,
   WooCommerce look-matching). Loaded after av-tokens.css.
   ============================================================================ */

/* --- Fixed header scroll state (source: transparent -> frosted on scroll) --- */
#av-header.av-header-scrolled {
	background: hsl(var(--background) / .95);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid hsl(var(--border));
}

/* --- Hero featured carousel: absolutely-stacked slides, crossfade --- */
.av-hero-carousel .av-hero-stage { position: relative; }
.av-hero-slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s ease;
	pointer-events: none;
}
.av-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
/* Progress dots derive their look from Tailwind utilities; JS swaps width/colour. */
.av-hero-dot { cursor: pointer; border: 0; padding: 0; }

/* --- Mobile menu ---
   The source is NOT a side drawer: it is a full-width sheet that drops from under
   the fixed header, sized to its own content, with the page continuing below it
   and no scrim or scroll lock. Source classes:
     fixed top-[80px] left-0 right-0 z-40 bg-background/98 backdrop-blur-lg border-b border-border
       > div.flex.flex-col.px-6.py-4
         > a.py-4.text-base.font-medium.tracking-wide.border-b.border-border/20.last:border-0

   Written as explicit CSS, never Tailwind utilities. Values below are MEASURED
   from the live source with getComputedStyle (compare_menu.py), not inferred from
   the class names — grepping its stylesheet gave two wrong answers here:
     * `bg-background/98`  => computed `rgba(0,0,0,0)`: genuinely NO background.
                              The panel is pure frosted glass — backdrop-blur(16px)
                              over the page, no cream fill. A solid fill is wrong.
     * `border-border/20`  => computed `rgba(226,225,212,.2)`. The dividers are
                              20% alpha and nearly invisible — that subtlety is the
                              design. Full-strength #E2E1D3 reads far too heavy.
     * `last:border-0`     => the last link computes `border-bottom-width: 0px`.
   Sheet itself: `border-bottom: 1px rgb(226,225,212)` at full strength, z-index 40,
   inner padding 16px 24px, links 16px/500/0.4px letter-spacing, colour
   rgba(29,48,38,.7) — all confirmed identical to ours.
   Keep `bottom:auto` explicit — the previous slide-over used `inset:0`, and a
   leftover `bottom:0` stretches the sheet to full viewport height.
   Mirrored in header.php's inline guard. */
.av-mobile-drawer[hidden] { display: none !important; }
.av-mobile-drawer {
	position: fixed;
	top: 5rem;                     /* = header h-20; source hardcodes top-[80px] */
	left: 0;
	right: 0;
	bottom: auto;                  /* content height, not full-screen */
	height: auto;
	z-index: 40;                   /* source z-40: above content, below header (50) */
	background: transparent;       /* see above — the glass IS the absence of a fill */
	-webkit-backdrop-filter: blur(16px);   /* -webkit- matters: iOS Safari */
	backdrop-filter: blur(16px);
	border-bottom: 1px solid hsl(var(--border));
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity .2s ease, transform .2s ease;
}
@media (min-width: 640px) {
	.av-mobile-drawer { top: 6rem; }   /* header grows to sm:h-24 */
}
.av-mobile-drawer.is-open {
	opacity: 1;
	transform: translateY(0);
}
.av-mobile-drawer .av-drawer-panel {
	display: flex;
	flex-direction: column;
	padding: 1rem 1.5rem;          /* source px-6 py-4 */
}
.av-mobile-drawer .av-drawer-panel a {
	display: block;
	padding: 1rem 0;               /* source py-4 */
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: .025em;        /* source tracking-wide */
	color: hsl(var(--foreground) / .7);
	border-bottom: 1px solid hsl(var(--border) / .2);   /* measured: rgba(226,225,212,.2) */
	transition: color .2s ease;
}
.av-mobile-drawer .av-drawer-panel a:last-child { border-bottom: 0; }
.av-mobile-drawer .av-drawer-panel a:hover,
.av-mobile-drawer .av-drawer-panel a:focus { color: hsl(var(--primary)); }

/* Header button swaps its glyph instead of the sheet carrying a close control. */
#av-menu-toggle .av-icon-close { display: none; }
#av-menu-toggle.is-open .av-icon-menu { display: none; }
#av-menu-toggle.is-open .av-icon-close { display: block; }

/* --- Logo sizing: beat WooCommerce's `.woocommerce img { height:auto }` which
       otherwise balloons the header/footer logo on shop/product/cart/account
       /checkout pages (the BFF gotcha). High specificity + !important. --- */
.av-site .av-logo,
#av-header a img.av-logo,
.woocommerce #av-header a img.av-logo {
	height: 2.25rem !important;   /* h-9 = 36px */
	width: auto !important;
	max-width: none !important;
}
.av-site footer img.av-logo--footer,
.woocommerce footer img.av-logo--footer {
	height: 1.75rem !important;   /* h-7 = 28px */
	width: auto !important;
	max-width: none !important;
}

/* --- Product card: keep the nested add-button clickable above the card link --- */
.av-product-card { position: relative; }
.av-card-add { z-index: 2; }

/* --- SEO zone / page prose --- */
.av-prose h2 {
	font-size: 1.875rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: hsl(var(--foreground));
	margin: 0 0 1rem;
}
.av-prose h3 {
	font-size: 1.25rem;
	font-weight: 700;
	color: hsl(var(--foreground));
	margin: 1.75rem 0 .75rem;
}
.av-prose p {
	color: hsl(var(--muted-foreground));
	font-size: .975rem;
	line-height: 1.75;
	margin: 0 0 1.1rem;
}
.av-prose a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
.av-prose ul, .av-prose ol { margin: 0 0 1.1rem 1.25rem; color: hsl(var(--muted-foreground)); }
.av-prose li { margin: 0 0 .4rem; line-height: 1.7; }
.av-prose strong { color: hsl(var(--foreground)); }

/* --- WooCommerce look-matching (baseline; shop/product agents refine) --- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: hsl(var(--primary));
	background: hsl(var(--card));
	border-radius: var(--av-radius-sm);
}
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce .button {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border-radius: var(--av-radius-pill);
	font-weight: 600;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .button:hover { background: hsl(var(--primary) / .9); }

/* Respect reduced-motion. */
@media (prefers-reduced-motion: reduce) {
	.av-hero-slide { transition: none; }
	.av-mobile-drawer { transition: none; }
}
