/*
 * Cando Villa design system
 * Layered over Bootstrap 5.3 (grid, utilities, offcanvas/collapse JS).
 * Tokens first, then base, then components. Keep specificity flat: one class per rule where possible.
 */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* colour */
  --cv-ivory: #FBF7F0;      /* page */
  --cv-parchment: #F2EADB;  /* raised surfaces, tiles */
  --cv-sandstone: #E3D3BA;  /* lines, borders */
  --cv-terracotta: #9A5236; /* primary actions only */
  --cv-terracotta-deep: #7D4128;
  --cv-brass: #A8823E;      /* hairlines, small accents */
  --cv-brass-soft: #CDB27C;
  --cv-charcoal: #2A2522;   /* text, footer band */
  --cv-smoke: #6B6159;      /* secondary text (4.9:1 on ivory) */
  --cv-success: #3F6B4A;
  --cv-danger: #A2342B;
  --cv-white: #FFFFFF;

  /* type */
  --cv-font-display: "Marcellus", "Times New Roman", serif;
  --cv-font-body: "Jost", "Segoe UI", system-ui, sans-serif;
  --cv-step--1: 0.875rem;
  --cv-step-0: 1rem;
  --cv-step-1: 1.25rem;
  --cv-step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --cv-step-3: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  --cv-step-4: clamp(2.375rem, 1.7rem + 3vw, 4rem);
  --cv-leading-body: 1.65;
  --cv-leading-display: 1.12;

  /* space (8pt rhythm) */
  --cv-space-1: 0.25rem; --cv-space-2: 0.5rem; --cv-space-3: 1rem; --cv-space-4: 1.5rem;
  --cv-space-5: 2rem; --cv-space-6: 3rem; --cv-space-7: 4.5rem; --cv-space-8: 7rem;
  --cv-section: clamp(3.5rem, 2.5rem + 4vw, 7rem);

  /* shape */
  --cv-radius-sm: 4px;
  --cv-radius-md: 10px;
  --cv-arch: 50% 50% 0 0 / 40% 40% 0 0; /* the mehrab arch (semicircular top on a 4:5 frame), imagery only */
  --cv-focus: 0 0 0 3px var(--cv-ivory), 0 0 0 5px var(--cv-terracotta);
  --cv-ease: cubic-bezier(.2,.7,.2,1);

  /* Bootstrap bridge */
  --bs-body-bg: var(--cv-ivory);
  --bs-body-color: var(--cv-charcoal);
  --bs-body-font-family: var(--cv-font-body);
  --bs-link-color-rgb: 154, 82, 54;
  --bs-link-hover-color-rgb: 125, 65, 40;
  --bs-border-color: var(--cv-sandstone);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { font-family: var(--cv-font-body); font-weight: 400; line-height: var(--cv-leading-body); background: var(--cv-ivory); color: var(--cv-charcoal); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .cv-display { font-family: var(--cv-font-display); font-weight: 400; line-height: var(--cv-leading-display); letter-spacing: 0.005em; color: var(--cv-charcoal); text-wrap: balance; }
h1 { font-size: var(--cv-step-4); }
h2 { font-size: var(--cv-step-3); }
h3 { font-size: var(--cv-step-2); }
h4, h5, h6 { font-family: var(--cv-font-body); font-weight: 500; font-size: var(--cv-step-1); }
p { max-width: 68ch; }
a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: none; box-shadow: var(--cv-focus); border-radius: var(--cv-radius-sm); }
::selection { background: var(--cv-brass-soft); color: var(--cv-charcoal); }

.cv-skip { position: absolute; left: var(--cv-space-3); top: -100px; z-index: 2000; background: var(--cv-charcoal); color: var(--cv-ivory); padding: var(--cv-space-2) var(--cv-space-3); }
.cv-skip:focus { top: var(--cv-space-3); }

