/* ====================================================================
   The Banks Statement — single stylesheet
   Palette is the single source of truth in :root. Adjust here to retone.
==================================================================== */

:root {
  --cream:         #EBDED0;
  --warm-ivory:    #F5EDE0;
  --sandstone:     #C7AC8F;
  --terracotta:    #C77B58;
  --rust:          #B05B3B;
  --maroon:        #6E1F1F;
  --leather:       #7B4C2C;
  --fern-green:    #6B7553;
  --moss:          #4C4C34;
  --flint:         #413933;
  --soft-charcoal: #3A3530;

  /* Deep olive + antique gold (richer accents pulled from the wife's logo inspo) */
  --olive-deep:    #2F3E27;   /* hero / footer / promo bar — feels grounded and luxe */
  --olive-rich:    #485D3D;   /* slightly lighter — accents, hover states */
  --gold:          #C9B26E;   /* champagne gold — brand accents, badges */
  --gold-soft:     #D9C685;   /* lighter gold — highlights, glow layers */

  --text:          var(--flint);
  --heading:       var(--soft-charcoal);
  --bg:            var(--cream);
  --surface:       var(--warm-ivory);
  --border:        rgba(65, 57, 51, 0.15);
  --border-strong: rgba(65, 57, 51, 0.35);
  --shadow-sm:     0 1px 3px rgba(58, 53, 48, 0.08);
  --shadow-md:     0 6px 18px rgba(58, 53, 48, 0.12);

  --font-serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius:        4px;
  --radius-lg:     10px;
  --maxw:          1280px;
}

/* ---------------------- Reset / base ---------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: 2.5rem; line-height: 1.15; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }
a  { color: var(--leather); text-decoration: none; }
a:hover { color: var(--maroon); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

/* ---------------------- Buttons ---------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, transform 0.05s;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--rust);
  color: var(--warm-ivory);
  box-shadow: 0 0 0 0 transparent;
  transition: background 0.15s, color 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--olive-deep);
  color: var(--gold-soft);
  box-shadow: 0 0 0 2px var(--gold);
}
.btn-secondary {
  background: transparent;
  color: var(--flint);
  border-color: var(--flint);
}
.btn-secondary:hover {
  background: var(--flint);
  color: var(--warm-ivory);
}
.btn-ghost {
  background: transparent;
  color: var(--leather);
  padding: 8px 14px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}
.btn-ghost:hover { color: var(--maroon); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--rust); }

/* ---------------------- Promo bar ---------------------- */
.promo-bar {
  background: var(--olive-deep);
  color: var(--gold-soft);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 16px;
}

/* ---------------------- Header ---------------------- */
.site-header {
  background: var(--warm-ivory);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--soft-charcoal);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover { color: var(--maroon); }
.brand .brand-mark { color: var(--rust); }

.search {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}
.search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--flint);
  outline: none;
  transition: border-color 0.15s;
}
.search input::placeholder { color: rgba(65, 57, 51, 0.55); }
.search input:focus { border-color: var(--leather); }
.search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--leather);
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--flint);
  transition: background 0.15s, color 0.15s;
}
.icon-link:hover {
  background: var(--cream);
  color: var(--maroon);
}
.icon-link svg { width: 22px; height: 22px; }

/* The little "Admin" pill in the header. It replaced the old camera icon —
   a plain word is much easier to find than a mystery icon, and shoppers who
   aren't the owner will simply ignore it. Kept quiet on purpose. */
.admin-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-charcoal);
  transition: border-color 0.15s, color 0.15s;
}
.admin-btn:hover {
  border-color: var(--rust);
  color: var(--rust);
}
.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--rust);
  color: var(--warm-ivory);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.badge:empty,
.badge[data-count="0"] { display: none; }

/* ---------------------- Nav ---------------------- */
.site-nav {
  background: var(--warm-ivory);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-block;
  padding: 14px 18px;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--flint);
  position: relative;
  transition: color 0.15s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.nav-link:hover {
  color: var(--olive-deep);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}
.nav-link.is-active {
  color: var(--olive-deep);
}
.nav-link .caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7em;
  vertical-align: middle;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 60;
}
.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--flint);
  font-size: 0.88rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}
.nav-dropdown a:hover {
  background: var(--cream);
  color: var(--maroon);
}
.nav-dropdown .dd-heading {
  display: block;
  padding: 8px 14px 4px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leather);
  font-weight: 700;
}

