/* allegro — design system.
   Minimal, premium, editorial: white, black, grey accents, Montserrat. */

:root {
  --text: #1C1C1C;
  --muted: #8A8A8A;
  --bg: #FFFFFF;
  --border: #E5E7EB;
  --surface: #F7F7F8;
  --radius-btn: 6px;
  --radius-card: 10px;
  --header-h: 72px;
  --header-inset: 14px;
  /* fluid: tracks the viewport (≈86% of it) between a floor and a cap */
  --max-w: clamp(1100px, 86vw, 1760px);
  --pad-x: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.01em; }
h3 { font-size: 18px; }

p { margin: 0 0 1em; }

.muted { color: var(--muted); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

main { min-height: 60vh; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background .15s, color .15s, opacity .15s;
  white-space: nowrap;
}

.btn:hover { background: var(--surface); }

.btn-solid { background: var(--text); color: #fff; }
.btn-solid:hover { background: #000; opacity: .9; }

.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-block { width: 100%; }

/* ---------- floating header card ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--header-inset) var(--header-inset) 0;
}

.header-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .05);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  max-width: calc(var(--max-w) + 40px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  flex: none;
}

.brand-name, .brand-tag { white-space: nowrap; }

/* between the hamburger breakpoint and roomy desktop, the tagline is
   the first thing to give way so the full nav always fits the card */
@media (min-width: 1200px) and (max-width: 1449px) {
  .brand-tag { display: none; }
}

.brand-tile {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  flex: none;
  overflow: hidden;
}

/* real logo image instead of the monogram */
.brand-tile.has-logo { background: none; }

.brand-tile.has-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; }
.brand-tag  { font-size: 11px; color: var(--muted); line-height: 1.2; }

/* wide wordmark logo: image on top, tagline tucked underneath */
.brand-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.brand-wordmark img {
  display: block;
  height: 28px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.site-footer .brand-wordmark img { height: 24px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.5vw, 24px);
}

.main-nav a {
  font-size: 14.5px;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.main-nav a:hover { color: #000; }

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* categories dropdown */
.nav-drop { position: relative; }

.nav-drop > a { display: inline-flex; align-items: center; gap: 5px; }

.nav-drop .chev { width: 10px; height: 10px; transition: transform .15s; }
.nav-drop.open .chev { transform: rotate(180deg); }

.drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -10px;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  padding: 8px;
  display: none;
}

.nav-drop.open .drop-menu { display: block; }

.drop-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.drop-menu a:hover { background: var(--surface); }

/* parent group heading inside the categories menu (clickable) */
.drop-menu .drop-group-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 10px 12px 4px;
  margin-top: 2px;
}

.drop-menu a.drop-group-label:hover { color: var(--text); background: none; }

.drop-menu a.in-group { padding-left: 22px; }

/* mega layout: one column per group when there's width for it */
.nav-drop.open .drop-menu.mega {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
  max-width: min(calc(100vw - 48px), 740px);
  width: max-content;
}

.drop-menu.mega .drop-col { min-width: 160px; }
.drop-menu.mega .drop-group-label { padding-top: 6px; margin-top: 0; }
.drop-menu.mega a.in-group { padding-left: 12px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* language switcher: EN · TR · RU */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; }

.lang-switch button {
  border: 0;
  background: none;
  padding: 6px 5px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button.active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-lang { display: none; } /* mobile-menu copy of the switcher */

/* compact header: applied by ui.js when the desktop header would overflow
   its card (long Turkish/Russian labels on narrower desktops) — the
   tagline goes, the nav tightens, the auth buttons fold into the account
   icon, and the switcher shows only the active language until clicked */
.site-header.header-tight .brand-tag { display: none; }
.site-header.header-tight .main-nav { gap: 11px; }
.site-header.header-tight .main-nav a { font-size: 13.5px; }
.site-header.header-tight .header-actions { gap: 6px; }
.site-header.header-tight .header-actions .lang-switch:not(.open) button:not(.active) { display: none; }
/* second step, only if still overflowing: auth buttons fold into the icon */
.site-header.header-tighter .header-auth .btn[href^="account.html"] { display: none; }

.header-auth { display: flex; align-items: center; gap: 8px; }
.header-auth:empty { display: none; }
.header-auth .btn { white-space: nowrap; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
}

.icon-btn:hover { background: var(--surface); }

.icon-btn svg { width: 18px; height: 18px; }

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.badge:empty, .badge[data-count="0"] { display: none; }

.hamburger { display: none; }

/* mobile nav */
@media (max-width: 1199px) {
  .main-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) + var(--header-inset) + 8px);
    left: var(--header-inset);
    right: var(--header-inset);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .1);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    /* the panel scrolls on its own when the categories list is taller
       than the screen; the page behind it stays put (body lock below) */
    max-height: calc(100vh - var(--header-h) - var(--header-inset) * 2 - 8px);
    max-height: calc(100dvh - var(--header-h) - var(--header-inset) * 2 - 8px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .site-header.nav-open .main-nav { display: flex; }
  body.nav-open { overflow: hidden; }

  .main-nav a { padding: 12px 10px; border-radius: 6px; }
  .main-nav a:hover { background: var(--surface); }
  .main-nav a[aria-current="page"]::after { display: none; }

  .nav-drop .drop-menu {
    position: static;
    display: block;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }

  /* in the hamburger menu, groups stack instead of forming columns */
  .nav-drop .drop-menu.mega,
  .nav-drop.open .drop-menu.mega {
    display: block;
    max-width: none;
    width: auto;
  }

  .nav-drop .chev { display: none; }

  .hamburger { display: grid; }

  .header-auth .btn { display: none; } /* auth buttons collapse into menu on small screens */
}

@media (max-width: 560px) {
  .brand-tag { display: none; }
}

/* auth buttons shown inside the mobile menu */
.nav-auth { display: none; }

@media (max-width: 1199px) {
  .nav-auth {
    display: flex;
    gap: 10px;
    padding: 12px 10px 6px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }
  .nav-auth .btn { flex: 1; padding: 11px 22px; }
  .main-nav .nav-auth a.btn-solid { color: #fff; }

  /* under the hamburger breakpoint the switcher lives in the menu */
  .header-actions > .lang-switch { display: none; }
  .nav-lang {
    display: flex;
    padding: 10px 10px 4px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
  }
  .nav-lang .lang-switch { gap: 6px; }
  .nav-lang .lang-switch button { font-size: 13px; padding: 8px 12px; }
}

/* ---------- order basket drawer ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 90;
}

.order-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 94vw);
  background: var(--bg);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .14);
  transform: translateX(105%);
  transition: transform .28s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

body.drawer-open .drawer-overlay { opacity: 1; pointer-events: auto; }
body.drawer-open .order-drawer { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px;
}

.drawer-items .draft-item { gap: 10px; }
.drawer-items .qty-input { width: 64px; padding: 8px 6px; }

.drawer-recs {
  padding: 10px 20px 6px;
  border-top: 1px solid var(--border);
}

.drawer-recs:empty { border-top: none; padding: 0; }

.rec-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.rec-card {
  position: relative;
  flex: none;
  width: 88px;
}

.rec-img {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.rec-img img { width: 100%; height: 100%; object-fit: cover; }

.rec-name {
  display: block;
  font-size: 11.5px;
  line-height: 1.3;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rec-add {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .95);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.rec-add:hover { background: var(--text); color: #fff; border-color: var(--text); }

.drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.drawer-foot:empty { border-top: none; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .order-drawer, .drawer-overlay { transition: none; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 48px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }

.footer-grid a { display: block; padding: 4px 0; color: var(--muted); }
.footer-grid a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- page heads ---------- */

.page-head { padding: 56px 0 28px; }
.page-head p { max-width: 560px; }

/* ---------- product grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 20px;
  padding-bottom: 40px;
}

/* wider viewports get more columns so cards keep a premium size */
@media (min-width: 1560px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1900px) { .grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; } }

.card { display: block; }

.card-img {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.card:hover .card-img img { transform: scale(1.03); }

.card-name { font-size: 14px; font-weight: 500; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-price { font-size: 14px; font-weight: 600; margin-top: 4px; }

/* ---------- big-category tabs (admin category groups) ---------- */

.cat-tabs {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  scrollbar-width: none;
}

.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 0 12px;
  white-space: nowrap;
  position: relative;
  flex: none;
}

.cat-tab:hover { color: var(--text); }

.cat-tab.active { color: var(--text); font-weight: 600; }

.cat-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--text);
}

