/* ==========================================================================
   Brico — pages.css
   Page scaffolding, hero, catalog, product, cart, checkout look, blog,
   account area, auth, content and error pages.
   Depends on theme.css for tokens and primitives.
   ========================================================================== */

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--sp-8); }
@media (min-width: 960px) { .section { padding-block: var(--sp-9); } }
.section--tight { padding-block: var(--sp-6); }
.section--paper { background: var(--c-paper); }

.section-title { margin-bottom: var(--sp-5); }
.section-title h2 { margin-bottom: var(--sp-1); }
.section-title p { color: var(--c-muted); }
.section-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--sp-1);
  max-width: none;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.section-head .section-title { margin-bottom: 0; }
.section-link { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; font-weight: 700; }
.section-link .icon { width: 16px; height: 16px; transition: transform var(--tr); }
.section-link:hover .icon { transform: translateX(3px); }

.page-head { padding-block: var(--sp-6) var(--sp-5); }
.page-head .crumbs { margin-bottom: var(--sp-3); }
.page-head__sub { margin-top: var(--sp-2); color: var(--c-muted); }

/* ---------- Generic grids ---------- */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--sp-5);
}
@media (min-width: 640px) { .grid-products { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--sp-4);
}
.grid-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 640px) { .grid-blog { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .grid-blog { grid-template-columns: repeat(3, 1fr); } }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } }
.split--wide { grid-template-columns: 1fr; }
@media (min-width: 960px) { .split--wide { grid-template-columns: 1.5fr 1fr; } }

/* Sidebar layout (listings, blog) */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: start;
  padding-bottom: var(--sp-9);
}
/* Grid children must be allowed to shrink: a wide table inside a column would
   otherwise push the whole document past the viewport. */
.layout-sidebar > *,
.split > *,
.account-layout > *,
.account > *,
.order-grid > *,
.product-view > *,
.cart-page-grid > * { min-width: 0; }
@media (min-width: 960px) {
  .layout-sidebar { grid-template-columns: 260px 1fr; }
  .layout-sidebar > aside { position: sticky; top: 140px; }
}
.layout-sidebar--right { grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .layout-sidebar--right { grid-template-columns: 1fr 280px; }
  .layout-sidebar--right > aside { position: sticky; top: 140px; }
}
.layout-sidebar.layout-sidebar--full { grid-template-columns: 1fr; }

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--sp-8);
  background: radial-gradient(1100px 480px at 85% -10%, var(--c-primary-soft), transparent 65%);
}
@media (min-width: 960px) { .hero { padding-block: var(--sp-10); } }
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-1);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-primary-dark);
  margin-bottom: var(--sp-4);
}
.hero__lead { margin-block: var(--sp-4) var(--sp-6); font-size: 1.08rem; color: var(--c-muted); max-width: 54ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero-collage { position: relative; aspect-ratio: 1 / 0.9; }
.hero-collage .ph {
  position: absolute;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  border: 4px solid #fff;
  overflow: hidden;
}
.hero-collage .ph:nth-child(1) { width: 62%; left: 0; top: 8%; z-index: 1; }
.hero-collage .ph:nth-child(2) { width: 46%; right: 4%; top: 0; z-index: 2; }
.hero-collage .ph:nth-child(3) { width: 52%; right: 12%; bottom: 4%; z-index: 3; }
.hero-collage .ph:nth-child(4) { width: 38%; left: 8%; bottom: 0; z-index: 4; }
/* A tile that shows a product: the photo fills the box and the whole box links
   to the product page. A tile without a product keeps the decorative .ph tone. */
.hero-tile { transition: transform var(--tr), box-shadow var(--tr); }
.hero-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.hero-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(33, 37, 41, 0.18); }
.hero-tile:hover img { transform: scale(1.04); }
.hero-main { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); }
.hero-main img { width: 100%; aspect-ratio: 1 / 0.9; object-fit: cover; }

/* ---------- Hero slider (section hero-slider) ---------- */
/* Full-width slideshow offered as an alternative to the two-column .hero above.
   Same contract as Arbor (.hs-track, .hs-slide states, arrows, dots) drawn with
   Brico's ink/primary palette and its button radius. The theme ships no image,
   so a slide without a picture keeps the section ground instead of inventing
   one. Without JavaScript the track stays a native horizontal scroller and the
   controls ship hidden; app.js stacks the slides and drives the transition. */

.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--c-ink);
  color: #fff;
  --hs-duration: 600ms;
  /* Veil drawn by .hs-scrim: Brico's ink on light slides, its paper on dark
     ones, so the copy always has a ground to sit on. */
  --hs-veil: 33, 37, 41;
}
/* A dark tone paints the ink copy of the theme: the ground turns to paper so a
   slide without a picture stays readable. */
.hero-slider--tone-dark { background: var(--c-paper); }
.hero-slider--compact { --hs-height: clamp(320px, 42vh, 440px); }
.hero-slider--medium { --hs-height: clamp(420px, 56vh, 580px); }
.hero-slider--tall { --hs-height: clamp(500px, 74vh, 740px); }

.hero-slider .hs-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero-slider .hs-track::-webkit-scrollbar { display: none; }
.hero-slider .hs-track:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.hero-slider .hs-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: var(--hs-height);
  display: grid;
  align-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding-block: var(--sp-9);
  overflow: hidden;
}
.hero-slider .hs-slide--dark { --hs-veil: 248, 249, 250; color: var(--c-ink); }

.hero-slider .hs-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slider .hs-slide--focal-top .hs-media { object-position: 50% 18%; }
.hero-slider .hs-slide--focal-bottom .hs-media { object-position: 50% 82%; }

