/* =============================================================================
   NAILIVA STORE — BASE STYLESHEET ("Cream Editorial")
   Reset, design tokens, typography, buttons, badges, shared components.

   MOBILE-FIRST: base rules = mobile (no media query). Tablet (768px+) and
   desktop (1024px+) layered at the bottom via min-width media queries.

   DIRECTION: this palette + component set is reverse-engineered from the
   user's approved reference build (screenshots of the homepage, shop page
   and single-product page) — warm cream surfaces, near-black type/UI, a
   black announcement bar and header, serif display headings (Playfair
   Display) over an Inter body, sharp/minimal corner radius, no drop
   shadows, thin hairline borders. This intentionally REPLACES the
   "Onyx & Chrome" dark direction shipped in the previous iteration.
   Colors below were sampled directly from the reference screenshots
   (see /home/claude/refs in the build environment) rather than guessed.
   ============================================================================= */

/* -----------------------------------------------------------------------
   1. DESIGN TOKENS
   ----------------------------------------------------------------------- */
:root {
	/* Core surfaces */
	--color-bg: #F9F6F0;               /* warm cream — page background everywhere */
	--color-bg-alt: #F3EEE4;           /* slightly deeper cream — footer, alt sections, boxed panels */
	--color-bg-dark: #1B1411;          /* near-black — announcement bar, header text, buttons, badges */
	--color-bg-dark-alt: #2A211C;      /* lifted near-black for hover states on dark surfaces */

	/* Text */
	--color-text: #1B1411;
	--color-text-on-dark: #FBF8F2;
	--color-text-muted: #6E6259;
	--color-text-muted-on-dark: #C9C0B6;

	/* Borders */
	--color-border: #E2D9CA;
	--color-border-on-dark: #3A302A;

	/* Accent kept minimal — reference uses none beyond black/cream; this
	   exists only for focus rings and the shipping-progress fill. */
	--color-accent-deep: #1B1411;
	--gradient-chrome: linear-gradient(135deg, #EDE7DA 0%, #D8CBB2 50%, #B9A47F 100%);

	/* Status */
	--color-error: #B23B2E;

	/* Typography */
	--font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Spacing — mobile defaults, redefined in breakpoints below */
	--space-section-y: 48px;
	--space-container-x: 20px;
	--content-max-width: 1320px;

	/* Misc */
	--radius: 2px;
	--border-width: 1px;
	--transition-fast: 150ms ease;
	--transition-base: 250ms ease;
	--header-height: 56px;
	--announcement-height: 36px;
}

/* -----------------------------------------------------------------------
   2. RESET
   ----------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

img, picture, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
input, button, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-heading); font-weight: 500; line-height: 1.2; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; top: -100px; left: 0;
	background: var(--color-bg-dark); color: var(--color-text-on-dark);
	padding: 12px 20px; z-index: 1000; transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
	outline: 2px solid var(--color-accent-deep);
	outline-offset: 2px;
}

/* -----------------------------------------------------------------------
   3. LAYOUT HELPERS
   ----------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--content-max-width);
	margin-inline: auto;
	padding-inline: var(--space-container-x);
}

.section { padding-block: var(--space-section-y); }
.section-alt { background-color: var(--color-bg-alt); }
.section-dark { background-color: var(--color-bg-dark); color: var(--color-text-on-dark); }
.section-dark .text-muted { color: var(--color-text-muted-on-dark); }
.section-dark .eyebrow { color: var(--color-text-muted-on-dark); }

.section-head { margin-bottom: 24px; }
.section-head-row {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 16px; margin-bottom: 24px;
}

.scroll-row {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }

/* -----------------------------------------------------------------------
   4. TYPOGRAPHY UTILITIES
   ----------------------------------------------------------------------- */
.eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	margin-bottom: 8px;
}

.heading-xl { font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
.heading-lg { font-size: 26px; font-weight: 500; }
.heading-md { font-size: 22px; font-weight: 500; }
.text-muted { color: var(--color-text-muted); }
.italic { font-style: italic; }

.text-chrome {
	background: var(--gradient-chrome);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* -----------------------------------------------------------------------
   5. BUTTONS
   ----------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 12px 24px; border-radius: var(--radius);
	font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
	text-align: center;
	transition: background-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast), border-color var(--transition-fast);
	border: var(--border-width) solid var(--color-bg-dark);
}

.btn-primary {
	background-color: var(--color-bg-dark);
	color: var(--color-text-on-dark);
	width: 100%;
}
.btn-primary:hover, .btn-primary:focus-visible { opacity: 0.85; }

