/* The Brotherhood Table Shop */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1B2F5B;
  --red: #D7352B;
  --walnut: #7A4A2E;
  --gold: #C9A24D;
  --cream: #FBF3E6;
  --paper: #FFFDF9;
  --text: #1B2F5B;
  --text-muted: #3E4A66;
  --border: #E4D5BC;
  --glass: rgba(255, 253, 249, 0.78);
  --shadow: 0 1px 2px rgba(27, 47, 91, 0.05), 0 8px 24px rgba(27, 47, 91, 0.06);
  --shadow-hover: 0 2px 6px rgba(27, 47, 91, 0.07), 0 16px 36px rgba(27, 47, 91, 0.09);
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --radius: 1rem;
  --max: 72rem;
  --ease: 0.2s ease;
  --gutter: max(1.35rem, env(safe-area-inset-left, 0px));
  --gutter-right: max(1.35rem, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 0.18em; transition: color var(--ease); }
a:hover { color: var(--walnut); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  z-index: 120;
  text-decoration: none;
  border-radius: 0.4rem;
}
.skip:focus { top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 243, 230, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  width: min(100% - var(--gutter) - var(--gutter-right), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  position: relative;
}
.brand { flex-shrink: 1; min-width: 0; text-decoration: none; }
.brand-logo { height: 3.35rem; width: auto; max-width: min(18rem, 58vw); }
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.1rem;
  flex-shrink: 0;
}
.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.cart-toggle:hover { background: rgba(201, 162, 77, 0.14); }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--walnut);
  margin-bottom: 0.7rem;
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
h1 { font-size: clamp(2.4rem, 6.4vw, 4.1rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.lede {
  font-size: 1.16rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0 0 1.6rem;
}

.hero, .empty-state, .catalog, .product-page {
  width: min(100% - var(--gutter) - var(--gutter-right), var(--max));
  margin-inline: auto;
}
.hero {
  text-align: center;
  padding: 4.5rem 0 3.5rem;
}
.hero .lede { margin-inline: auto; }
.empty-state {
  text-align: center;
  padding: 1rem 0 6rem;
}
.empty-state .lede { margin-inline: auto; }
.empty-state.receipt { padding-top: 4.5rem; }
.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  color: var(--navy);
}
.text-link:hover { color: var(--walnut); }

.catalog { padding: 0 0 5.5rem; }
.section-head { margin-bottom: 2rem; }
.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.4rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.product-card-image {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--ease), transform var(--ease);
}
.product-card:hover .product-card-image,
.product-card:focus-visible .product-card-image {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.product-card-image img,
.image-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-fallback {
  display: block;
  background: linear-gradient(160deg, #fffdf9, #f3e6ce);
}
.product-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.15rem 0;
}
.product-card-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.product-card-price {
  color: var(--walnut);
  font-weight: 500;
  font-size: 0.98rem;
}

.crumbs {
  padding: 1.6rem 0 1.2rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.crumbs a { text-decoration: none; font-weight: 600; }
.product-page { padding-bottom: 5.5rem; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.5rem 3.25rem;
  align-items: start;
}
.product-hero-image {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.15rem);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.product-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
  padding: 0;
}
.thumb {
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.product-info { padding-top: 0.4rem; }
.product-price {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--walnut);
  margin: 0 0 1.1rem;
}
.product-copy {
  color: var(--text-muted);
  max-width: 30rem;
  margin: 0 0 1.6rem;
}
.picker {
  border: 0;
  margin: 0 0 1.15rem;
  padding: 0;
}
.picker legend {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--walnut);
  margin-bottom: 0.55rem;
}
.picker-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatch, .size {
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.swatch.is-selected, .size.is-selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--paper);
}
.swatch:disabled, .size:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.picker-status {
  min-height: 1.4em;
  margin: 0 0 1rem;
  color: var(--walnut);
  font-size: 0.95rem;
}
.fine-print {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}
.btn:hover { background: #152447; color: var(--paper); }
.btn:disabled {
  background: #9aa3b5;
  color: #f7f4ee;
  cursor: not-allowed;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.8rem 0 max(3rem, env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  width: min(100% - var(--gutter) - var(--gutter-right), var(--max));
  margin-inline: auto;
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
}
.footer-mark { width: 3rem; height: 3rem; }
.footer-name { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
.footer-nav { display: flex; gap: 1.1rem; }
.footer-nav a { font-weight: 600; text-decoration: none; }
.footer-quiet, .footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 47, 91, 0.28);
  z-index: 80;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(26.5rem, 100%);
  background: var(--paper);
  border-left: 1px solid var(--border);
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) 1.35rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-hover);
}
.cart-head, .cart-foot {
  flex-shrink: 0;
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.8rem;
  border-bottom: 1px solid var(--border);
}
.cart-head h2 { margin: 0; font-size: 1.45rem; }
.cart-close {
  min-height: 44px;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cart-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 0;
}
.cart-empty { color: var(--text-muted); }
.cart-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--cream);
}
.cart-item-name { font-weight: 600; color: var(--navy); }
.cart-item-meta { color: var(--text-muted); font-size: 0.92rem; }
.cart-item-price { font-weight: 600; white-space: nowrap; }
.qty-row { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.4rem; }
.qty-row button {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cart-remove {
  margin-top: 0.35rem;
  border: 0;
  background: none;
  padding: 0;
  color: var(--walnut);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.cart-foot { padding-top: 0.9rem; display: grid; gap: 0.7rem; }
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.05rem;
}
.cart-note, .checkout-soon {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.checkout-soon { color: var(--walnut); font-weight: 600; }
.cart-foot .btn { width: 100%; }
.cart-error { margin: 0; color: #8a2a22; font-weight: 600; }


.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--gold); background: rgba(201, 162, 77, 0.1); }
.site-menu { position: static; }
.shop-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(24.5rem, calc(100vw - var(--gutter) - var(--gutter-right)));
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-hover);
  padding: 1.15rem 1.25rem 1.3rem;
  z-index: 70;
  display: grid;
  gap: 1.25rem;
}
.shop-menu-head {
  display: none;
}
.nav-heading {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.45rem;
}
.nav-section-shop .nav-heading { color: var(--navy); }
.nav-leave {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--walnut);
}
.nav-list, .nav-sub ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a, .nav-sub a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.15rem 0;
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
}
.nav-list a:hover, .nav-sub a:hover { color: var(--walnut); }
.nav-sub { margin-top: 0.55rem; }
.nav-subhead {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--walnut);
}
.nav-sub ul { padding-left: 0.15rem; }
.nav-note {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-style: italic;
}
.nav-section-external {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.why-shop {
  width: min(100% - var(--gutter) - var(--gutter-right), 36rem);
  margin: 0 auto 3.25rem;
  text-align: center;
}
.why-shop h2 { margin-bottom: 0.7rem; }
.why-shop p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.category-page { padding-top: 0.4rem; padding-bottom: 5.5rem; }
.footer-menus {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3.5rem;
  width: 100%;
}
.footer-menus .nav-section-external { padding-top: 0; border-top: 0; }
.footer-menus .nav-list a, .footer-menus .nav-sub a { min-height: 36px; }

@media (max-width: 860px) {
  .header-inner { position: static; }
  .shop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - 5rem);
    overflow: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 0.85rem var(--gutter) max(1.2rem, env(safe-area-inset-bottom, 0px));
  }
  .shop-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .shop-menu-kicker {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 1.2rem;
  }
  .nav-list a, .nav-sub a { min-height: 44px; }
}

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-layout { gap: 2.4rem; }
}
@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero { padding: 3.2rem 0 2.4rem; }
  .brand-logo { height: 2.6rem; }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: 1fr; gap: 1.35rem; }
  .header-inner { padding: 0.7rem 0; }
}

.cart-drawer[hidden],
.cart-backdrop[hidden],
.shop-menu[hidden] {
  display: none !important;
}