.cv-section { padding-block: var(--cv-section); }
.cv-section--surface { background: var(--cv-parchment); }
.cv-lead { font-size: var(--cv-step-1); font-weight: 300; color: var(--cv-smoke); max-width: 52ch; }
.cv-muted { color: var(--cv-smoke); }
.cv-rule { width: 3.5rem; height: 1px; background: var(--cv-brass); border: 0; opacity: 1; margin: var(--cv-space-4) 0; }
.cv-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--cv-space-3); margin-bottom: var(--cv-space-5); }
.cv-section-head h2 { margin: 0; }

/* ---------- Buttons ---------- */
.cv-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--cv-space-2); min-height: 48px; padding: 0.75rem 1.75rem; font: 500 0.9375rem/1 var(--cv-font-body); letter-spacing: 0.02em; border: 1px solid transparent; border-radius: var(--cv-radius-sm); text-decoration: none; cursor: pointer; transition: background-color .2s var(--cv-ease), color .2s var(--cv-ease), border-color .2s var(--cv-ease); }
.cv-btn--primary { background: var(--cv-terracotta); color: var(--cv-white); }
.cv-btn--primary:hover { background: var(--cv-terracotta-deep); color: var(--cv-white); }
.cv-btn--secondary { background: transparent; color: var(--cv-charcoal); border-color: var(--cv-charcoal); }
.cv-btn--secondary:hover { background: var(--cv-charcoal); color: var(--cv-ivory); }
.cv-btn--light { background: var(--cv-ivory); color: var(--cv-charcoal); }
.cv-btn--light:hover { background: var(--cv-parchment); color: var(--cv-charcoal); }
.cv-btn--text { min-height: auto; padding: 0; color: var(--cv-charcoal); border-bottom: 1px solid var(--cv-brass); border-radius: 0; }
.cv-btn--text:hover { color: var(--cv-terracotta); }
.cv-btn--block { width: 100%; }
.cv-btn[disabled], .cv-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- Forms ---------- */
.cv-field { margin-bottom: var(--cv-space-4); }
.cv-label { display: block; font-size: var(--cv-step--1); font-weight: 500; margin-bottom: var(--cv-space-2); }
.cv-input, .cv-select, .cv-textarea { display: block; width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; font: 400 1rem/1.4 var(--cv-font-body); color: var(--cv-charcoal); background: var(--cv-white); border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-sm); transition: border-color .15s; }
.cv-textarea { min-height: 140px; resize: vertical; }
.cv-input:hover, .cv-select:hover, .cv-textarea:hover { border-color: var(--cv-brass-soft); }
.cv-input:focus, .cv-select:focus, .cv-textarea:focus { outline: none; border-color: var(--cv-terracotta); box-shadow: 0 0 0 3px rgba(154,82,54,.15); }
.cv-input[aria-invalid="true"], .cv-textarea[aria-invalid="true"] { border-color: var(--cv-danger); }
.cv-help { font-size: var(--cv-step--1); color: var(--cv-smoke); margin-top: var(--cv-space-1); }
.cv-error { font-size: var(--cv-step--1); color: var(--cv-danger); margin-top: var(--cv-space-1); }
.cv-check { display: flex; gap: var(--cv-space-2); align-items: flex-start; font-size: var(--cv-step--1); }
.cv-check input { width: 18px; height: 18px; margin-top: 0.2rem; accent-color: var(--cv-terracotta); flex: none; }
.cv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Badges & notices ---------- */
.cv-badge { display: inline-block; padding: 0.2rem 0.6rem; font-size: 0.8125rem; font-weight: 500; border-radius: var(--cv-radius-sm); background: var(--cv-parchment); color: var(--cv-charcoal); border: 1px solid var(--cv-sandstone); }
.cv-badge--sale { background: var(--cv-terracotta); color: var(--cv-white); border-color: var(--cv-terracotta); }
.cv-badge--low { background: transparent; color: var(--cv-terracotta-deep); border-color: var(--cv-brass-soft); }
.cv-alert { padding: var(--cv-space-3) var(--cv-space-4); border-radius: var(--cv-radius-sm); border-left: 3px solid var(--cv-brass); background: var(--cv-parchment); margin-bottom: var(--cv-space-4); }
.cv-alert--success { border-left-color: var(--cv-success); }
.cv-alert--error { border-left-color: var(--cv-danger); }
.cv-draft-note { font-size: var(--cv-step--1); padding: var(--cv-space-2) var(--cv-space-3); background: #FFF4D6; border: 1px dashed var(--cv-brass); border-radius: var(--cv-radius-sm); }

/* ---------- Announcement + header ---------- */
.cv-announcement { background: var(--cv-charcoal); color: var(--cv-ivory); font-size: var(--cv-step--1); text-align: center; padding: 0.55rem var(--cv-space-3); }
.cv-announcement a { color: var(--cv-brass-soft); }
.cv-header { position: sticky; top: 0; z-index: 1020; background: rgba(251,247,240,.94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--cv-sandstone); }
.cv-header__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--cv-space-4); min-height: 76px; }
.cv-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--cv-charcoal); }
.cv-brand img { height: 52px; width: auto; }
.cv-brand__name { font-family: var(--cv-font-display); font-size: 1.5rem; letter-spacing: 0.04em; white-space: nowrap; }
.cv-nav { display: flex; justify-content: center; gap: var(--cv-space-5); list-style: none; margin: 0; padding: 0; }
.cv-nav a { color: var(--cv-charcoal); text-decoration: none; font-size: 0.9375rem; padding-block: 0.5rem; border-bottom: 1px solid transparent; }
.cv-nav a:hover, .cv-nav a[aria-current="page"] { border-bottom-color: var(--cv-brass); }
.cv-tools { display: flex; align-items: center; gap: var(--cv-space-1); }
.cv-icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--cv-charcoal); border-radius: 50%; text-decoration: none; }
.cv-icon-btn:hover { background: var(--cv-parchment); color: var(--cv-charcoal); }
.cv-icon-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.cv-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--cv-terracotta); color: var(--cv-white); font-size: 0.6875rem; line-height: 18px; text-align: center; }
.cv-search { border-top: 1px solid var(--cv-sandstone); padding-block: var(--cv-space-3); }
.cv-search form { display: flex; gap: var(--cv-space-2); max-width: 640px; margin-inline: auto; }
.cv-menu-toggle { display: none; }
@media (max-width: 991.98px) {
  .cv-nav { display: none; }
  .cv-menu-toggle { display: inline-grid; }
  .cv-header__row { grid-template-columns: auto 1fr auto; min-height: 64px; }
  .cv-brand { justify-self: center; }
  .cv-brand img { height: 42px; }
  .cv-brand__name { font-size: 1.25rem; }
}
@media (max-width: 420px) { .cv-brand__name { display: none; } .cv-tools .cv-hide-xs { display: none; } }