.hero-slider .hs-scrim { position: absolute; inset: 0; }
.hero-slider .hs-scrim--soft { background: linear-gradient(100deg, rgba(var(--hs-veil), .8) 0%, rgba(var(--hs-veil), .48) 46%, rgba(var(--hs-veil), .08) 100%); }
.hero-slider .hs-scrim--strong { background: rgba(var(--hs-veil), .82); }
.hero-slider .hs-scrim--none { background: none; }
/* Centred copy reads better with the veil falling from the top. */
.hero-slider .hs-slide--center .hs-scrim--soft { background: linear-gradient(180deg, rgba(var(--hs-veil), .28) 0%, rgba(var(--hs-veil), .64) 100%); }

.hero-slider .hs-container { position: relative; }
.hero-slider .hs-inner { max-width: 620px; }
.hero-slider .hs-slide--center .hs-inner { max-width: 780px; margin-inline: auto; text-align: center; }

.hero-slider .hs-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-slider .hs-slide--dark .hs-eyebrow { background: rgba(33, 37, 41, .07); color: var(--c-ink); }

.hero-slider .hs-slide .hs-title {
  font-size: clamp(2.1rem, 1.4rem + 2.9vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: var(--sp-4) 0 0;
  color: inherit;
}
.hero-slider .hs-slide--center .hs-title { margin-inline: auto; }
.hero-slider .hs-slide .hs-text { font-size: 1.06rem; line-height: 1.7; opacity: .92; max-width: 52ch; margin-top: var(--sp-3); }
.hero-slider .hs-slide--center .hs-text { margin-inline: auto; }
.hero-slider .hs-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-7); }
.hero-slider .hs-slide--center .hs-ctas { justify-content: center; }

/* The template's own buttons, inverted for a photo: paper primary on the ink
   veil, ink primary once the slide carries light copy. */
.hero-slider .hs-ctas .btn-primary { background: #fff; color: var(--c-ink); }
.hero-slider .hs-ctas .btn-primary:hover { background: var(--c-primary); color: #fff; }
.hero-slider .hs-ctas .btn-outline { border-color: rgba(255, 255, 255, .55); color: #fff; }
.hero-slider .hs-ctas .btn-outline:hover { background: #fff; border-color: #fff; color: var(--c-ink); }
.hero-slider .hs-slide--dark .hs-ctas .btn-primary { background: var(--c-primary); color: #fff; }
.hero-slider .hs-slide--dark .hs-ctas .btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.hero-slider .hs-slide--dark .hs-ctas .btn-outline { border-color: rgba(33, 37, 41, .38); color: var(--c-ink); }
.hero-slider .hs-slide--dark .hs-ctas .btn-outline:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }

.hero-slider .hs-nav { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-slider .hs-nav[hidden], .hero-slider .hs-dots[hidden] { display: none; }
.hero-slider .hs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--r-pill);
  background: rgba(33, 37, 41, .28);
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background var(--tr), border-color var(--tr);
}
.hero-slider .hs-arrow:hover { background: var(--c-primary); border-color: var(--c-primary); }
.hero-slider .hs-arrow .icon { width: 20px; height: 20px; }
.hero-slider .hs-arrow--prev { left: var(--sp-5); }
.hero-slider .hs-arrow--next { right: var(--sp-5); }
/* Dark tone: the ground is paper, so the arrows turn ink like the dots do. */
.hero-slider--tone-dark .hs-arrow { border-color: rgba(33, 37, 41, .35); background: rgba(255, 255, 255, .72); color: var(--c-ink); }
.hero-slider--tone-dark .hs-arrow:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.hero-slider .hs-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--sp-5);
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-slider .hs-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width var(--tr), background var(--tr);
}
.hero-slider .hs-dot:hover { background: rgba(255, 255, 255, .8); }
.hero-slider .hs-dot[aria-current="true"] { width: 26px; background: var(--c-primary); }
.hero-slider--tone-dark .hs-dot { background: rgba(33, 37, 41, .3); }
.hero-slider--tone-dark .hs-dot:hover { background: rgba(33, 37, 41, .5); }
.hero-slider--tone-dark .hs-dot[aria-current="true"] { background: var(--c-primary); }

/* app.js stacks the slides and drives the transition itself; until it runs (and
   without JavaScript) the track above stays a native horizontal scroller. */
.hero-slider[data-hs-mode] .hs-track { display: grid; overflow: hidden; touch-action: pan-y; }
.hero-slider[data-hs-mode] .hs-slide {
  grid-area: 1 / 1;
  transition: transform var(--hs-duration) ease, opacity var(--hs-duration) ease;
  will-change: transform, opacity;
  pointer-events: none;
}
.hero-slider[data-hs-mode] .hs-slide[data-hs-state="active"] { pointer-events: auto; z-index: 2; }
.hero-slider[data-hs-booting] .hs-slide { transition: none; }

/* Horizontal: the entering slide waits on the right. */
.hero-slider[data-hs-mode="horizontal"] .hs-slide { transform: translateX(100%); }
.hero-slider[data-hs-mode="horizontal"] .hs-slide[data-hs-state="prev"] { transform: translateX(-100%); }
.hero-slider[data-hs-mode="horizontal"] .hs-slide[data-hs-state="active"] { transform: none; }

/* Vertical: the entering slide waits above, so the slideshow moves downwards. */
.hero-slider[data-hs-mode="vertical"] .hs-slide { transform: translateY(-100%); }
.hero-slider[data-hs-mode="vertical"] .hs-slide[data-hs-state="prev"] { transform: translateY(100%); }
.hero-slider[data-hs-mode="vertical"] .hs-slide[data-hs-state="active"] { transform: none; }

/* Fade: every slide shares the same box and only the active one is opaque. */
.hero-slider[data-hs-mode="fade"] .hs-slide { opacity: 0; }
.hero-slider[data-hs-mode="fade"] .hs-slide[data-hs-state="active"] { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-slider .hs-track { scroll-behavior: auto; }
  .hero-slider .hs-dot { transition: none; }
  /* The shared reduced-motion rule of the theme keeps a 0.01ms duration for
     everything; the slideshow is instant instead. */
  .hero-slider[data-hs-mode] .hs-slide { transition-duration: 0s !important; }
}

@media (max-width: 860px) {
  /* The copy spans the full width here, so the soft veil falls vertically
     instead of fading out under the last lines. */
  .hero-slider .hs-slide--left .hs-scrim--soft { background: linear-gradient(180deg, rgba(var(--hs-veil), .34) 0%, rgba(var(--hs-veil), .72) 100%); }
  .hero-slider .hs-arrow { display: none; }
  .hero-slider .hs-dots { bottom: var(--sp-4); }
}

@media (max-width: 640px) {
  .hero-slider .hs-slide { padding-block: var(--sp-8); }
  .hero-slider .hs-inner, .hero-slider .hs-slide--center .hs-inner { max-width: none; }
  .hero-slider .hs-slide .hs-title { font-size: clamp(1.8rem, 8vw, 2.4rem); max-width: none; }
  .hero-slider .hs-slide .hs-text { font-size: 1rem; }
  .hero-slider .hs-ctas { margin-top: var(--sp-6); }
  .hero-slider .hs-ctas .btn { flex: 1 1 auto; }
}

/* ---------- Trust row ---------- */
.trust-row { border-block: 1px solid var(--c-line); background: var(--c-surface); }
.trust-row__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  padding-block: var(--sp-6);
}
@media (min-width: 960px) { .trust-row__grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: var(--sp-3); }
.trust-item .icon { flex: 0 0 auto; width: 30px; height: 30px; color: var(--c-primary); }
.trust-item b { display: block; font-size: 0.92rem; }
.trust-item span { font-size: 0.8rem; color: var(--c-muted); }