/* Use on dark sections so the button still reads against a black bg. */
.btn-primary-invert {
	background-color: var(--color-bg);
	color: var(--color-bg-dark);
	border-color: var(--color-bg);
	width: 100%;
}
.btn-primary-invert:hover, .btn-primary-invert:focus-visible { opacity: 0.85; }

.btn-secondary {
	background-color: transparent;
	color: var(--color-bg-dark);
	border-color: var(--color-bg-dark);
	width: 100%;
}
.btn-secondary:hover, .btn-secondary:focus-visible {
	background-color: var(--color-bg-dark);
	color: var(--color-text-on-dark);
}
.section-dark .btn-secondary {
	color: var(--color-text-on-dark);
	border-color: var(--color-text-on-dark);
}
.section-dark .btn-secondary:hover, .section-dark .btn-secondary:focus-visible {
	background-color: var(--color-text-on-dark);
	color: var(--color-bg-dark);
}

.btn-chrome {
	background: var(--gradient-chrome);
	color: var(--color-bg-dark);
	border-color: transparent;
	width: 100%;
}
.btn-chrome:hover, .btn-chrome:focus-visible { opacity: 0.9; }

.btn-text {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
	font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
	color: var(--color-text);
	border-bottom: 1px solid transparent;
	transition: border-color var(--transition-fast);
}
.btn-text:hover, .btn-text:focus-visible { border-bottom-color: currentColor; }
.section-dark .btn-text { color: var(--color-text-on-dark); }
.btn-text .icon-arrow { transition: transform var(--transition-fast); }
.btn-text:hover .icon-arrow { transform: translateX(3px); }

/* -----------------------------------------------------------------------
   6. BADGES
   Matches the reference exactly: SALE is a solid near-black chip;
   BESTSELLER / NEW IN are a soft off-white chip with a hairline border,
   stacked directly beneath it.
   ----------------------------------------------------------------------- */
.badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 24px; padding: 0 10px; font-size: 10.5px; font-weight: 600; line-height: 1;
	letter-spacing: 0.08em; text-transform: uppercase; border-radius: var(--radius);
	border: 1px solid transparent; box-sizing: border-box;
	background-color: var(--color-bg-dark);
	color: var(--color-text-on-dark);
}
.badge-chrome {
	background: var(--gradient-chrome);
	color: var(--color-bg-dark);
}
.badge-outline {
	background-color: #FBF9F4;
	color: var(--color-text);
	border: 1px solid var(--color-border);
}

/* -----------------------------------------------------------------------
   7. STAR RATING
   ----------------------------------------------------------------------- */
.stars { display: inline-flex; gap: 2px; color: var(--color-bg-dark); font-size: 13px; letter-spacing: 2px; }
.section-dark .stars { color: var(--color-accent-deep); }

/* -----------------------------------------------------------------------
   8. SHARED ACCORDION
   ----------------------------------------------------------------------- */
.accordion-trigger {
	display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
	font-family: var(--font-body);
}
.accordion-icon { position: relative; width: 12px; height: 12px; flex-shrink: 0; margin-left: 16px; }
.accordion-icon::before, .accordion-icon::after {
	content: ""; position: absolute; background-color: currentColor; transition: transform var(--transition-fast);
}
.accordion-icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.accordion-icon::after { top: 0; left: 50%; width: 1.5px; height: 100%; transform: translateX(-50%); }
.accordion-trigger.is-open .accordion-icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.accordion-panel { overflow: hidden; }
.accordion-panel p { color: var(--color-text-muted); font-size: 14px; line-height: 1.7; }
.section-dark .accordion-panel p { color: var(--color-text-muted-on-dark); }

/* -----------------------------------------------------------------------
   9. NAV / FILTER DRAWER (shared shell — used for both mobile nav and
   the shop filter drawer)
   ----------------------------------------------------------------------- */
.nav-drawer-overlay {
	position: fixed; inset: 0; background-color: rgba(20, 20, 26, 0.55);
	z-index: 199; opacity: 0; transition: opacity var(--transition-base);
}
.nav-drawer-overlay[data-visible] { opacity: 1; }

.nav-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 400px);
	background-color: var(--color-bg); z-index: 200;
	display: flex; flex-direction: column;
	transform: translateX(-100%); transition: transform var(--transition-base);
	overflow-y: auto;
}
.nav-drawer[data-visible] { transform: translateX(0); }
/* Filter drawer and cart drawer both open from the right (matching the
   filter/cart icons living on the right of the header); the mobile nav
   drawer stays on the left with the hamburger. */