.cv-offcanvas { background: var(--cv-ivory); }
.cv-offcanvas .cv-mobile-nav { list-style: none; padding: 0; margin: 0; }
.cv-offcanvas .cv-mobile-nav a { display: block; padding: 0.9rem 0; font-family: var(--cv-font-display); font-size: 1.375rem; color: var(--cv-charcoal); text-decoration: none; border-bottom: 1px solid var(--cv-sandstone); }

/* ---------- Arch (the signature motif) ---------- */
.cv-arch { position: relative; isolation: isolate; }
.cv-arch__frame { position: relative; overflow: hidden; border-radius: var(--cv-arch); background: var(--cv-parchment); aspect-ratio: 4 / 5; }
.cv-arch__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-arch::after { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid var(--cv-brass); border-radius: var(--cv-arch); z-index: -1; pointer-events: none; }
@media (max-width: 575.98px) { .cv-arch::after { inset: -9px 9px 9px -9px; } }

/* ---------- Hero ---------- */
.cv-hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem); overflow: hidden; }
.cv-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
.cv-hero h1 { margin-bottom: var(--cv-space-4); max-width: 13ch; }
.cv-hero__actions { display: flex; flex-wrap: wrap; gap: var(--cv-space-3); margin-top: var(--cv-space-5); }
.cv-hero__art { max-width: 440px; justify-self: end; width: 100%; }
@media (max-width: 767.98px) {
  .cv-hero__grid { grid-template-columns: 1fr; }
  .cv-hero__art { justify-self: center; max-width: 320px; order: -1; }
}