/* ---------- Category card ---------- */
.card-category {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  color: var(--c-ink);
  transition: box-shadow var(--tr), transform var(--tr), border-color var(--tr), color var(--tr);
}
.card-category:hover {
  box-shadow: var(--sh-2);
  transform: translateY(-3px);
  color: var(--c-primary);
  border-color: var(--c-line-strong);
}
.card-category__media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f1f3f5; }
.card-category__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card-category:hover .card-category__media img { transform: scale(1.05); }
.card-category__media .icon { position: absolute; inset: 0; width: 44px; height: 44px; margin: auto; color: var(--c-primary); }
.card-category__body { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-4); }
.card-category__name { font-weight: 700; }
.card-category__count { font-size: 0.8rem; color: var(--c-muted); }

/* ---------- Banner CTA ---------- */
.banner-cta {
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  background: linear-gradient(120deg, var(--c-ink) 0%, #343a40 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.banner-cta h2 { color: #fff; }
.banner-cta p { color: rgba(255, 255, 255, 0.75); margin-block: var(--sp-3) var(--sp-5); }
.banner-cta .ph { width: 220px; justify-self: end; box-shadow: var(--sh-2); transform: rotate(3deg); }
.banner-cta--accent { background: linear-gradient(120deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); }
.banner-cta .coupon-form { max-width: 420px; }
.banner-cta .input { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.banner-cta .input::placeholder { color: rgba(255, 255, 255, 0.65); }
.banner-cta .btn-primary { background: #fff; color: var(--c-ink); }
.banner-cta .btn-primary:hover { background: var(--c-paper); color: var(--c-ink); }
.banner-cta--accent .btn-primary { background: #fff; color: var(--c-primary-dark); }

/* ---------- Post card ---------- */
.card-post {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr);
}
.card-post:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.card-post__media { display: block; position: relative; color: inherit; background: var(--c-paper); }
.card-post__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-post__media .ph { border-radius: 0; aspect-ratio: 16 / 10; }
.card-post__media .ph svg { width: 34%; }
.card-post__chip {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  box-shadow: var(--sh-1);
}
.card-post__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); flex: 1; }
.card-post__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.78rem; color: var(--c-muted); }
.card-post__meta li + li::before { content: "·"; margin-right: var(--sp-2); }
.card-post__title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.card-post__title:hover { color: var(--c-primary); }
.card-post__excerpt {
  font-size: 0.88rem;
  color: var(--c-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-post__foot { margin-top: auto; padding-top: var(--sp-2); font-size: 0.85rem; font-weight: 700; }

/* ---------- Prose (article / content page) ---------- */
.prose { max-width: 76ch; font-size: 1.02rem; }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { margin-top: var(--sp-8); font-size: 1.5rem; }
.prose h3 { margin-top: var(--sp-6); }
.prose ul, .prose ol { padding-left: 1.4rem; display: grid; gap: var(--sp-2); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--c-primary); font-weight: 700; }
.prose blockquote {
  padding: var(--sp-5);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--c-primary-soft);
  font-weight: 600;
  font-size: 1.08rem;
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Catalog toolbar ---------- */
.sortbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
}
.sortbar__count { font-size: 0.9rem; color: var(--c-muted); max-width: none; }
.sortbar__control { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.88rem; }
.sortbar__control .select { padding-block: 0.35rem; padding-inline: 0.7rem 2rem; font-size: 0.88rem; width: auto; }

/* ---------- Filters (sidebar) ---------- */
.filters { display: grid; gap: var(--sp-6); }
.filter-group { border-bottom: 1px solid var(--c-line); padding-bottom: var(--sp-5); }
.filter-group:last-child { border-bottom: none; }
.filter-group__title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
}
.filter-group ul { display: grid; gap: 1px; }
.filter-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--c-muted);
}
.filter-group a:hover { background: var(--c-paper); color: var(--c-primary); }
.filter-group a[aria-current] { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 700; }
.filter-group a > span { font-size: 0.78rem; color: var(--c-muted); }
.filter-group .filter-sub { padding-left: var(--sp-4); }
.filter-group .filter-sub a { font-size: 0.85rem; }
.filter-group--inline ul { grid-template-columns: 1fr 1fr; }
.filters-form { display: block; }
.filter-options {
  display: grid;
  gap: 1px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--c-muted);
  cursor: pointer;
  transition: background-color var(--tr), color var(--tr);
}
.filter-check:hover { background: var(--c-paper); color: var(--c-primary); }
.filter-check.is-active { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 700; }
.filter-check input[type="checkbox"] {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--c-primary);
  cursor: pointer;
}
.filter-check__swatch {
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--swatch, var(--c-surface));
  border: 1px solid var(--c-line-strong);
}
.filter-check__label { flex: 1; min-width: 0; }
.filter-check__count { flex: none; font-size: 0.78rem; color: var(--c-muted); font-weight: 400; }
.filters-apply { width: 100%; margin-top: var(--sp-3); }
.filters-clear {
  display: inline-flex;
  margin-top: var(--sp-3);
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-primary);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filters-clear:hover { color: var(--c-primary-dark); }

