/* ============================================
   The Most Wholesale
   Earth-tone storefront, apparo-style layout
   Display: Bai Jamjuree · Body: Sarabun
   ============================================ */

:root {
  /* Ground */
  --raw: #ede6d8;        /* raw cotton — page ground */
  --paper: #fbf8f2;      /* card surface */
  --sand: #dcccb4;       /* hairlines, muted fill */
  --sand-deep: #c9b698;

  /* Pigment */
  --bark: #3b2f25;       /* text + dark surfaces */
  --bark-soft: #6a5a4a;  /* secondary text */
  --sienna: #8a4b2a;     /* primary action */
  --sienna-deep: #6d3a1f;
  --moss: #5c6b4a;       /* stock / savings signal */
  --ochre: #c08a3e;      /* price-break highlight */

  --danger: #9c3b28;
  --radius: 2px;
  --lift: 0 10px 30px rgba(59, 47, 37, 0.14);

  --display: 'Bai Jamjuree', system-ui, sans-serif;
  --body: 'Sarabun', system-ui, sans-serif;

  --gutter: 24px;
  --maxw: 1240px;

  /* Names the admin views were written against, mapped onto the palette above */
  --ink: var(--bark);
  --muted: var(--bark-soft);
  --white: var(--paper);
  --cream: var(--raw);
  --taupe: var(--sand-deep);
  --clay: var(--sienna);
  --tan: var(--ochre);
  --olive: var(--moss);
  --olive-dark: var(--moss);
  --shadow: 0 1px 2px rgba(59, 47, 37, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--bark);
  background: var(--raw);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 2px solid var(--sienna);
  outline-offset: 2px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--raw);
  border-bottom: 1px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 60;
}

.announce {
  background: var(--bark);
  color: var(--raw);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  padding: 8px 0;
}

.announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.announce .lang-switch a { color: var(--sand); }
.announce .lang-switch a.active { color: var(--raw); border-bottom-color: var(--ochre); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px var(--gutter);
}

.logo {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--bark);
  white-space: nowrap;
}

.logo small {
  display: block;
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--sienna);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-right: auto;
  font-family: var(--display);
  font-size: 0.93rem;
  font-weight: 500;
}

.main-nav > a, .nav-drop > button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  color: var(--bark);
  background: none;
  border: none;
  font: inherit;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s, color 0.18s;
}

.main-nav > a:hover, .nav-drop > button:hover,
.main-nav > a.active { color: var(--sienna); border-bottom-color: var(--sienna); }

.nav-drop { position: relative; }

.nav-drop > button::after {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 210px;
  background: var(--paper);
  border: 1px solid var(--sand);
  box-shadow: var(--lift);
  padding: 8px;
  display: none;
  z-index: 20;
}

.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu { display: block; }

.nav-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: var(--body);
  color: var(--bark-soft);
  transition: background 0.15s, color 0.15s;
}

.nav-menu a:hover { background: var(--raw); color: var(--sienna); }

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

.header-search { display: flex; align-items: center; }

.header-search input {
  width: 168px;
  padding: 8px 12px;
  border: 1px solid var(--sand);
  border-right: none;
  background: var(--paper);
  color: var(--bark);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s;
}

.header-search input:focus { border-color: var(--sienna); }

.header-search button {
  padding: 8px 12px;
  border: 1px solid var(--sand);
  border-left: none;
  background: var(--paper);
  color: var(--bark-soft);
  line-height: 1;
  transition: background 0.18s, color 0.18s;
}

.header-search button:hover { background: var(--sienna); color: var(--paper); border-color: var(--sienna); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
}

.cart-link:hover { color: var(--sienna); }

.cart-count {
  background: var(--sienna);
  color: var(--paper);
  font-size: 0.72rem;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-weight: 600;
}

.lang-switch { display: flex; gap: 10px; font-size: 0.8rem; }

.lang-switch a {
  border-bottom: 1.5px solid transparent;
  color: var(--bark-soft);
  transition: color 0.18s, border-color 0.18s;
}

.lang-switch a.active { color: var(--bark); border-bottom-color: var(--sienna); }