/* Illustrated placeholder scene (shown until a banner photo is uploaded) */
.cv-scene { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(232,190,120,.55), rgba(232,190,120,0) 70%), linear-gradient(180deg, #EFE3CE 0%, #E6D5BA 100%); }
.cv-scene svg { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 74%; height: auto; }
.cv-flame { transform-origin: 50% 100%; animation: cv-flicker 3.8s ease-in-out infinite; }
@keyframes cv-flicker { 0%,100% { transform: scale(1, 1) rotate(0); } 30% { transform: scale(.97, 1.04) rotate(-1.5deg); } 60% { transform: scale(1.02, .97) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .cv-flame { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Category tiles ---------- */
.cv-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.cv-cat { display: block; color: var(--cv-charcoal); text-decoration: none; }
.cv-cat .cv-arch__frame { aspect-ratio: 3 / 4; }
.cv-cat .cv-arch__frame, .cv-cat .cv-arch::after { border-radius: 50% 50% 0 0 / 37.5% 37.5% 0 0; }
.cv-cat__title { font-family: var(--cv-font-display); font-size: var(--cv-step-2); margin: var(--cv-space-4) 0 var(--cv-space-1); }
.cv-cat__desc { color: var(--cv-smoke); font-size: 0.9375rem; margin: 0; }
.cv-cat:hover .cv-cat__title { color: var(--cv-terracotta); }
.cv-cat .cv-arch__frame img { transition: transform .8s var(--cv-ease); }
.cv-cat:hover .cv-arch__frame img { transform: scale(1.03); }
@media (max-width: 767.98px) { .cv-cats { grid-template-columns: 1fr 1fr; } .cv-cats > :last-child { grid-column: 1 / -1; } .cv-cats > :last-child .cv-arch__frame { aspect-ratio: 16 / 9; } .cv-cats > :last-child .cv-arch__frame, .cv-cats > :last-child .cv-arch::after { border-radius: var(--cv-radius-md); } }
.cv-tile-art { width: 100%; height: 100%; display: grid; place-items: center; }
.cv-tile-art svg { width: 46%; height: auto; }

/* ---------- Fragrance families ---------- */
.cv-families { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--cv-sandstone); }
.cv-family { display: block; padding: var(--cv-space-4) var(--cv-space-3) var(--cv-space-4) 0; border-bottom: 1px solid var(--cv-sandstone); color: var(--cv-charcoal); text-decoration: none; }
.cv-family + .cv-family { padding-left: var(--cv-space-3); border-left: 1px solid var(--cv-sandstone); }
.cv-family__name { font-family: var(--cv-font-display); font-size: var(--cv-step-1); display: block; margin-bottom: var(--cv-space-2); }
.cv-family__notes { font-size: 0.9375rem; color: var(--cv-smoke); }
.cv-family:hover .cv-family__name { color: var(--cv-terracotta); }
@media (max-width: 991.98px) { .cv-families { grid-template-columns: 1fr 1fr; } .cv-family + .cv-family { border-left: 0; padding-left: 0; } .cv-family:nth-child(even) { padding-left: var(--cv-space-3); border-left: 1px solid var(--cv-sandstone); } }

/* ---------- Product card (used from Phase 2) ---------- */
.cv-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--cv-space-5) var(--cv-space-4); }
@media (max-width: 991.98px) { .cv-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .cv-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--cv-space-4) var(--cv-space-3); } }
.cv-card { position: relative; display: flex; flex-direction: column; }
.cv-card__media { position: relative; aspect-ratio: 4 / 5; background: var(--cv-parchment); border-radius: var(--cv-radius-md); overflow: hidden; }
.cv-card__media img { width: 100%; height: 100%; object-fit: cover; }
.cv-card__badges { position: absolute; top: var(--cv-space-2); left: var(--cv-space-2); display: flex; gap: var(--cv-space-1); }
.cv-card__title { font-family: var(--cv-font-display); font-size: 1.125rem; margin: var(--cv-space-3) 0 var(--cv-space-1); }
.cv-card__title a { color: var(--cv-charcoal); text-decoration: none; }
.cv-card__title a::after { content: ""; position: absolute; inset: 0; }
.cv-card__meta { font-size: var(--cv-step--1); color: var(--cv-smoke); margin: 0; }
.cv-price { font-weight: 500; }
.cv-price del { color: var(--cv-smoke); font-weight: 400; margin-left: var(--cv-space-2); }