/* ---------- Quantity stepper ---------- */
.qty-stepper, .qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-surface);
}
.qty-stepper button, .qty button {
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-ink);
  transition: background var(--tr), color var(--tr);
}
.qty-stepper button:hover, .qty button:hover { background: var(--c-paper); color: var(--c-primary); }
.qty-stepper input, .qty input {
  width: 44px;
  height: 38px;
  text-align: center;
  font-weight: 700;
  border: none;
  border-inline: 1px solid var(--c-line);
  -moz-appearance: textfield;
  appearance: textfield;
  background: transparent;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty button .icon, .qty-stepper button .icon { width: 15px; height: 15px; }
.qty-sm button { width: 27px; height: 27px; }
.qty-sm button .icon { width: 12px; height: 12px; }
.qty-sm input { width: 34px; height: 27px; font-size: 0.85rem; }

/* ---------- Cart ---------- */
.cart-list { display: grid; gap: var(--sp-4); }
.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
}
@media (max-width: 639px) { .cart-item { grid-template-columns: 64px 1fr; } .cart-item__total { grid-column: 2; text-align: left; } }
.cart-item__media .ph { aspect-ratio: 1 / 0.86; }
.cart-item__media img { width: 100%; aspect-ratio: 1 / 0.86; object-fit: cover; border-radius: var(--r-sm); }
.cart-item__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item__title { font-weight: 700; color: var(--c-ink); }
.cart-item__title:hover { color: var(--c-primary); }
.cart-item__unit { font-size: 0.85rem; color: var(--c-muted); }
.cart-item__actions { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-2); flex-wrap: wrap; }
.cart-item__remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: color var(--tr);
}
.cart-item__remove:hover { color: var(--c-danger); }
.cart-item__remove .icon { width: 15px; height: 15px; }
.cart-item__total { font-weight: 800; font-size: 1.02rem; text-align: right; }

/* ---------- Summary card ---------- */
.summary-card {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  background: var(--c-surface);
  display: grid;
  gap: var(--sp-3);
}
.summary-card h2 { font-size: 1.15rem; }
.summary-row { display: flex; justify-content: space-between; gap: var(--sp-4); font-size: 0.94rem; }
.summary-row span:last-child { font-weight: 600; }
.summary-row--total { padding-top: var(--sp-3); border-top: 1px solid var(--c-line); font-size: 1.05rem; font-weight: 800; }
.summary-row--discount span:last-child { color: var(--c-success); }
.summary-note { font-size: 0.78rem; color: var(--c-muted); max-width: none; }
.coupon-form { display: flex; gap: var(--sp-2); padding-top: var(--sp-2); }
/* In a flex row the field must give up its 100% width, or the button wraps. */
.coupon-form .input,
.footer__news .input,
.search-page-form .input { flex: 1 1 auto; width: auto; min-width: 0; }
.sticky-aside { position: sticky; top: 140px; }
@media (max-width: 959px) { .sticky-aside { position: static; } }

/* ---------- Checkout look (design reference; platform markup is themed by assets/checkout.css) ---------- */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-block: var(--sp-5);
  overflow-x: auto;
}
.checkout-step-node { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.88rem; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.checkout-step-node__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--c-line);
  font-size: 0.82rem;
  font-weight: 800;
  background: var(--c-surface);
  flex: 0 0 auto;
}
.checkout-step-node.is-active { color: var(--c-ink); }
.checkout-step-node.is-active .checkout-step-node__num { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.checkout-step-node.is-done { color: var(--c-success); }
.checkout-step-node.is-done .checkout-step-node__num { border-color: var(--c-success); background: var(--c-success-soft); color: var(--c-success); }
.checkout-steps__sep { flex: 0 0 26px; height: 2px; background: var(--c-line); }
.checkout-steps__sep.is-done { background: var(--c-success); }

.checkout-panel { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-6); background: var(--c-surface); }
@media (max-width: 639px) { .checkout-panel { padding: var(--sp-4); } }
.checkout-panel h2 { font-size: 1.25rem; margin-bottom: var(--sp-5); }
.checkout-nav { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }

.shipping-option, .payment-option {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-4);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
}
.shipping-option + .shipping-option, .payment-option + .payment-option { margin-top: var(--sp-3); }
.shipping-option:has(input:checked), .payment-option:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }
.shipping-option input, .payment-option input { margin-top: 0.25rem; accent-color: var(--c-primary); }
.shipping-option b, .payment-option b { display: block; }
.shipping-option small, .payment-option small { color: var(--c-muted); }
.shipping-option__price { margin-left: auto; font-weight: 800; white-space: nowrap; }
.payment-fields { margin-top: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-sm); background: var(--c-paper); }