.nav-toggle { display: none; background: none; border: none; padding: 8px; color: var(--bark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-primary { background: var(--sienna); color: var(--paper); }
.btn-primary:hover { background: var(--sienna-deep); }

.btn-outline { border-color: var(--bark); color: var(--bark); background: transparent; }
.btn-outline:hover { background: var(--bark); color: var(--raw); }

.btn-light { background: var(--paper); color: var(--bark); }
.btn-light:hover { background: var(--raw); }

.btn-clay { background: var(--bark); color: var(--raw); }
.btn-clay:hover { background: #2b2019; }

.btn-sm { padding: 8px 16px; font-size: 0.84rem; }
.btn-block { width: 100%; }

.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bark);
  color: var(--raw);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(43, 33, 25, 0.95) 0%, rgba(43, 33, 25, 0.9) 32%, rgba(43, 33, 25, 0.6) 52%, rgba(43, 33, 25, 0.2) 78%, rgba(43, 33, 25, 0.08) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 104px var(--gutter) 96px;
}

.hero-copy { max-width: 600px; }

.hero-kicker {
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ochre);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero p {
  font-size: 1.08rem;
  color: var(--sand);
  margin-bottom: 32px;
  max-width: 46ch;
}

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

/* ---------- Price-break ladder ---------- */
.ladder {
  background: var(--paper);
  border-bottom: 1px solid var(--sand);
}

.ladder-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
}

.ladder-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 32px 22px 0;
  min-width: 210px;
}

.ladder-label strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}

.ladder-label span { font-size: 0.86rem; color: var(--bark-soft); }

.ladder-step {
  flex: 1;
  min-width: 150px;
  padding: 22px 26px;
  border-left: 1px solid var(--sand);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ladder-step .step-qty {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--sienna);
}

.ladder-step:last-child .step-qty { color: var(--ochre); }

.ladder-step .step-note {
  font-size: 0.84rem;
  color: var(--bark-soft);
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.section-alt { background: var(--paper); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sand);
}

.section-head h2 { font-size: 1.62rem; }
.section-head p { font-size: 0.92rem; color: var(--bark-soft); margin-top: 4px; }

.section-head a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sienna);
  border-bottom: 1.5px solid currentColor;
  white-space: nowrap;
  padding-bottom: 2px;
}

.section-head a:hover { color: var(--sienna-deep); }

/* ---------- Category tiles ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}

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

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

.category-card .label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 20px 18px;
  background: linear-gradient(to top, rgba(59, 47, 37, 0.82), transparent);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
}

.category-card .label small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--sand);
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.product-card:hover { border-color: var(--bark-soft); }

.product-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--sand);
  position: relative;
  overflow: hidden;
}

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

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
}

.badge-sale { background: var(--sienna); color: var(--paper); }
.badge-out { background: var(--bark); color: var(--raw); }
.badge-bulk { background: var(--ochre); color: var(--bark); top: auto; bottom: 10px; }

.product-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }

.product-cat { font-size: 0.76rem; color: var(--bark-soft); letter-spacing: 0.04em; }

.product-name {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.product-name:hover { color: var(--sienna); }

.product-price { margin-top: 10px; display: flex; gap: 9px; align-items: baseline; }

.price { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--bark); }
.price-old { color: var(--bark-soft); text-decoration: line-through; font-size: 0.86rem; }
.price-sale { color: var(--sienna); }

.tier-note {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sienna);
  margin-top: 2px;
}

.stock-line { font-size: 0.78rem; color: var(--bark-soft); margin-top: 2px; }
.stock-line.low { color: var(--ochre); font-weight: 600; }
.stock-line.out { color: var(--danger); }

/* Size chips + quick add inside a card */
.card-buy { margin-top: 12px; border-top: 1px solid var(--sand); padding-top: 12px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.chip-row input { position: absolute; opacity: 0; width: 0; height: 0; }

.chip-row label {
  min-width: 34px;
  padding: 5px 8px;
  text-align: center;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bark-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip-row label:hover { border-color: var(--sienna); color: var(--sienna); }

.chip-row input:checked + label {
  background: var(--bark);
  border-color: var(--bark);
  color: var(--raw);
}

.chip-row input:focus-visible + label { outline: 2px solid var(--sienna); outline-offset: 2px; }

/* Colour names are words, not size codes, so they need room to read */
.chip-row-color label {
  min-width: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.76rem;
  padding: 4px 9px;
}

.card-add {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: transparent;
  color: var(--bark);
  border: 1.5px solid var(--bark);
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s;
}

.card-add:hover { background: var(--sienna); border-color: var(--sienna); color: var(--paper); }
.card-add:disabled { opacity: 0.4; cursor: not-allowed; }
.card-add:disabled:hover { background: transparent; color: var(--bark); border-color: var(--bark); }

/* ---------- About strip ---------- */
.about-strip { max-width: 62ch; }
.about-strip h2 { font-size: 1.5rem; margin-bottom: 12px; }
.about-strip p { color: var(--bark-soft); }

/* ---------- Shop toolbar ---------- */
.shop-head { padding: 40px 0 0; }
.page-title { font-size: 1.9rem; margin: 0 0 6px; }
.page-sub { color: var(--bark-soft); font-size: 0.95rem; margin-bottom: 26px; }

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--sand);
}