/* ---------- Story ---------- */
.cv-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.cv-story__quote { font-family: var(--cv-font-display); font-size: var(--cv-step-3); line-height: 1.2; margin: 0; }
@media (max-width: 767.98px) { .cv-story { grid-template-columns: 1fr; } }

/* ---------- Empty states ---------- */
.cv-empty { text-align: center; padding: var(--cv-space-7) var(--cv-space-3); border: 1px dashed var(--cv-sandstone); border-radius: var(--cv-radius-md); }
.cv-empty h2, .cv-empty h3 { font-size: var(--cv-step-2); }
.cv-empty p { margin-inline: auto; color: var(--cv-smoke); }

/* ---------- Page header + breadcrumbs ---------- */
.cv-page-head { padding-block: var(--cv-space-6) var(--cv-space-5); border-bottom: 1px solid var(--cv-sandstone); }
.cv-page-head h1 { font-size: var(--cv-step-3); margin: 0; }
.cv-crumbs { font-size: var(--cv-step--1); margin-bottom: var(--cv-space-3); }
.cv-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--cv-space-2); padding: 0; margin: 0; }
.cv-crumbs li + li::before { content: "/"; margin-right: var(--cv-space-2); color: var(--cv-brass); }
.cv-crumbs a { color: var(--cv-smoke); text-decoration: none; }
.cv-crumbs a:hover { color: var(--cv-terracotta); }

/* ---------- Prose (policy/about pages) ---------- */
.cv-prose { max-width: 70ch; }
.cv-prose h2 { font-size: var(--cv-step-2); margin-top: var(--cv-space-6); }
.cv-prose h3 { font-size: var(--cv-step-1); font-family: var(--cv-font-body); font-weight: 500; margin-top: var(--cv-space-5); }
.cv-prose li { margin-bottom: var(--cv-space-2); }
.cv-prose .cv-tbc { background: #FFF4D6; border-bottom: 1px dashed var(--cv-brass); padding: 0 .2em; }

/* ---------- FAQ (native details) ---------- */
.cv-faq details { border-bottom: 1px solid var(--cv-sandstone); }
.cv-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--cv-space-3); padding: var(--cv-space-4) 0; font-family: var(--cv-font-display); font-size: var(--cv-step-1); }
.cv-faq summary::-webkit-details-marker { display: none; }
.cv-faq summary::after { content: "+"; font-family: var(--cv-font-body); font-weight: 300; font-size: 1.5rem; line-height: 1; color: var(--cv-brass); transition: transform .2s var(--cv-ease); }
.cv-faq details[open] summary::after { transform: rotate(45deg); }
.cv-faq .cv-faq__a { padding-bottom: var(--cv-space-4); color: var(--cv-smoke); }