.order-success { text-align: center; padding: var(--sp-8) var(--sp-5); }
.order-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--c-success-soft);
  color: var(--c-success);
  margin-bottom: var(--sp-4);
}
.order-success__icon .icon { width: 36px; height: 36px; }
.order-success h2 { margin-bottom: var(--sp-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 620px; }
.table th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-paper);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.table td { padding: var(--sp-4); border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--c-paper); }
.table__id { font-weight: 800; color: var(--c-ink); }

/* ---------- Status badges ---------- */
.status-badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge--ok, .status-delivered, .status-closed, .status-completed { background: var(--c-success-soft); color: var(--c-success); }
.status-badge--info, .status-shipped { background: var(--c-info-soft); color: var(--c-info); }
.status-badge--warn, .status-processing, .status-open, .status-pending { background: var(--c-warning-soft); color: var(--c-warning); }
.status-badge--err, .status-cancelled, .status-failed { background: var(--c-danger-soft); color: var(--c-danger); }
.status-badge--muted, .status { background: var(--c-paper); color: var(--c-muted); }

/* ---------- Order timeline ---------- */
.timeline { display: grid; gap: 0; }
.timeline__step { display: grid; grid-template-columns: 26px 1fr; gap: var(--sp-3); padding-bottom: var(--sp-5); position: relative; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--c-line);
  border: 3px solid var(--c-surface);
  box-shadow: 0 0 0 1.5px var(--c-line);
}
.timeline__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--c-line);
}
.timeline__step.is-done .timeline__dot { background: var(--c-success); box-shadow: 0 0 0 1.5px var(--c-success); }
.timeline__step.is-done:not(:last-child)::after { background: var(--c-success); }
.timeline__step.is-current .timeline__dot { background: var(--c-primary); box-shadow: 0 0 0 1.5px var(--c-primary); }
.timeline__step.is-current .timeline__label { font-weight: 800; }
.timeline__label { font-weight: 700; font-size: 0.95rem; }
.timeline__date { font-size: 0.8rem; color: var(--c-muted); }

/* ---------- Reviews ---------- */
.reviews-section { border-top: 1px solid var(--c-line); margin-top: var(--sp-8); scroll-margin-top: 96px; }
.reviews-section--tab { border-top: 0; margin-top: 0; }
.rating-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-paper);
}
@media (min-width: 640px) { .rating-summary { grid-template-columns: auto 1fr; } }
.rating-summary__avg { text-align: center; }
.rating-summary__avg b { display: block; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.rating-summary__avg .stars svg { width: 18px; height: 18px; }
.rating-summary__count { font-size: 0.85rem; color: var(--c-muted); margin-top: 4px; }
.rating-bars { display: grid; gap: 6px; }
.rating-bar { display: grid; grid-template-columns: 44px 1fr 40px; align-items: center; gap: var(--sp-3); font-size: 0.8rem; color: var(--c-muted); }
.rating-bar__track { height: 8px; border-radius: var(--r-pill); background: var(--c-line); overflow: hidden; }
.rating-bar__fill { height: 100%; border-radius: var(--r-pill); background: var(--c-star); }

.review-list { display: grid; gap: var(--sp-4); }
.review-card { padding: var(--sp-5); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.review-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.review-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  font-weight: 800;
  flex: none;
}
.review-card__author { font-weight: 700; }
.review-card__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.8rem; color: var(--c-muted); }
.review-card p { font-size: 0.95rem; color: var(--c-ink); max-width: none; }
.rev-form { display: none; margin-top: var(--sp-6); }
.rev-form.open { display: block; }
.rev-form h2 { margin-bottom: var(--sp-2); }
.rate-row { display: flex; align-items: center; gap: 3px; }
.rate-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--c-line-strong); cursor: pointer; }
.rate-btn:hover svg, .rate-btn:has(input:checked) svg { color: var(--c-star); fill: var(--c-star); }
.rate-star { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Tabs ---------- */
.tabs { border-bottom: 2px solid var(--c-line); }
.tabs__list { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.tabs__btn {
  padding: var(--sp-3) 0;
  font-weight: 700;
  color: var(--c-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color var(--tr), border-color var(--tr);
}
.tabs__btn:hover { color: var(--c-ink); }
.tabs__btn[aria-selected="true"] { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tabs__panel { padding-block: var(--sp-6); }
.tabs__panel[hidden] { display: none; }

/* ---------- Product view ---------- */
.product-view { display: grid; grid-template-columns: 1fr; gap: var(--sp-7); }
@media (min-width: 960px) { .product-view { grid-template-columns: 1fr 1.05fr; align-items: start; } }
.gallery__main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--c-paper); }
.gallery__main .ph { aspect-ratio: 1 / 0.92; border-radius: var(--r-lg); }
.gallery__main img { width: 100%; aspect-ratio: 1 / 0.92; object-fit: cover; }
.gallery__main video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin-top: var(--sp-3); }
.gallery__thumb { border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; transition: border-color var(--tr); background: none; padding: 0; }
.gallery__thumb .ph { border-radius: 0; aspect-ratio: 1 / 0.86; }
.gallery__thumb img { width: 100%; aspect-ratio: 1 / 0.86; object-fit: cover; }
.gallery__thumb:hover { border-color: var(--c-line-strong); }
.gallery__thumb.active, .gallery__thumb[aria-pressed="true"] { border-color: var(--c-primary); }
.product-info__brand { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); }
.product-info__rating { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.88rem; color: var(--c-muted); }
.product-info__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-3); margin-block: var(--sp-1) var(--sp-2); }
.product-info__price .price { font-size: 1.9rem; }
.product-info__desc { color: var(--c-muted); }
.detail-metagrid { display: grid; gap: 4px; margin-top: var(--sp-4); border-top: 1px solid var(--c-line); padding-top: var(--sp-4); font-size: 0.9rem; color: var(--c-muted); }
.detail-metagrid p { max-width: none; }
.detail-metagrid strong { color: var(--c-ink); }
.product-buy { display: grid; gap: var(--sp-3); margin-top: var(--sp-3); }
/* Variants take their own row; the quantity control and the button sit below. */
.product-buy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.product-buy__actions .btn { flex: 1 1 200px; }
.product-perks { display: grid; gap: var(--sp-2); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--c-line); }
.product-perks li { display: flex; gap: var(--sp-3); align-items: center; font-size: 0.88rem; color: var(--c-muted); }
.product-perks .icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--c-primary); }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.specs-table th { text-align: left; padding: var(--sp-3) var(--sp-4); width: 42%; color: var(--c-muted); font-weight: 600; }
.specs-table td { padding: var(--sp-3) var(--sp-4); font-weight: 700; }
.specs-table tr:nth-child(odd) { background: var(--c-paper); }