/* ---------- catalogue search ---------- */

.search-bar {
  position: relative;
  max-width: 380px;
  margin-bottom: 14px;
}

.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-bar input {
  padding: 11px 40px 11px 40px;
  border-radius: 999px;
}

.search-bar input::-webkit-search-cancel-button { display: none; }

.search-bar #search-clear,
.search-bar .search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.search-bar #search-clear:hover,
.search-bar .search-clear:hover { color: var(--text); background: var(--surface); }

/* ---------- filters: multi-select dropdowns ---------- */

.filters {
  padding: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-drop { position: relative; }

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}

.filter-btn:hover { border-color: var(--muted); }

.filter-btn .chev { width: 10px; height: 10px; transition: transform .15s; }
.filter-drop.open .filter-btn .chev { transform: rotate(180deg); }

.filter-btn .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.filter-drop.active .filter-btn { border-color: var(--text); }

.filter-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  max-width: min(320px, calc(100vw - 40px));
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
  padding: 6px;
  display: none;
}

.filter-drop.open .filter-panel { display: block; }

/* JS nudges `left` at open time if the panel would overflow the viewport */

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.filter-option:hover { background: var(--surface); }

.filter-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: var(--text);
  cursor: pointer;
}

.filter-option .opt-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel .panel-clear {
  width: 100%;
  padding: 9px 10px;
  margin-top: 2px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  border-radius: 0 0 6px 6px;
}