.nav-drawer.filter-drawer, .nav-drawer.cart-drawer { left: auto; right: 0; transform: translateX(100%); }
.nav-drawer.filter-drawer[data-visible], .nav-drawer.cart-drawer[data-visible] { transform: translateX(0); }

.nav-drawer-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 20px; border-bottom: 1px solid var(--color-border);
}
.nav-drawer-title { font-family: var(--font-heading); font-size: 18px; }
.nav-drawer-close {
	display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; font-size: 24px; line-height: 1;
}

/* -----------------------------------------------------------------------
   10. PRODUCT CARD (shared component)
   Used by woocommerce/content-product.php (shop grid + category
   archives) AND the homepage bestsellers row, which calls the same
   template part for each product — one card design everywhere. Sizing
   for the two contexts (horizontal scroll-snap carousel on the
   homepage vs. a static grid on the shop) is layered in front-page.css
   and shop.css respectively; this block covers the card's own anatomy.
   ----------------------------------------------------------------------- */
.product-card { display: flex; flex-direction: column; }
.product-card-image-link { display: block; }
.product-card-image {
	position: relative; margin-bottom: 12px; aspect-ratio: 4 / 5; overflow: hidden;
	background-color: var(--color-bg-alt);
}
.product-card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-badges {
	position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2;
}
.product-card-body { display: flex; flex-direction: column; flex: 1; }
.product-card-heading-row {
	display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px;
}
.product-card-name { font-family: var(--font-heading); font-size: 16px; font-weight: 500; }
.product-card-name a:hover, .product-card-name a:focus-visible { text-decoration: underline; }
.product-card-price { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.product-card-price ins { order: 1; text-decoration: none; }
.product-card-price del { order: 2; color: var(--color-text-muted); font-weight: 400; font-size: 13px; margin: 0; text-decoration: line-through; }
.product-card .price-current { font-size: 14px; font-weight: 600; }
.product-card .price-compare { font-size: 13px; color: var(--color-text-muted); text-decoration: line-through; margin-left: 6px; }
.product-card-variant { font-size: 11px; letter-spacing: 0.03em; color: var(--color-text-muted); margin-bottom: 14px; }
.product-card-add { margin-top: auto; }

/* Style WooCommerce's own loop add-to-cart output (a/button.add_to_cart_button)
   to match the reference exactly: in every GRID context (shop, bestsellers,
   related, cross-sell) the button is OUTLINED — cream fill, thin black
   border, black text, with a leading "+". This is deliberately the
   opposite of the single product page's solid CTA (.btn.btn-primary,
   used only in content-single-product.php) — do not merge these classes. */
.product-card-add a.button,
.product-card-add button.button,
.product-card-add .btn {
	display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px;
	padding: 12px 16px; background-color: var(--color-bg); color: var(--color-text);
	font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
	border-radius: var(--radius); text-align: center; border: 1px solid var(--color-border);
	transition: background-color var(--transition-fast), color var(--transition-fast);
}
.product-card-add .nailiva-quick-add::before {
	content: "+"; font-size: 14px; line-height: 1; font-weight: 500;
}
.product-card-add a.button:hover, .product-card-add a.button:focus-visible,
.product-card-add button.button:hover, .product-card-add button.button:focus-visible {
	background-color: var(--color-bg-dark); color: var(--color-text-on-dark);
}
.product-card-add a.button.loading, .product-card-add button.button.loading { opacity: 0.6; }
.product-card-add a.added_to_cart {
	display: block; text-align: center; margin-top: 8px; font-size: 12px; text-decoration: underline;
}

.demo-data-notice {
	font-size: 12px; color: var(--color-text-muted); background-color: var(--color-bg-alt);
	border: 1px dashed var(--color-border); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px;
}

/* -----------------------------------------------------------------------
   TABLET (768px+)
   ----------------------------------------------------------------------- */
@media (min-width: 768px) {
	:root {
		--space-section-y: 72px;
		--space-container-x: 32px;
	}
	.heading-xl { font-size: 42px; }
	.heading-lg { font-size: 30px; }
}

/* -----------------------------------------------------------------------
   DESKTOP (1024px+)
   ----------------------------------------------------------------------- */
@media (min-width: 1024px) {
	:root {
		--space-section-y: 96px;
		--space-container-x: 40px;
		--header-height: 84px;
	}
	.heading-xl { font-size: 52px; }
	.heading-lg { font-size: 34px; }
	.btn-primary, .btn-primary-invert, .btn-secondary, .btn-chrome { width: auto; }
	.nav-drawer { width: min(60vw, 420px); }
}