/* ---------- Search head ---------- */
.search-head { margin-bottom: var(--sp-6); }
.search-head__term { font-weight: 800; color: var(--c-primary); }
.search-page-form { display: flex; gap: var(--sp-2); max-width: 620px; margin-top: var(--sp-4); }
.search-page-form .searchbar { margin-inline: 0; max-width: none; }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: center; padding-block: var(--sp-10); }
.auth-card {
  width: min(100%, 440px);
  padding: var(--sp-7);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--sh-1);
}
@media (max-width: 639px) { .auth-card { padding: var(--sp-5); } }
.auth-card h1 { font-size: 1.6rem; margin-bottom: var(--sp-2); }
.auth-card__sub, .auth-sub { color: var(--c-muted); font-size: 0.92rem; margin-bottom: var(--sp-6); }
.auth-foot, .auth-alt { text-align: center; font-size: 0.92rem; color: var(--c-muted); margin-top: var(--sp-5); }
.auth-foot a, .auth-alt a { font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: var(--sp-3); margin-block: var(--sp-5); color: var(--c-muted); font-size: 0.82rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.form-row { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); margin: 2px 0 var(--sp-5); font-size: 0.88rem; }

/* ---------- Password wall (templates/password.html.twig) ---------- */

body[data-template="password"] { background: var(--c-paper); }
.password-screen { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-10) var(--sp-5); }
.password-panel {
  width: min(100%, 460px);
  padding: var(--sp-7) var(--sp-7) var(--sp-6);
  border: 1px solid var(--c-line);
  border-top: 6px solid var(--c-primary);
  border-radius: var(--r-sm) var(--r-sm) var(--r-lg) var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--sh-1);
}
.password-brand { margin: 0 0 var(--sp-5); }
.password-brand .brand { gap: var(--sp-2); }
.password-brand .brand__name { font-size: 1.45rem; }
.password-tear { height: 0; border-top: 1.5px dashed var(--c-line-strong); margin: 0 calc(var(--sp-1) * -1) var(--sp-5); }
.password-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 var(--sp-2); }
.password-sub, .password-message { color: var(--c-muted); font-size: 0.95rem; margin: 0 0 var(--sp-6); }
.password-message p { margin: 0 0 var(--sp-2); }
.password-message p:last-child { margin-bottom: 0; }
.password-message a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.password-form { display: grid; }
.password-label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--c-ink); margin-bottom: var(--sp-2); }
.password-input {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--sp-3);
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  font-size: 1rem;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.password-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.password-input[aria-invalid="true"] { border-color: var(--c-danger); }
.password-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--c-danger-soft); }
.password-error { margin: var(--sp-2) 0 0; font-size: 0.86rem; font-weight: 600; color: var(--c-danger); }
.password-submit { margin-top: var(--sp-4); }
.password-contact { margin: var(--sp-6) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--c-line); font-size: 0.86rem; color: var(--c-muted); }
.password-contact a { color: var(--c-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.password-screen a:focus-visible, .password-screen button:focus-visible, .password-screen input:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
@media (max-width: 479px) {
  .password-screen { padding: var(--sp-6) var(--sp-4); }
  .password-panel { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
  .password-title { font-size: 1.4rem; }
}

/* ---------- Account area ---------- */
.account, .account-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-7); padding-block: var(--sp-6) var(--sp-9); }
@media (min-width: 960px) { .account, .account-layout { grid-template-columns: 250px 1fr; align-items: start; } }
.account-nav, .side-nav { display: grid; gap: var(--sp-1); align-content: start; }
@media (min-width: 960px) {
  .account-nav, .account-side { position: sticky; top: 140px; }
  .account-nav { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-3); }
}
.account-side { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-4); }
.user-chip { display: flex; gap: var(--sp-3); align-items: center; padding: 0 0 var(--sp-3); border-bottom: 1px solid var(--c-line); margin-bottom: var(--sp-3); }
.user-chip strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.user-chip .muted { font-size: 0.8rem; display: block; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.account-nav a, .account-nav button, .side-nav a, .side-nav button {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--c-muted);
  transition: background var(--tr), color var(--tr);
  text-align: left;
  font-size: 0.92rem;
}
.account-nav a:hover, .account-nav button:hover, .side-nav a:hover, .side-nav button:hover { background: var(--c-paper); color: var(--c-ink); }
.account-nav a[aria-current="page"], .side-nav a.active { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.account-nav .icon, .side-nav .icon { flex: 0 0 auto; width: 19px; height: 19px; }
.account-nav__logout, .side-logout { color: var(--c-danger); }
.account-nav__logout { border-top: 1px solid var(--c-line); border-radius: 0; margin-top: var(--sp-2); padding-top: var(--sp-4); }
.account-nav__logout:hover, .side-logout:hover { color: var(--c-danger); background: var(--c-danger-soft); }
.account-head { margin-bottom: var(--sp-5); }
.account-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: var(--sp-1); }
.account-head h1 + .muted { font-size: 0.95rem; }
.account-content > h1 { margin-bottom: var(--sp-2); }
.account-content__sub { color: var(--c-muted); margin-bottom: var(--sp-6); }