.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }

.pill {
  padding: 7px 17px;
  border: 1px solid var(--sand);
  border-radius: 999px;
  font-size: 0.87rem;
  color: var(--bark-soft);
  background: transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.pill:hover { border-color: var(--sienna); color: var(--sienna); }
.pill.active { background: var(--bark); border-color: var(--bark); color: var(--raw); }

.shop-controls { display: flex; gap: 8px; align-items: center; }

.input, select.input, textarea.input {
  padding: 10px 14px;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--bark);
  outline: none;
  transition: border-color 0.18s;
  width: 100%;
}

.input:focus { border-color: var(--sienna); }
.shop-controls .input { width: auto; }

.result-count { font-size: 0.88rem; color: var(--bark-soft); margin-bottom: 18px; }

/* Storefront pages need breathing room before the footer */
main > .container:last-child { padding-bottom: 76px; }

/* ---------- Pagination ---------- */
.pagination-wrap { margin-top: 46px; display: flex; justify-content: center; }
.pagination-wrap nav { display: flex; gap: 6px; }

/* ---------- Product detail ---------- */
.crumbs { font-size: 0.85rem; color: var(--bark-soft); padding: 22px 0 0; }
.crumbs a:hover { color: var(--sienna); }
.crumbs span { margin: 0 7px; color: var(--sand-deep); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 28px 0 64px;
}

.product-detail-img {
  aspect-ratio: 3 / 4;
  background: var(--sand);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.product-detail-info .product-cat { margin-bottom: 8px; }
.product-detail-info h1 { font-size: 2.05rem; margin-bottom: 14px; }

.product-detail-price { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.product-detail-price .price { font-size: 1.85rem; }
.product-detail-price .price-old { font-size: 1.05rem; }

.product-desc { color: var(--bark-soft); margin-bottom: 28px; white-space: pre-line; max-width: 56ch; }

.option-row { margin-bottom: 22px; }

.option-row > label {
  display: block;
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-options input { position: absolute; opacity: 0; width: 0; height: 0; }

.size-options label {
  min-width: 48px;
  padding: 10px 16px;
  text-align: center;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.size-options label:hover { border-color: var(--sienna); color: var(--sienna); }
.size-options input:checked + label { background: var(--bark); color: var(--raw); border-color: var(--bark); }
.size-options input:focus-visible + label { outline: 2px solid var(--sienna); outline-offset: 2px; }

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

.stock-note { font-size: 0.9rem; color: var(--moss); margin-bottom: 20px; }
.stock-note.low { color: var(--ochre); font-weight: 600; }
.stock-note.out { color: var(--danger); }

.meta-list {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
  font-size: 0.88rem;
  color: var(--bark-soft);
  display: grid;
  gap: 6px;
}

/* ---------- Bulk pricing ---------- */
.bulk-pricing {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-left: 3px solid var(--ochre);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 26px;
}

.bulk-pricing-title {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 4px;
}

.bulk-pricing-sub { font-size: 0.82rem; color: var(--bark-soft); margin-bottom: 12px; }

.bulk-tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bulk-tbl td { padding: 8px 4px; border-bottom: 1px solid var(--sand); }
.bulk-tbl tr:last-child td { border-bottom: none; }
.bulk-tbl td:nth-child(2) { font-family: var(--display); font-weight: 700; color: var(--bark); }
.bulk-tbl td:last-child { text-align: right; }

.bulk-off {
  display: inline-block;
  background: var(--ochre);
  color: var(--bark);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius);
}

td .variant.bulk-off { background: none; color: var(--moss); padding: 2px 0; font-size: 0.8rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); }

table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }

.tbl th {
  text-align: left;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bark-soft);
  padding: 14px 18px;
  border-bottom: 1px solid var(--sand);
}