.filter-panel .panel-clear:hover { color: var(--text); background: var(--surface); }

.filters .clear-all {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 4px;
}

.filters .clear-all:hover { color: var(--text); }

.result-count { font-size: 13px; color: var(--muted); padding-bottom: 14px; }

/* ---------- product detail ---------- */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 64px);
  padding: 40px 0 20px;
}

@media (max-width: 880px) { .product-layout { grid-template-columns: 1fr; } }

.gallery-main {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.gallery-arrow:hover { background: #fff; }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery-arrow svg { width: 16px; height: 16px; }

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumbs button {
  flex: none;
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--surface);
}

.gallery-thumbs button.active { border-color: var(--text); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: clamp(24px, 3vw, 32px); }

.style-code { font-size: 13px; color: var(--muted); letter-spacing: .04em; margin-bottom: 18px; }

.colour-row { margin: 22px 0; }

.colour-row-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }

.swatch {
  display: block;
  width: 64px;
  text-align: center;
}

.swatch-img {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface);
}

.swatch.current .swatch-img { border-color: var(--text); }
.swatch:hover .swatch-img { border-color: var(--muted); }

.swatch-img img { width: 100%; height: 100%; object-fit: cover; }

.swatch-name {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swatch.current .swatch-name { color: var(--text); font-weight: 600; }

.details-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin: 22px 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.details-block .row { display: flex; gap: 12px; }
.details-block .row dt { min-width: 110px; color: var(--muted); font-weight: 500; }
.details-block .row dd { margin: 0; }

.price-block { margin: 24px 0; }

.price {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.price small { font-size: 13px; font-weight: 400; color: var(--muted); }

.price-gate {
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  background: var(--surface);
  font-size: 14px;
}

.qty-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }

.qty-input {
  width: 90px;
  text-align: center;
}

/* ---------- combinations ---------- */

.combo-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}

@media (max-width: 480px) { .combo-products { grid-template-columns: 1fr 1fr; gap: 14px 10px; } }

/* admin product picker */
.picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}

.picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}

.picker label:hover { background: var(--surface); }

.picker img {
  width: 30px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
}

.picker input { width: 15px; height: 15px; margin: 0; flex: none; accent-color: var(--text); }

/* ---------- outfit builder ---------- */

.outfit-canvas {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* stacked full-frame layers: base model photo + one transparent
   garment PNG per slot, in slot order (later slots on top) */
.outfit-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the global `img { display:block }` would defeat the hidden attribute */
.outfit-layer[hidden] { display: none; }

.outfit-slot { margin-bottom: 18px; }

.outfit-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.outfit-thumb {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
}

.outfit-thumb img { position: absolute; max-width: none; }

.outfit-thumb img.thumb-contain {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.outfit-thumb:hover { border-color: var(--muted); }
.outfit-thumb.active { border-color: var(--text); }

/* the "None" chip clears a slot's layer */
.outfit-thumb.outfit-none {
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--muted);
  background: var(--bg);
}

.outfit-thumb.outfit-none.active { color: var(--text); }

.outfit-summary .draft-item { border-bottom: 1px solid var(--border); }

/* ---------- forms ---------- */

input, select, textarea {
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 11px 13px;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--text);
}