/* ---------- Newsletter band + footer ---------- */
.cv-band { background: var(--cv-charcoal); color: var(--cv-ivory); }
.cv-band h2 { color: var(--cv-ivory); }
.cv-band .cv-muted, .cv-band .cv-help { color: #CFC5B8; }
.cv-band .cv-check { color: #E8DFD2; }
.cv-band .cv-input { background: transparent; color: var(--cv-ivory); border-color: #5A514B; }
.cv-band .cv-input::placeholder { color: #A99E92; }
.cv-band .cv-input:focus { border-color: var(--cv-brass-soft); box-shadow: 0 0 0 3px rgba(205,178,124,.2); }
.cv-band a { color: var(--cv-brass-soft); }
.cv-signup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--cv-space-2); }
@media (max-width: 575.98px) { .cv-signup { grid-template-columns: 1fr; } }

.cv-footer { background: var(--cv-charcoal); color: #D9D0C4; font-size: 0.9375rem; padding-block: var(--cv-space-7) var(--cv-space-5); border-top: 1px solid #423A35; }
.cv-footer h2 { font-family: var(--cv-font-body); font-weight: 500; font-size: 0.9375rem; color: var(--cv-ivory); margin-bottom: var(--cv-space-3); }
.cv-footer ul { list-style: none; padding: 0; margin: 0; }
.cv-footer li { margin-bottom: var(--cv-space-2); }
.cv-footer a { color: #D9D0C4; text-decoration: none; }
.cv-footer a:hover { color: var(--cv-brass-soft); text-decoration: underline; }
.cv-footer address { font-style: normal; }
.cv-footer__logo { width: 200px; height: auto; margin-bottom: var(--cv-space-4); }
.cv-footer__base { margin-top: var(--cv-space-6); padding-top: var(--cv-space-4); border-top: 1px solid #423A35; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--cv-space-3); font-size: var(--cv-step--1); color: #A99E92; }

/* ---------- Cookie notice ---------- */
.cv-cookie { position: fixed; inset: auto var(--cv-space-3) var(--cv-space-3) var(--cv-space-3); z-index: 1080; max-width: 560px; padding: var(--cv-space-4); background: var(--cv-ivory); border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-md); box-shadow: 0 12px 40px rgba(42,37,34,.14); }
.cv-cookie[hidden] { display: none; }

/* ---------- Styleguide helpers ---------- */
.cv-swatch { border-radius: var(--cv-radius-md); border: 1px solid var(--cv-sandstone); overflow: hidden; }
.cv-swatch span { display: block; height: 72px; }
.cv-swatch p { margin: 0; padding: var(--cv-space-2) var(--cv-space-3); font-size: var(--cv-step--1); }

/* ---------- Listing filters + pager ---------- */
.cv-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--cv-space-3); align-items: end; padding-bottom: var(--cv-space-4); margin-bottom: var(--cv-space-4); border-bottom: 1px solid var(--cv-sandstone); }
.cv-filters .cv-label { margin-bottom: var(--cv-space-1); }
.cv-filters__actions { display: flex; gap: var(--cv-space-3); align-items: center; }
@media (max-width: 767.98px) { .cv-filters { grid-template-columns: 1fr 1fr; } .cv-filters__price, .cv-filters__actions { grid-column: 1 / -1; } }
.cv-pager { display: flex; justify-content: center; align-items: center; gap: var(--cv-space-4); margin-top: var(--cv-space-6); }

/* ---------- Product detail ---------- */
.cv-pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 767.98px) { .cv-pdp { grid-template-columns: 1fr; } }
.cv-gallery__main { position: relative; aspect-ratio: 4 / 5; border-radius: var(--cv-radius-md); overflow: hidden; background: var(--cv-parchment); }
.cv-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-gallery__thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--cv-space-2); padding: 0; margin: var(--cv-space-3) 0 0; }
.cv-thumb { padding: 0; border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-sm); background: none; overflow: hidden; width: 72px; aspect-ratio: 4 / 5; }
.cv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-thumb[aria-pressed="true"] { border-color: var(--cv-charcoal); }
.cv-pdp__info { position: sticky; top: 100px; }
@media (max-width: 767.98px) { .cv-pdp__info { position: static; } }
.cv-pdp__title { font-size: var(--cv-step-3); margin-bottom: var(--cv-space-3); }
.cv-pdp__price { font-size: var(--cv-step-1); font-weight: 500; margin-bottom: var(--cv-space-4); }
.cv-pdp__price del { color: var(--cv-smoke); font-weight: 400; margin-left: var(--cv-space-2); font-size: 1rem; }
.cv-options { border: 0; padding: 0; margin: 0 0 var(--cv-space-4); display: flex; flex-wrap: wrap; gap: var(--cv-space-2); }
.cv-options legend { float: none; width: 100%; }
.cv-option { position: relative; cursor: pointer; }
.cv-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cv-option span { display: inline-block; padding: .65rem 1.1rem; border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-sm); background: var(--cv-white); font-size: .9375rem; }
.cv-option input:checked + span { border-color: var(--cv-charcoal); box-shadow: inset 0 0 0 1px var(--cv-charcoal); }
.cv-option input:focus-visible + span { box-shadow: var(--cv-focus); }
.cv-stock { font-size: var(--cv-step--1); margin-bottom: var(--cv-space-3); }
.cv-stock::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .5rem; vertical-align: middle; background: var(--cv-success); }
.cv-stock--low::before { background: var(--cv-brass); }
.cv-stock--soldout::before { background: var(--cv-smoke); }
.cv-specs { display: grid; grid-template-columns: max-content 1fr; gap: var(--cv-space-1) var(--cv-space-4); margin: 0; }
.cv-specs dt { font-weight: 500; color: var(--cv-charcoal); }
.cv-specs dd { margin: 0; }
.cv-specs [hidden] { display: none; }