.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--sand); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }

.cart-item { display: flex; align-items: center; gap: 14px; }
.cart-item img { width: 62px; height: 78px; object-fit: cover; border-radius: var(--radius); background: var(--sand); }
.cart-item .name { font-family: var(--display); font-weight: 600; font-size: 0.96rem; }
.cart-item .variant { font-size: 0.82rem; color: var(--bark-soft); }

/* ---------- Cart / checkout ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: 36px; align-items: start; padding-bottom: 76px; }

.summary-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 132px;
}

.summary-card h3 { font-size: 1.12rem; margin-bottom: 18px; }

.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.94rem; color: var(--bark-soft); }
.summary-row.save { color: var(--moss); font-weight: 600; }

.summary-row.total {
  border-top: 1px solid var(--sand);
  margin-top: 10px;
  padding-top: 16px;
  color: var(--bark);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}

.cart-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.summary-cta { margin-top: 20px; }
.summary-divide { border-top: 1px solid var(--sand); margin-top: 10px; padding-top: 12px; }

.checkout-panel {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 28px;
}

.checkout-panel h3 { font-size: 1.12rem; margin-bottom: 20px; }

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

.field label { display: block; font-family: var(--display); font-size: 0.88rem; font-weight: 600; margin-bottom: 7px; }
.field .error { color: var(--danger); font-size: 0.82rem; margin-top: 5px; }

.pay-options { display: grid; gap: 10px; }

.pay-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--paper);
  transition: border-color 0.18s, background 0.18s;
}

.pay-options label:has(input:checked) { border-color: var(--sienna); background: var(--raw); }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: var(--radius); margin: 20px 0; font-size: 0.93rem; border: 1px solid; }
.alert-success { background: #e6ead9; color: #465036; border-color: #cbd4b4; }
.alert-error { background: #f2ded8; color: var(--danger); border-color: #dcbbb0; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 84px 20px; color: var(--bark-soft); }
.empty-state h2 { font-size: 1.3rem; color: var(--bark); margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; }

/* ---------- Success ---------- */
.success-box {
  max-width: 640px;
  margin: 64px auto 84px;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-top: 3px solid var(--moss);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
}

.success-box .icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--moss);
  color: var(--paper);
  font-size: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.success-box h1 { font-size: 1.75rem; margin-bottom: 10px; }
.success-box .order-no { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--sienna); letter-spacing: 0.06em; margin: 16px 0; }
.success-box p { color: var(--bark-soft); margin-bottom: 26px; }
.success-box .tbl { min-width: 0; margin: 20px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bark); color: var(--sand); margin-top: 0; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 60px var(--gutter) 44px;
}

.footer-inner h4 {
  color: var(--paper);
  font-size: 0.95rem;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-inner p, .footer-inner a, .footer-inner li { font-size: 0.9rem; color: var(--sand); }
.footer-inner ul { list-style: none; display: grid; gap: 9px; }
.footer-inner a:hover { color: var(--paper); }

.footer-brand .logo { color: var(--paper); margin-bottom: 14px; display: inline-block; }
.footer-brand p { max-width: 34ch; margin-bottom: 18px; }

.social-row { display: flex; gap: 10px; }

.social-row a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(220, 204, 180, 0.3);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.social-row a:hover { background: var(--sienna); border-color: var(--sienna); color: var(--paper); }

.pay-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.pay-chip {
  padding: 5px 11px;
  border: 1px solid rgba(220, 204, 180, 0.3);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sand);
}