label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 6px; }

.field { margin-bottom: 16px; }

.form-card {
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

.form-error { color: #B3261E; font-size: 13.5px; margin: 10px 0 0; }
.form-success { color: #146C43; font-size: 13.5px; margin: 10px 0 0; }

/* ---------- notices ---------- */

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  border-radius: var(--radius-btn);
  background: var(--surface);
  padding: 16px 18px;
  font-size: 14px;
  margin: 18px 0;
}

/* ---------- account / admin ---------- */

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }

.tab {
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--muted);
}

.tab.active { color: var(--text); border-bottom-color: var(--text); }

/* admin: pieces-per-size grid for the pack composition */
.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-grid label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  min-width: 56px;
}

.size-grid input { width: 60px; text-align: center; padding: 8px 4px; }

/* product page: per-size quantity picker (1..max per size) */
.size-picker { margin: 18px 0 4px; }

.size-picker-row { display: flex; flex-wrap: wrap; gap: 8px; }

.size-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 8px 6px;
  min-width: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.size-pick input {
  width: 48px;
  padding: 6px 4px;
  text-align: center;
  font-weight: 500;
}

.size-pick small { font-size: 10.5px; font-weight: 400; color: var(--muted); }

.size-pick.fixed { opacity: .6; }

/* product page: standard vs alternative pack choice */
.pack-choice { display: grid; gap: 8px; margin: 18px 0 4px; }

.pack-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s;
}

.pack-option:hover { background: var(--surface); }
.pack-option:has(input:checked) { border-color: var(--text); }

/* the global input styling must not stretch the radio across the row */
.pack-option input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  padding: 0;
  border: none;
  accent-color: var(--text);
}

.pack-option > span { flex: 1; }
.pack-option .muted { white-space: nowrap; }

/* buyer-facing pack composition chips */
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.size-chip {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12.5px;
  background: var(--bg);
}

.size-chip b { font-weight: 600; }

/* admin photo crop editor */
#crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  user-select: none;
}

#crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  pointer-events: none;
}

#crop-box {
  position: absolute;
  border: 2px solid #fff;
  outline: 1px solid rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 9999px rgba(15, 17, 21, .45);
  cursor: move;
  touch-action: none;
}

#crop-handle {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .45);
  cursor: nwse-resize;
  touch-action: none;
}

/* admin outfit slots: a layers panel — first row is worn on top */
.slot-stack {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.slot-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
}

.slot-row + .slot-row { border-top: 1px dashed var(--border); }

.slot-row input { flex: 1; min-width: 110px; }

.slot-role {
  min-width: 92px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.slot-role.is-top { color: var(--text); }

/* Customize tab: category group editor */
.cg-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.cg-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
}

.cg-cats label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}

.cg-cats input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--text);
}

/* Customize tab: editor left, always-on live preview right */
.cz-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 26px;
  align-items: start;
}

.cz-preview-pane {
  position: sticky;
  top: calc(var(--header-h) + var(--header-inset) + 16px);
}

@media (max-width: 1180px) {
  .cz-layout { grid-template-columns: 1fr; }
  .cz-preview-pane { position: static; }
}

.preview-frame {
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  display: block;
  transition: width .2s;
}

.preview-frame.mobile { width: 375px; max-width: 100%; }

.badge-inline {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}