/* Mega menu: Categories nav uses 3 columns (Mens / Womens / Children) each with shirt-type sub-links. */
.nav-dropdown.mega {
  min-width: 580px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.nav-dropdown-col {
  display: flex;
  flex-direction: column;
}
.nav-dropdown.mega .dd-heading {
  padding: 4px 14px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: var(--soft-charcoal);
  font-size: 0.78rem;
}
.nav-dropdown.mega .dd-shop-all {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rust);
}
.nav-dropdown.mega .dd-shop-all:hover {
  background: var(--cream);
  color: var(--maroon);
}
@media (max-width: 760px) {
  .nav-dropdown.mega {
    min-width: 280px;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ---------------------- Hero ---------------------- */
.hero {
  background:
    radial-gradient(circle at 70% 30%, rgba(201, 178, 110, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(47, 62, 39, 0.16), rgba(72, 93, 61, 0.10) 50%, rgba(201, 178, 110, 0.10)),
    var(--cream);
  padding: 80px 0 90px;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  max-width: 820px;
  margin: 0 auto 6px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 18px;
  font-weight: 700;
}
.hero .eyebrow::before,
.hero .eyebrow::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin: 0 12px;
}
.hero .lede {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  color: rgba(65, 57, 51, 0.85);
}

/* Gold flourish under the hero headline (tie-back to the inspiration logo) */
.hero-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto 22px;
  color: var(--gold);
}
.hero-flourish .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-flourish .ornament {
  font-size: 0.7rem;
  opacity: 0.85;
}
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------------- Trust strip ---------------------- */
.trust-strip {
  background: var(--warm-ivory);
  border-top: 1px solid rgba(201, 178, 110, 0.3);
  border-bottom: 1px solid rgba(201, 178, 110, 0.3);
  padding: 22px 0;
}
.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  text-align: center;
}
.trust-strip li {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--leather);
  font-weight: 600;
}
.trust-strip strong {
  display: block;
  color: var(--olive-deep);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  font-family: var(--font-serif);
  text-transform: none;
  font-weight: 600;
}

/* ---------------------- Section ---------------------- */
.section { padding: 64px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.section-header h2 { margin: 0; }
.section-header .eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 8px;
  font-weight: 700;
}

/* ---------------------- Product grid + cards ---------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--gold);
  border-color: var(--gold);
}
.product-image {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.product-image .shirt-svg {
  width: 86%;
  height: 92%;
  filter: drop-shadow(0 8px 18px rgba(58, 53, 48, 0.18));
  transition: transform 0.25s ease;
}
.product-card:hover .product-image .shirt-svg {
  transform: translateY(-3px) scale(1.02);
}

/* Real-photo overlay — when a photo loads from /tshirt pictures/box N/, it
   covers the SVG mockup. If no photo is found, the SVG remains visible. */
.product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  z-index: 1;
}
.has-photo .shirt-svg { display: none; }
.has-photo .product-flags { z-index: 2; }
.product-card .wishlist-toggle { z-index: 3; }
.product-flags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.flag {
  background: var(--soft-charcoal);
  color: var(--warm-ivory);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 2px;
}
.flag.flag-new { background: var(--fern-green); }
.flag.flag-sale { background: var(--maroon); }

.wishlist-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 237, 224, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--flint);
  z-index: 2;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.wishlist-toggle:hover {
  background: var(--warm-ivory);
  color: var(--maroon);
  transform: scale(1.05);
}
.wishlist-toggle svg { width: 18px; height: 18px; }
.wishlist-toggle.is-saved { color: var(--maroon); }
.wishlist-toggle.is-saved svg { fill: currentColor; }

.product-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-type {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leather);
  font-weight: 600;
}
.product-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--soft-charcoal);
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}
.product-name a { color: inherit; }
.product-name a:hover { color: var(--maroon); }
.product-price {
  font-weight: 600;
  color: var(--flint);
  margin-top: 4px;
}
.product-price .original {
  color: rgba(65, 57, 51, 0.5);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 6px;
}
.product-price .sale { color: var(--maroon); }
.product-card-actions {
  margin-top: auto;
  padding-top: 12px;
}

/* ---------------------- Category tiles (home) ---------------------- */
.category-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.category-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-lg);
  color: var(--warm-ivory);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--gold);
  color: var(--warm-ivory);
}
.category-tile span { position: relative; z-index: 1; padding: 16px; }
.category-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.25));
}