.footer-bottom {
  border-top: 1px solid rgba(220, 204, 180, 0.18);
  padding: 18px var(--gutter);
  font-size: 0.82rem;
  color: var(--bark-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom a { color: var(--bark-soft); }
.footer-bottom a:hover { color: var(--sand); }

/* ============================================
   Admin
   ============================================ */
.admin-body { background: var(--raw); min-height: 100vh; display: flex; }

.admin-sidebar {
  width: 236px;
  background: var(--bark);
  color: var(--sand);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}

.admin-logo {
  padding: 26px 24px 20px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--paper);
  font-size: 1rem;
  border-bottom: 1px solid rgba(220, 204, 180, 0.15);
}

.admin-logo small { display: block; font-weight: 500; color: var(--ochre); font-size: 0.7rem; letter-spacing: 0.16em; margin-top: 3px; }

.admin-nav { padding: 18px 12px; display: grid; gap: 4px; align-content: start; flex: 1; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  color: var(--sand);
  transition: background 0.18s, color 0.18s;
}

.admin-nav a:hover { background: rgba(220, 204, 180, 0.1); color: var(--paper); }
.admin-nav a.active { background: var(--sienna); color: var(--paper); }

.admin-side-footer { padding: 16px 12px; border-top: 1px solid rgba(220, 204, 180, 0.15); display: grid; gap: 4px; }

.admin-side-footer a, .admin-side-footer button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 14px; border-radius: var(--radius);
  font-size: 0.9rem; color: var(--sand); background: none; border: none; text-align: left;
}

.admin-side-footer a:hover, .admin-side-footer button:hover { background: rgba(220, 204, 180, 0.1); color: var(--paper); }

.admin-main { margin-left: 236px; flex: 1; padding: 34px 38px 60px; min-width: 0; }

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-header h1 { font-size: 1.5rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 34px; }

.stat-card { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); padding: 22px; }
.stat-card .label { font-size: 0.82rem; color: var(--bark-soft); margin-bottom: 8px; }
.stat-card .value { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--bark); }
.stat-card.accent .value { color: var(--sienna); }

.panel { background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); margin-bottom: 28px; overflow: hidden; }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--sand); display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { font-size: 1.05rem; }
.panel-body { padding: 22px; }

.status-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; }
.status-pending { background: #f0e2c4; color: #7f6427; }
.status-paid { background: #dde5cf; color: #4b5a39; }
.status-shipped { background: #dbe1e7; color: #47596c; }
.status-completed { background: #d9e6d6; color: #41603c; }
.status-cancelled { background: #eedad3; color: var(--danger); }

.admin-form { display: grid; gap: 20px; max-width: 860px; }
.admin-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.check-row { display: flex; gap: 26px; align-items: center; }
.check-row label { display: flex; gap: 8px; align-items: center; font-size: 0.95rem; cursor: pointer; }

.thumb-sm { width: 46px; height: 58px; object-fit: cover; border-radius: var(--radius); background: var(--sand); }

.inline-actions { display: flex; gap: 8px; align-items: center; }
.inline-actions form { display: inline; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--raw); padding: 20px; }
.login-card { width: 100%; max-width: 410px; background: var(--paper); border: 1px solid var(--sand); border-radius: var(--radius); padding: 40px 36px; }
.login-card .logo { display: block; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--bark-soft); font-size: 0.88rem; margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .header-search input { width: 130px; }
}

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .nav-toggle { display: inline-flex; order: 1; margin-left: auto; }
  .main-nav {
    order: 4;
    width: 100%;
    margin-right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--sand);
    padding-top: 8px;
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .nav-drop > button { width: 100%; padding: 11px 0; border-bottom: 1px solid var(--sand); }
  .nav-drop > button { justify-content: space-between; }
  .nav-menu { position: static; display: block; border: none; box-shadow: none; padding: 0 0 8px 14px; background: none; }
  .header-actions { order: 2; }
  .header-search { display: none; }

  .hero-inner { padding: 72px var(--gutter) 64px; }
  /* Narrow screens put the copy over the busiest part of the art */
  .hero-media::after { background: rgba(43, 33, 25, 0.88); }
  .product-detail { grid-template-columns: 1fr; gap: 30px; padding: 20px 0 44px; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .admin-sidebar { position: static; width: 100%; inset: auto; }
  .admin-body { flex-direction: column; }
  .admin-main { margin-left: 0; padding: 24px 18px 50px; }
  .admin-form .row-2, .admin-form .row-3, .form-grid .row-2 { grid-template-columns: 1fr; }
  .ladder-label { min-width: 100%; padding-bottom: 12px; }
  .ladder-step { border-left: none; border-top: 1px solid var(--sand); padding: 16px 0; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .category-grid { gap: 12px; }
  .product-info { padding: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .announce-inner { font-size: 0.74rem; }
  .hero h1 { font-size: 2.1rem; }
}

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