.panel { display: none; }
.panel.active { display: block; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

.table-wrap { overflow-x: auto; }

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status-new       { background: var(--surface); }
.status-quoted    { background: #FFF8E1; border-color: #F0E0A0; }
.status-confirmed { background: #E8F5E9; border-color: #BBDBC0; }
.status-closed    { background: var(--surface); color: var(--muted); }
.status-rejected  { background: #FDECEA; border-color: #EFC2BD; }

/* order draft list */
.draft-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.draft-item img {
  width: 52px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 6px;
}

.draft-item .grow { flex: 1; min-width: 0; }

/* ---------- home: full-width hero banner ---------- */

/* image composition: subject on the LEFT, copy space on the RIGHT —
   so the content sits right, in dark text over the light backdrop */
.hero-banner {
  position: relative;
  margin-top: 28px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #dfe4e9;
  min-height: clamp(420px, 60vh, 560px);
  display: flex;
  align-items: center;
}

.hero-banner > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

/* soft wash behind the text so it stays readable on busier photos */
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left,
    rgba(255, 255, 255, .38) 0%,
    rgba(255, 255, 255, .18) 45%,
    rgba(255, 255, 255, 0) 65%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--text);
  padding: clamp(28px, 6vw, 72px);
  max-width: 640px;
}

/* admin-set free text placement (Customize): the block's top-left
   corner sits at X% / Y% of the banner; blank axes stay automatic
   (right-aligned / vertically centred — the default design) */
.hero-banner { justify-content: flex-end; }

.hero-banner.free-pos .hero-content {
  position: absolute;
  padding: 0;
  /* left/top/right/transform + max-width set inline from the settings */
}

/* the readability wash follows where the text sits */
.hero-banner.wash-left::after {
  background: linear-gradient(to right,
    rgba(255, 255, 255, .38) 0%,
    rgba(255, 255, 255, .18) 45%,
    rgba(255, 255, 255, 0) 65%);
}

.hero-banner.wash-center::after { background: rgba(255, 255, 255, .26); }

.hero-content p {
  font-size: 16.5px;
  color: rgba(28, 28, 28, .72);
  max-width: 500px;
}

.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* on small screens the crop centres on the copy space — keep it clean */
@media (max-width: 640px) {
  .hero-banner > img { object-position: 30% center; }
  .hero-banner::after { background: rgba(255, 255, 255, .35); }
}

/* ---------- product conveyor marquee ---------- */

.marquee {
  overflow: hidden;
  padding: 34px 0 6px;
  /* fade the ends so items drift in and out */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee-roll 60s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-item {
  flex: none;
  width: 148px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.marquee-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .3s;
}

.marquee-item:hover img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.section { padding: 44px 0; }

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

.section-head a { font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

.cat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

@media (max-width: 560px) { .cat-row { grid-template-columns: 1fr 1fr; } }

.cat-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.cat-card:hover img { transform: scale(1.04); }

.cat-card span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(255,255,255,.94);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.cred-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-block: 1px solid var(--border);
  padding: 36px 0;
  text-align: center;
}

@media (max-width: 640px) { .cred-strip { grid-template-columns: 1fr; gap: 28px; } }

.cred-strip strong { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.cred-strip span { font-size: 13.5px; color: var(--muted); }

.cta-band {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-card);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  margin: 30px 0 10px;
}

.cta-band p { color: rgba(255,255,255,.75); max-width: 520px; margin-inline: auto; }
.cta-band .btn { background: #fff; color: var(--text); border-color: #fff; margin-top: 14px; }

/* ---------- static content ---------- */

.prose { max-width: 720px; padding-bottom: 20px; }
.prose h2 { margin-top: 1.6em; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 500;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::after { content: '+'; color: var(--muted); font-size: 20px; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { color: var(--muted); padding-bottom: 18px; max-width: 640px; }

/* ---------- helpers ---------- */

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, #efefef 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-card);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.hidden { display: none !important; }

/* ---------- admin: product photo manager ---------- */

.im-tile { width: 112px; }

.im-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.im-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.im-cover {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(28, 28, 28, .85);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.im-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.im-btn {
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.im-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--text); }
.im-btn:disabled { opacity: .3; cursor: default; }
.im-btn-danger:hover:not(:disabled) { color: #b42318; border-color: #b42318; }

/* ---------- admin: product list grouped by style ---------- */

.pl-table .pl-toggle-cell { width: 44px; padding-right: 0; }

.pl-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  padding: 0 7px 0 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.pl-toggle:hover { color: var(--text); border-color: var(--text); }
.pl-toggle .pl-chev { display: inline-block; font-size: 11px; transition: transform .15s; }
.pl-toggle.open .pl-chev { transform: rotate(90deg); }

.pl-child td { background: var(--surface); }
.pl-child .pl-name { padding-left: 26px; }
.pl-child .pl-indent { color: var(--muted); margin-right: 6px; }
.pl-child img { width: 36px !important; }