/* ---------------------- Category page layout ---------------------- */
.cat-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 40px 0 80px;
}
.cat-sidebar {
  align-self: start;
  position: sticky;
  top: 130px;
}
.filter-group {
  margin-bottom: 26px;
}
.filter-group h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--soft-charcoal);
  font-weight: 700;
}
.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--flint);
}
.filter-list input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  background: var(--warm-ivory);
  cursor: pointer;
}
.filter-list input[type="checkbox"]:checked {
  background: var(--rust);
  border-color: var(--rust);
}
.filter-list input[type="checkbox"]:checked::after {
  content: '✓';
  color: var(--warm-ivory);
  font-size: 11px;
  font-weight: 700;
}
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--warm-ivory);
  outline: 1.5px solid var(--border-strong);
  cursor: pointer;
  transition: transform 0.1s, outline-color 0.15s;
  position: relative;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.is-selected {
  outline-color: var(--soft-charcoal);
  outline-width: 2px;
}
.color-swatch.is-selected::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed var(--soft-charcoal);
}

.cat-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cat-results-bar .count {
  font-size: 0.9rem;
  color: var(--leather);
}
.cat-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--leather);
}

/* ---------------------- Product detail ---------------------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 1fr;
  gap: 56px;
  padding: 50px 0 80px;
}
.pd-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pd-main-image {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
  position: relative; /* anchors the absolutely-positioned .product-photo img */
  overflow: hidden;
}
.pd-main-image .shirt-svg {
  width: 78%;
  height: 92%;
  filter: drop-shadow(0 14px 28px rgba(58, 53, 48, 0.22));
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pd-thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
}
.pd-thumb .shirt-svg { width: 80%; height: 90%; }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.is-active { border-color: var(--rust); }

.pd-info .crumbs {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leather);
  margin-bottom: 14px;
}
.pd-info h1 { font-size: 2rem; margin-bottom: 12px; }
.pd-price { font-size: 1.4rem; font-weight: 600; margin-bottom: 24px; }
.pd-section { margin-bottom: 22px; }
.pd-section .label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--soft-charcoal);
  margin-bottom: 10px;
}
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option {
  min-width: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--warm-ivory);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--flint);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.size-option:hover { border-color: var(--rust); }
.size-option.is-selected {
  background: var(--soft-charcoal);
  color: var(--warm-ivory);
  border-color: var(--soft-charcoal);
}
/* Stock indicator on product detail page */
.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  margin: 18px 0 0;
}
.pd-stock.in {
  background: rgba(107, 117, 83, 0.18);
  color: var(--moss);
}
.pd-stock.low {
  background: rgba(199, 123, 88, 0.22);
  color: var(--rust);
}
.pd-stock.out {
  background: rgba(110, 31, 31, 0.15);
  color: var(--maroon);
}

.pd-actions {
  display: flex;
  gap: 12px;
  margin: 28px 0 18px;
  flex-wrap: wrap;
}
.pd-actions .btn-primary { flex: 1; min-width: 200px; }
.pd-desc {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: rgba(65, 57, 51, 0.85);
}
.pd-meta {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--leather);
}
.pd-meta li { padding: 4px 0; }

/* ---------------------- Cart ---------------------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 40px 0 80px;
}
.cart-items { display: flex; flex-direction: column; gap: 18px; }
.cart-line {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.cart-line .thumb {
  width: 110px;
  height: 130px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative; /* anchors the absolutely-positioned .product-photo img */
  overflow: hidden;
}
.cart-line .thumb .shirt-svg { width: 90%; height: 95%; }
.cart-line h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cart-line .meta {
  font-size: 0.85rem;
  color: var(--leather);
  margin-bottom: 10px;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty button {
  width: 32px;
  height: 34px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--flint);
  background: var(--warm-ivory);
}
.qty button:hover { background: var(--cream); }
.qty .qty-value {
  width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.cart-line-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cart-line-end .line-total { font-weight: 600; font-size: 1.05rem; }
.remove-link {
  background: none;
  color: var(--leather);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.remove-link:hover { color: var(--maroon); }

.cart-summary {
  align-self: start;
  position: sticky;
  top: 130px;
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.cart-summary h3 { font-size: 1.1rem; margin-bottom: 16px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.95rem;
}
.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--soft-charcoal);
}
.cart-summary .btn { margin-top: 16px; }
.cart-summary small {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--leather);
}