.dash-cards, .stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-6); }
.dash-card, .stat-card { padding: var(--sp-5); border: 1px solid var(--c-line); border-radius: var(--r-md); display: grid; gap: var(--sp-1); align-content: start; background: var(--c-surface); }
.dash-card .icon, .stat-label .icon { width: 22px; height: 22px; color: var(--c-primary); margin-bottom: var(--sp-1); }
.dash-card b, .stat-num { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat-num-sm { font-size: 1.1rem; }
.dash-card span, .stat-label { font-size: 0.85rem; color: var(--c-muted); }
.stat-label { display: flex; align-items: center; gap: 6px; margin-top: var(--sp-1); }
.quick-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.tile { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-5); transition: border-color var(--tr), transform var(--tr); }
.tile:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.tile .icon { width: 20px; height: 20px; color: var(--c-primary); margin-bottom: var(--sp-2); }
.tile strong { display: block; font-size: 0.92rem; margin-bottom: 3px; }
.tile p { font-size: 0.82rem; color: var(--c-muted); line-height: 1.5; }

.address-grid, .addr-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 640px) { .address-grid, .addr-grid { grid-template-columns: repeat(2, 1fr); } }
.address-card, .addr-card { padding: var(--sp-5); border: 1px solid var(--c-line); border-radius: var(--r-md); display: grid; gap: var(--sp-2); align-content: start; background: var(--c-surface); }
.address-card.is-default, .addr-default { border-color: var(--c-success); box-shadow: 0 0 0 1px var(--c-success); }
.address-card__head, .addr-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-1); }
.address-card__label { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.address-card__label .icon { width: 16px; height: 16px; color: var(--c-primary); }
.address-card__body, .addr-card address { font-size: 0.92rem; color: var(--c-muted); display: grid; gap: 2px; font-style: normal; }
.address-card__body p, .addr-card p { max-width: none; }
.address-card__actions, .addr-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); font-size: 0.85rem; flex-wrap: wrap; }
.addr-add {
  border: 1.5px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  padding: var(--sp-7) var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--c-muted);
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 180px;
  transition: border-color var(--tr), color var(--tr), background var(--tr);
}
.addr-add:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft); }
.addr-add .icon { width: 22px; height: 22px; }
.address-form { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-6); margin-bottom: var(--sp-6); }
.address-edit-frame { min-height: 100vh; padding: var(--sp-5); background: var(--c-paper); }
.address-edit-frame .address-form { margin-bottom: 0; }

/* ---------- Panel ---------- */
.panel { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-6); background: var(--c-surface); margin-bottom: var(--sp-5); }
.panel h2 { font-size: 1.15rem; margin-bottom: var(--sp-4); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.panel-head h2 { margin-bottom: 0; }

/* ---------- Orders ---------- */
.order-tabs { margin-bottom: var(--sp-5); }
.order-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); margin-bottom: var(--sp-4); overflow: hidden; }
.order-card > header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--c-line); }
.order-card > header strong { font-size: 0.98rem; display: block; }
.order-card > header .muted { font-size: 0.82rem; }
.order-items { list-style: none; margin: 0; padding: var(--sp-1) var(--sp-5); }
.order-items li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-line); }
.order-items li:last-child { border-bottom: 0; }
.oi-media { width: 52px; height: 52px; border-radius: var(--r-sm); overflow: hidden; background: var(--c-paper); flex: none; }
.oi-media img { width: 100%; height: 100%; object-fit: cover; }
.oi-info { flex: 1; min-width: 0; }
.oi-info strong { display: block; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-info .muted { font-size: 0.8rem; }
.oi-price { font-weight: 700; font-size: 0.92rem; }
.order-card > footer { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--c-line); font-size: 0.85rem; }
.order-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.order-card-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-left: auto; }
.order-card-actions form { margin: 0; }
.order-truncated { flex-basis: 100%; }
.orders-pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-4); margin-top: var(--sp-5); font-size: 0.9rem; }

/* ---------- Order detail ---------- */
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.order-head__meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); color: var(--c-muted); font-size: 0.9rem; }
.order-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); align-items: start; }
@media (min-width: 960px) { .order-grid { grid-template-columns: 1.6fr 1fr; } }
.order-item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--sp-4); align-items: center; padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--r-md); }
@media (max-width: 639px) { .order-item { grid-template-columns: 60px 1fr; } .order-item__total { grid-column: 2; text-align: left; } }
.order-item__title { font-weight: 700; }
.order-item__meta { font-size: 0.82rem; color: var(--c-muted); }
.order-item__total { font-weight: 800; text-align: right; }
.order-aside { display: grid; gap: var(--sp-5); }
.order-card-plain { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-5); }
.order-card-plain h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin-bottom: var(--sp-3); }
.order-card__body { font-size: 0.92rem; display: grid; gap: 3px; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: start;
}
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.3fr 1fr; } }
.contact-grid > * { min-width: 0; }

.contact-panel { border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.contact-panel [hidden] { display: none !important; }
.contact-panel__intro { color: var(--c-muted); font-size: 0.92rem; margin: calc(-1 * var(--sp-2)) 0 var(--sp-5); }

.contact-hint {
  display: none;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--c-info-soft);
  color: #1864ab;
  font-size: 0.84rem;
  line-height: 1.45;
}
.contact-hint.is-visible { display: flex; }
.contact-hint svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; }

.contact-success { display: grid; justify-items: start; gap: var(--sp-3); }
.contact-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-success-soft);
  color: var(--c-success);
  margin-bottom: var(--sp-2);
}
.contact-success__icon svg { width: 30px; height: 30px; }
.contact-success h2 { font-size: 1.3rem; }
.contact-success p { color: var(--c-muted); }