/* ---------- Account, cart, checkout, orders ---------- */
.cv-acct { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 767.98px) { .cv-acct { grid-template-columns: 1fr; } }
.cv-acct-nav ul { list-style: none; padding: 0; margin: 0; }
.cv-acct-nav a { display: block; padding: .55rem 0; color: var(--cv-charcoal); text-decoration: none; border-bottom: 1px solid var(--cv-sandstone); }
.cv-acct-nav a[aria-current="page"] { color: var(--cv-terracotta); }
@media (max-width: 767.98px) { .cv-acct-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; } .cv-acct-nav a { border: 0; padding: .25rem 0; } }
.cv-panel { background: var(--cv-white); border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-md); padding: var(--cv-space-4); }
.cv-table { width: 100%; border-collapse: collapse; }
.cv-table th, .cv-table td { padding: .7rem .5rem; border-bottom: 1px solid var(--cv-sandstone); text-align: left; }
.cv-table th { font-weight: 500; font-size: var(--cv-step--1); color: var(--cv-smoke); }
.cv-table .num { text-align: right; }
.cv-addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--cv-space-3); }
.cv-cart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (max-width: 991.98px) { .cv-cart { grid-template-columns: 1fr; } }
.cv-cart__summary { position: sticky; top: 100px; }
@media (max-width: 991.98px) { .cv-cart__summary { position: static; } }
.cv-cart__lines { list-style: none; padding: 0; margin: 0 0 var(--cv-space-4); border-top: 1px solid var(--cv-sandstone); }
.cv-cart__line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--cv-space-3); padding: var(--cv-space-3) 0; border-bottom: 1px solid var(--cv-sandstone); align-items: start; }
.cv-cart__line.is-problem { background: #FBEFE9; }
.cv-cart__img { position: relative; width: 96px; aspect-ratio: 4/5; border-radius: var(--cv-radius-sm); overflow: hidden; background: var(--cv-parchment); }
.cv-cart__img img { width: 100%; height: 100%; object-fit: cover; }
.cv-cart__info { display: flex; flex-direction: column; }
.cv-cart__info a { color: var(--cv-charcoal); text-decoration: none; }
.cv-qty { width: 84px; }
.cv-buy__row { display: flex; gap: var(--cv-space-2); }
.cv-buy__row .cv-btn { flex: 1; }
.cv-totals { display: grid; grid-template-columns: 1fr auto; gap: .35rem var(--cv-space-3); margin: var(--cv-space-3) 0 0; }
.cv-totals dt { font-weight: 400; }
.cv-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cv-totals__grand { font-weight: 500; font-size: var(--cv-step-1); padding-top: .5rem; border-top: 1px solid var(--cv-sandstone); }
.cv-totals__note { font-size: var(--cv-step--1); color: var(--cv-smoke); }
.cv-lines { list-style: none; padding: 0; margin: 0; }
.cv-lines li { display: flex; justify-content: space-between; gap: var(--cv-space-3); padding: .7rem 0; border-bottom: 1px solid var(--cv-sandstone); }
.cv-lines--compact li { padding: .4rem 0; font-size: .9375rem; }
.cv-choices { border: 0; padding: 0; margin: 0; display: grid; gap: var(--cv-space-2); }
.cv-choice { display: flex; gap: var(--cv-space-3); align-items: flex-start; padding: var(--cv-space-3); border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-sm); background: var(--cv-white); cursor: pointer; }
.cv-choice input { margin-top: .3rem; accent-color: var(--cv-terracotta); }
.cv-choice:has(input:checked) { border-color: var(--cv-charcoal); box-shadow: inset 0 0 0 1px var(--cv-charcoal); }
.cv-choice.is-disabled { opacity: .6; cursor: not-allowed; }
.cv-progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin: 0 0 var(--cv-space-4); counter-reset: s; }
.cv-progress li { position: relative; padding-top: 1.5rem; font-size: var(--cv-step--1); color: var(--cv-smoke); }
.cv-progress li::before { content: ""; position: absolute; top: .45rem; left: 0; right: 0; height: 2px; background: var(--cv-sandstone); }
.cv-progress li::after { content: ""; position: absolute; top: 0; left: 0; width: 1rem; height: 1rem; border-radius: 50%; background: var(--cv-ivory); border: 2px solid var(--cv-sandstone); }
.cv-progress li.is-done { color: var(--cv-charcoal); }
.cv-progress li.is-done::before { background: var(--cv-brass); }
.cv-progress li.is-done::after { background: var(--cv-brass); border-color: var(--cv-brass); }
.cv-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--cv-space-4); }
.cv-review { margin: 0; padding: var(--cv-space-4); background: var(--cv-white); border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-md); }
.cv-stars { color: var(--cv-brass); letter-spacing: .1em; margin-bottom: .25rem; }
.cv-products--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767.98px) { .cv-products--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cv-btn--danger { background: transparent; color: var(--cv-danger); border-color: var(--cv-danger); }
.cv-btn--danger:hover { background: var(--cv-danger); color: var(--cv-white); }
[hidden] { display: none !important; }

/* ---------- Order page: payment, shipment timeline ---------- */
.cv-pay { border-color: var(--cv-brass-soft); background: #FFFCF5; }
.cv-timeline { list-style: none; margin: 0 0 var(--cv-space-3); padding: 0 0 0 var(--cv-space-4); border-left: 1px solid var(--cv-sandstone); }
.cv-timeline li { position: relative; margin-bottom: var(--cv-space-3); }
.cv-timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--cv-space-4) - 4px); top: .45em; width: 7px; height: 7px; border-radius: 50%; background: var(--cv-brass); }
.cv-timeline li:first-child::before { background: var(--cv-terracotta); }

/* Layout utilities (replace inline style attributes so the Content Security Policy can forbid them) */
.cv-maxw-360 { max-width: 360px; }
.cv-maxw-440 { max-width: 440px; }
.cv-maxw-480 { max-width: 480px; }
.cv-maxw-520 { max-width: 520px; }
.cv-maxw-640 { max-width: 640px; }
.cv-maxw-720 { max-width: 720px; }
.cv-maxw-760 { max-width: 760px; }
.cv-w-auto { width: auto; }
.cv-w-90 { width: 90px; }
.cv-pre { white-space: pre-wrap; }
.cv-upper input { text-transform: uppercase; }
.cv-ratio-5-4 { aspect-ratio: 5 / 4; }
.cv-flame--1 { animation-delay: -0.9s; }
.cv-flame--2 { animation-delay: -1.8s; }
.cv-flame--3 { animation-delay: -2.7s; }
.cv-email-preview { width: 100%; min-height: 720px; border: 1px solid var(--cv-sandstone); border-radius: var(--cv-radius-md); background: #fff; }
code { color: var(--cv-terracotta-deep); }