.empty-state {
  text-align: center;
  padding: 70px 24px;
}
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { color: var(--leather); margin-bottom: 22px; }

/* ---------------------- Account ---------------------- */
.account-layout { padding: 40px 0 80px; }
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.tab-btn {
  padding: 14px 22px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--leather);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--rust); }
.tab-btn.is-active {
  color: var(--soft-charcoal);
  border-bottom-color: var(--rust);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.order-card {
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.order-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.order-head dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 18px;
  row-gap: 4px;
  font-size: 0.85rem;
}
.order-head dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--leather);
  font-weight: 700;
  align-self: center;
}
.order-head dd { margin: 0; font-weight: 500; align-self: center; }
.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--cream);
  color: var(--leather);
}
.status-pill.delivered { background: rgba(107, 117, 83, 0.18); color: var(--moss); }
.status-pill.shipped   { background: rgba(199, 123, 88, 0.2);  color: var(--rust); }
.status-pill.processing{ background: rgba(199, 172, 143, 0.3); color: var(--leather); }
.order-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.order-items li {
  display: flex;
  justify-content: space-between;
  color: var(--flint);
}

.message-card {
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: start;
}
.message-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fern-green);
  color: var(--warm-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
}
.message-card.unread { border-left: 3px solid var(--rust); }
.message-card h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: var(--soft-charcoal);
}
.message-card p { margin: 0; font-size: 0.9rem; color: rgba(65, 57, 51, 0.8); }
.message-card .time { font-size: 0.78rem; color: var(--leather); white-space: nowrap; }

/* ---------------------- Footer ---------------------- */
.site-footer {
  background: var(--olive-deep);
  color: var(--cream);
  padding: 56px 0 22px;
  margin-top: 60px;
  border-top: 1px solid rgba(201, 178, 110, 0.15);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-cols h4 {
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.footer-brand h3 {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.7rem;
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.footer-brand p { color: rgba(235, 222, 208, 0.7); font-size: 0.9rem; }
.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-cols ul a {
  color: rgba(235, 222, 208, 0.78);
  font-size: 0.88rem;
}
.footer-cols ul a:hover { color: var(--gold-soft); }
.social {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(235, 222, 208, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  transition: background 0.15s;
}
.social a:hover { background: var(--gold); color: var(--olive-deep); }
.footer-bottom {
  border-top: 1px solid rgba(235, 222, 208, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(235, 222, 208, 0.55);
  flex-wrap: wrap;
  gap: 10px;
}
.payment-icons {
  display: flex;
  gap: 6px;
}
.payment-icons span {
  width: 36px;
  height: 22px;
  border-radius: 3px;
  background: rgba(235, 222, 208, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: rgba(235, 222, 208, 0.7);
}

/* ---------------------- Admin subnav ----------------------
   Tabs across all admin pages (photo manager, orders, inventory, settings).
   Sits right under the storefront header.
*/
.admin-subnav {
  background: var(--soft-charcoal);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.admin-subnav ul {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 24px;
  list-style: none;
}
.admin-subnav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(235, 222, 208, 0.7);
  transition: color 0.15s, background 0.15s;
}
.admin-subnav a:hover {
  color: var(--warm-ivory);
}
.admin-subnav a.active {
  background: var(--rust);
  color: var(--warm-ivory);
}
.admin-subnav .signed-in-as {
  margin-left: auto;
  padding: 8px 12px;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.admin-subnav .signed-in-as strong {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}
.admin-subnav .signout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.admin-subnav .signout-btn:hover {
  color: var(--warm-ivory);
  background: rgba(255,255,255,0.08);
}

/* ---------------------- Newsletter signup modal + footer form ---------------------- */
.nl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 53, 48, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.nl-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nl-modal {
  background: var(--warm-ivory);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  padding: 36px 36px 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: translateY(20px);
  transition: transform 0.25s;
}
.nl-overlay.is-open .nl-modal { transform: translateY(0); }
.nl-modal .close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--leather);
  cursor: pointer;
  line-height: 1;
}
.nl-modal .close:hover { color: var(--maroon); }
.nl-modal .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 10px;
}
.nl-modal h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--soft-charcoal);
  margin: 0 0 10px;
  line-height: 1.15;
}
.nl-modal p {
  color: var(--flint);
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.nl-modal form { display: flex; gap: 8px; flex-direction: column; }
.nl-modal input[type="email"] {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--flint);
}
.nl-modal input[type="email"]:focus { outline: none; border-color: var(--leather); }
.nl-modal .btn { width: 100%; }
.nl-modal .fineprint {
  font-size: 0.74rem;
  color: var(--leather);
  margin-top: 12px;
  text-align: center;
}

.nl-success {
  text-align: center;
  padding: 12px 0;
}
.nl-success .code-pill {
  display: inline-block;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--cream);
  color: var(--rust);
  padding: 10px 22px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  margin: 14px 0;
  border: 1.5px dashed var(--rust);
}

/* Footer newsletter form (injected by JS) */
.footer-nl {
  margin-top: 20px;
}
.footer-nl .nl-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-ivory);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}
.footer-nl form {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin-bottom: 8px;
}
.footer-nl input {
  padding: 10px 12px;
  border: 1px solid rgba(235, 222, 208, 0.2);
  border-radius: var(--radius);
  background: rgba(235, 222, 208, 0.08);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.88rem;
}
.footer-nl input::placeholder { color: rgba(235, 222, 208, 0.5); }
.footer-nl input:focus { outline: none; border-color: var(--terracotta); }
.footer-nl button {
  padding: 10px 14px;
  background: var(--rust);
  color: var(--warm-ivory);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.footer-nl button:hover { background: var(--maroon); }
.footer-nl .nl-msg {
  font-size: 0.78rem;
  color: rgba(235, 222, 208, 0.7);
  margin-top: 6px;
}
.footer-nl .nl-msg.success { color: var(--terracotta); }

/* ---------------------- Free-shipping progress bar (cart + checkout) ---------------------- */
.fs-bar {
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.fs-bar .label { font-size: 0.92rem; margin: 0 0 10px; color: var(--flint); }
.fs-bar .label strong { color: var(--rust); }
.fs-bar .label.qualified { color: var(--fern-green); font-weight: 600; }
.fs-bar .track {
  height: 8px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
}
.fs-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rust), var(--terracotta));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.fs-bar.qualified .fill { background: var(--fern-green); }