.contact-ways {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  background: var(--c-surface);
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 960px) { .contact-ways { position: sticky; top: 140px; } }
.contact-ways__head {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}
.contact-way { display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-4); }
.contact-way .icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--c-primary); margin-top: 3px; }
.contact-way b { display: block; font-size: 0.98rem; }
.contact-way span { display: block; margin-top: var(--sp-1); font-size: 0.88rem; color: var(--c-muted); line-height: 1.5; }

.contact-hours { display: grid; gap: 4px; margin-top: var(--sp-2); font-size: 0.88rem; color: var(--c-muted); }
.contact-hours > div { display: flex; justify-content: space-between; gap: var(--sp-4); }
.contact-hours b { font-weight: 600; color: var(--c-ink); white-space: nowrap; }

.contact-note { font-size: 0.82rem; color: var(--c-muted); max-width: 46ch; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: var(--sp-10); display: grid; justify-items: center; gap: var(--sp-4); }
.not-found__code {
  font-size: clamp(5rem, 8rem + 10vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(120deg, var(--c-primary), var(--c-warning));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: none;
}
.not-found .searchbar { max-width: 420px; margin-inline: 0; }
.not-found__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-3); }
.not-found p { max-width: 52ch; }

/* ---------- Blog article ---------- */
.article { max-width: 820px; margin-inline: auto; }
.article-head { margin-inline: auto; padding-top: var(--sp-6); }
.article-head h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); line-height: 1.15; margin: var(--sp-3) 0 var(--sp-4); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); font-size: 0.85rem; color: var(--c-muted); }
.article-author { display: flex; align-items: center; gap: var(--sp-3); }
.article-author b { display: block; font-size: 0.92rem; color: var(--c-ink); }
.article-author span { font-size: 0.8rem; color: var(--c-muted); }
.article-cover { margin-block: var(--sp-6); border-radius: var(--r-lg); overflow: hidden; background: var(--c-paper); }
.article-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.article-body p { font-size: 1.02rem; line-height: 1.85; color: #3f3a36; margin: var(--sp-4) 0; }
.article-body h2 { font-size: 1.45rem; margin: var(--sp-8) 0 var(--sp-3); }
.article-body ul, .article-body ol { margin: var(--sp-4) 0; padding-left: 1.4rem; }
.article-body li { font-size: 1rem; line-height: 1.7; color: #3f3a36; margin-bottom: var(--sp-2); }
.article-body blockquote { margin: var(--sp-7) 0; padding: var(--sp-2) 0 var(--sp-2) var(--sp-5); border-left: 4px solid var(--c-primary); font-size: 1.1rem; font-weight: 500; }
.share-row { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-7) 0 var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--c-line); flex-wrap: wrap; }
.share-row .muted { font-size: 0.88rem; margin-right: var(--sp-1); }
.share-row .icon-btn { border: 1px solid var(--c-line); }
.author-card { display: flex; gap: var(--sp-4); align-items: flex-start; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-5); }
.avatar-lg { width: 50px; height: 50px; font-size: 1rem; }
.author-card strong { display: block; font-size: 0.95rem; }
.article-box { margin-top: var(--sp-8); padding: var(--sp-6); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-paper); }
.article-nav { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); margin-top: var(--sp-8); }
@media (min-width: 640px) { .article-nav { grid-template-columns: 1fr 1fr; } }
.article-nav a { display: block; padding: var(--sp-5); border: 1px solid var(--c-line); border-radius: var(--r-md); transition: border-color var(--tr), box-shadow var(--tr); }
.article-nav a:hover { border-color: var(--c-primary); box-shadow: var(--sh-1); }
.article-nav small { color: var(--c-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.article-nav b { display: block; margin-top: var(--sp-1); font-size: 1rem; color: var(--c-ink); }
.comment { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-5); }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.comment-head h3 { font-size: 0.95rem; }
.comment-body { margin-top: var(--sp-2); font-size: 0.95rem; color: var(--c-muted); }
.comment-form-wrap { margin-top: var(--sp-6); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--sp-6); }
.article-comments { margin-top: var(--sp-8); }

/* ---------- Content page ---------- */
.content-hero { text-align: center; padding: var(--sp-9) 0 var(--sp-3); }
.content-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); margin-bottom: var(--sp-3); }
.content-hero p { color: var(--c-muted); margin-inline: auto; }
.values-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { padding: var(--sp-6); border: 1px solid var(--c-line); border-radius: var(--r-md); text-align: center; display: grid; justify-items: center; gap: var(--sp-2); }
.value-card .icon { width: 38px; height: 38px; color: var(--c-primary); }
.value-card h3 { font-size: 1.05rem; }
.value-card p { font-size: 0.9rem; color: var(--c-muted); }

/* ---------- Checkout slim header ---------- */
.header-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
}
.header-checkout__secure {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-success);
}
.header-checkout__secure .icon { width: 17px; height: 17px; }

/* ---------- Blog gallery layout ---------- */
.featured-post { padding-block: var(--sp-7) var(--sp-2); }
.post-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-featured { grid-template-columns: 1fr; }
@media (min-width: 960px) { .post-featured { display: grid; grid-template-columns: 1.15fr 1fr; } .post-featured .card-post__media img, .post-featured .card-post__media .ph { aspect-ratio: auto; height: 100%; min-height: 360px; } }

/* ---------- Responsive (pages) ---------- */
@media (max-width: 1020px) {
  .account, .account-layout { grid-template-columns: 1fr; }
  .account-side, .side-nav { position: static; }
  .side-nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 640px) {
  .hero-collage { aspect-ratio: 1 / 0.8; }
  .banner-cta { padding: var(--sp-5); }
  .banner-cta .ph { width: 160px; justify-self: start; }
  .trust-row__grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .form-grid, .form-grid--2 { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
  .search-page-form { flex-direction: column; }
  .search-page-form .searchbar { flex-direction: row; }
  .order-actions { width: 100%; justify-content: space-between; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .not-found__code { font-size: 5rem; }
}