/* ---------------------- Social-proof toaster (recent purchases) ---------------------- */
.sp-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--warm-ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 26px rgba(58, 53, 48, 0.18);
  max-width: 320px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 90;
}
.sp-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sp-toast .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fern-green);
  flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 117, 83, 0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(107, 117, 83, 0); }
}
.sp-toast .msg { font-size: 0.82rem; color: var(--flint); line-height: 1.3; }
.sp-toast .msg strong { color: var(--soft-charcoal); }
.sp-toast .msg .ago { color: var(--leather); font-size: 0.72rem; display: block; margin-top: 2px; }
.sp-toast .close-sp {
  background: none;
  border: none;
  color: var(--leather);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0 0 4px;
  line-height: 1;
}

/* ---------------------- Recently viewed carousel ---------------------- */
.recently-viewed {
  padding: 50px 0;
  background: var(--warm-ivory);
}
.recently-viewed h2 { margin-bottom: 20px; }

/* ---------------------- Best seller badge ---------------------- */
.flag.flag-bestseller {
  background: var(--gold);
  color: var(--olive-deep);
}

/* ---------------------- Toast ---------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--soft-charcoal);
  color: var(--warm-ivory);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------------- Responsive ---------------------- */
@media (max-width: 960px) {
  .header-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
  }
  .search { grid-column: 1 / -1; max-width: none; margin: 0; }
  .header-icons { justify-self: end; }
  .nav-list {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 8px;
    padding-right: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { scroll-snap-align: start; flex-shrink: 0; }
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  /* Admin subnav — same treatment on mobile so it scrolls without a scrollbar */
  .admin-subnav ul {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
  }
  .admin-subnav ul::-webkit-scrollbar { display: none; }
  .admin-subnav li { flex-shrink: 0; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 44px 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-image { aspect-ratio: 4 / 5; padding: 14px; }
  .product-body { padding: 12px; }
  .nav-link { padding: 12px 12px; font-size: 0.78rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .cart-line { grid-template-columns: 80px 1fr; }
  .cart-line .thumb { width: 80px; height: 96px; padding: 6px; }
  .cart-line-end { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .brand { font-size: 1.3rem; }
  .order-head { font-size: 0.78rem; }
  .message-card { grid-template-columns: 36px 1fr; }
  .message-card .time { grid-column: 2; }
}
