/* Buymart catalogue — shared styles */

:root {
  --green-deep: #1F4B3F;
  --green-mid: #2E6A55;
  --mint: #F2F7F1;
  --tag-yellow: #F4C430;
  --coral: #E2583F;
  --ink: #1C2420;
  --paper: #FFFFFF;
  --muted: rgba(28, 36, 32, 0.55);
  --line: rgba(31, 75, 63, 0.12);
  --radius: 1rem;
  --shadow: 0 18px 30px -12px rgba(31, 75, 63, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mint);
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.font-display {
  font-family: "Fraunces", serif;
}

.font-mono {
  font-family: "Space Mono", monospace;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--green-deep);
  color: var(--mint);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

@media (min-width: 901px) {
  .site-header {
    position: sticky;
    top: 0;
  }
}

.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand cart"
    "search search"
    "nav nav";
  gap: 0.7rem 0.75rem;
  padding: 0.85rem 0 0.95rem;
  overflow: visible;
  align-items: center;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand__name {
  font-family: "Fraunces", serif;
  font-size: clamp(1.25rem, 4.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__badge {
  font-family: "Space Mono", monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tag-yellow);
  border: 1px solid rgba(244, 196, 48, 0.5);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Live search */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-search {
  grid-area: search;
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  z-index: 120;
}

.header-search__field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(242, 247, 241, 0.12);
  border: 1px solid rgba(242, 247, 241, 0.22);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search.is-open .header-search__field,
.header-search__field:focus-within {
  background: #fff;
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.header-search__icon {
  color: var(--tag-yellow);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.95;
}

.header-search.is-open .header-search__icon,
.header-search__field:focus-within .header-search__icon {
  color: var(--green-deep);
}

.header-search__input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--mint);
  font-family: "Work Sans", sans-serif;
  font-size: 0.92rem;
  min-width: 0;
  padding: 0.35rem 0;
}

.header-search.is-open .header-search__input,
.header-search__field:focus-within .header-search__input {
  color: var(--ink);
}

.header-search__input::placeholder {
  color: rgba(242, 247, 241, 0.55);
}

.header-search.is-open .header-search__input::placeholder,
.header-search__field:focus-within .header-search__input::placeholder {
  color: rgba(28, 36, 32, 0.45);
}

.header-search__clear {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.15rem;
}

.header-search__dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  background: #fff;
  color: var(--ink);
  border-radius: 1rem;
  border: 1px solid rgba(31, 75, 63, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 0.4rem;
  z-index: 130;
}

.header-search__dropdown[hidden] {
  display: none !important;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.6rem;
  border-radius: 0.75rem;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.search-item:hover,
.search-item.is-active {
  background: #eef4f0;
}

.search-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 0.55rem;
  flex-shrink: 0;
  background: var(--mint);
}

.search-item__body {
  min-width: 0;
  flex: 1;
}

.search-item__name {
  font-family: "Fraunces", serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item__name mark {
  background: rgba(244, 196, 48, 0.45);
  color: inherit;
  border-radius: 0.15rem;
  padding: 0 0.1rem;
}

.search-item__meta {
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-item__price {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-deep);
  white-space: nowrap;
}

.search-empty,
.search-loading {
  padding: 1rem 0.85rem;
  text-align: center;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
}

.toast {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 11000;
  background: var(--green-deep);
  color: var(--mint);
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.card.is-highlight {
  outline: 3px solid var(--tag-yellow);
  outline-offset: 2px;
  transition: outline-color 0.8s ease;
}

.nav-links {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  position: relative;
  z-index: 101;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-link {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.9;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(242, 247, 241, 0.12);
  opacity: 1;
}

/* Categories dropdown — stable hover (no gap flicker) */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown__caret {
  font-size: 0.65rem;
  opacity: 0.8;
  line-height: 1;
}

.nav-dropdown__menu {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(31, 75, 63, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  z-index: 200;
  display: none;
}

/* Invisible hover bridge so mouse can move into the menu */
.nav-dropdown__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
  display: block;
}

.nav-dropdown:hover .nav-dropdown__toggle,
.nav-dropdown.is-open .nav-dropdown__toggle {
  background: rgba(242, 247, 241, 0.12);
}

.nav-dropdown__menu li {
  margin: 0;
  padding: 0;
}

.nav-dropdown__item {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  font-family: "Work Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown__item:hover,
.nav-dropdown__item.is-active {
  background: #eef4f0;
  color: var(--green-deep);
}

.nav-dropdown__empty {
  display: block;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .brand__badge {
    display: none;
  }

  .nav-dropdown__menu {
    left: 0;
    right: auto;
  }
}

@media (min-width: 901px) {
  .site-header__inner {
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
    grid-template-areas: "brand search nav cart";
    gap: 1rem;
    padding: 0.85rem 0;
    align-items: center;
  }

  .header-search {
    max-width: 420px;
    justify-self: stretch;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .cart-pill {
    justify-self: end;
  }
}

.cart-pill {
  grid-area: cart;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tag-yellow);
  color: var(--ink);
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  flex-shrink: 0;
  min-height: 40px;
  align-self: center;
}

.cart-pill__count {
  background: var(--green-deep);
  color: var(--mint);
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.68rem;
}

/* Hero */
.hero {
  background: var(--green-deep);
  color: var(--mint);
  padding: 1rem 0 2.75rem;
}

.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero__eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--tag-yellow);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.08;
  font-weight: 600;
  margin: 0;
}

.hero__lead {
  margin: 1rem 0 0;
  max-width: 28rem;
  color: rgba(242, 247, 241, 0.82);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.hero__chip {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  background: rgba(242, 247, 241, 0.1);
  border: 1px solid rgba(242, 247, 241, 0.28);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.hero-media {
  position: relative;
}

.hero-media__glow {
  position: absolute;
  inset: -0.5rem;
  background: rgba(226, 88, 63, 0.12);
  filter: blur(28px);
  border-radius: 1.75rem;
}

.hero-media__frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(242, 247, 241, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.hero-media__frame video {
  width: 100%;
  height: clamp(260px, 42vw, 420px);
  object-fit: cover;
  background: #000;
}

.hero-media__caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.hero-media__caption p {
  margin: 0;
}

.hero-media__caption .label {
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--tag-yellow);
}

.hero-media__caption .title {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.btn-switch {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
  background: var(--mint);
  color: var(--green-deep);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
}

/* Fixed home page hero (from Home page settings) */
.home-hero {
  position: relative;
  overflow: hidden;
  color: var(--mint);
  padding: 2.5rem 0 3rem;
  background:
    radial-gradient(ellipse 80% 70% at 90% 10%, rgba(244, 196, 48, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 90%, rgba(226, 88, 63, 0.12), transparent 50%),
    linear-gradient(155deg, #16382f 0%, var(--green-deep) 48%, #245848 100%);
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(242, 247, 241, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.45;
  pointer-events: none;
}

.home-hero__grid {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .home-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.75rem;
  }
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 196, 48, 0.35);
  background: rgba(244, 196, 48, 0.1);
  color: var(--tag-yellow);
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.home-hero__title {
  font-family: "Fraunces", serif;
  font-size: clamp(2.35rem, 5.2vw, 3.5rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 12ch;
}

.home-hero__desc {
  margin: 1.15rem 0 0;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(242, 247, 241, 0.82);
}

.home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.home-hero__chip {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  background: rgba(242, 247, 241, 0.08);
  border: 1px solid rgba(242, 247, 241, 0.2);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  backdrop-filter: blur(6px);
}

.home-hero__media {
  position: relative;
}

.home-hero__frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.6rem;
  border: 1px solid rgba(242, 247, 241, 0.16);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(244, 196, 48, 0.08);
  background: #0d1a16;
}

.home-hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 45%);
  pointer-events: none;
}

.home-hero__frame video {
  width: 100%;
  height: clamp(280px, 44vw, 440px);
  object-fit: cover;
  display: block;
}

.home-hero__caption {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.home-hero__caption p {
  margin: 0;
}

.home-hero__caption-label {
  font-family: "Space Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--tag-yellow);
}

.home-hero__caption-title {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 0.15rem !important;
}

.home-hero__switch {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
  background: var(--mint);
  color: var(--green-deep);
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: transform 0.15s ease;
}

.home-hero__switch:hover {
  transform: translateY(-1px);
}

.section__head--stack {
  align-items: flex-start;
}

.section__sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 36rem;
  font-size: 0.95rem;
}

/* Filters + grid */
.section {
  padding: 2.25rem 0 3rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section__head h2 {
  font-family: "Fraunces", serif;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin: 0;
  font-weight: 600;
}

.section__meta {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip:hover {
  border-color: var(--green-mid);
}

.chip.active {
  background: var(--green-deep);
  color: #fff;
  border-color: var(--green-deep);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .product-grid {
    gap: 1.1rem;
  }
}

@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card__media {
  position: relative;
  background: var(--mint);
}

.card__media .product-gallery-trigger {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: var(--mint);
}

.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
  background: var(--mint);
  padding: 0.45rem;
  box-sizing: border-box;
}

.hangtag {
  position: absolute;
  right: 1rem;
  bottom: -0.7rem;
  background: var(--tag-yellow);
  clip-path: polygon(18% 0%, 100% 0%, 100% 100%, 18% 100%, 0% 50%);
  padding: 0.35rem 0.85rem 0.35rem 1.5rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.hangtag::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  transform: translateY(-50%);
}

.hangtag span {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

.sale-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  background: var(--coral);
  color: #fff;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.stitch {
  height: 1px;
  margin: 1.15rem 1rem 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--green-deep) 0 6px,
    transparent 6px 12px
  );
}

.card__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.card__cat {
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--green-mid);
  margin: 0;
}

.card__title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.card__title {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
}

.card__size {
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.card__footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.price {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 1.05rem;
}

.price s {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 0.25rem;
  font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green-deep);
  color: var(--mint);
}

.btn-primary:hover {
  background: var(--green-mid);
}

.btn-accent {
  background: var(--tag-yellow);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid var(--line);
}

.btn-danger {
  background: var(--coral);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.62rem;
}

.btn-block {
  width: 100%;
}

/* Alerts */
.alert {
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.alert-success {
  background: #e5f4ea;
  color: #1f4b3f;
  border: 1px solid #b7dec5;
}

.alert-error {
  background: #fdecea;
  color: #8a2a1b;
  border: 1px solid #f3c0b7;
}

.alert-info {
  background: #eef4f1;
  color: var(--green-deep);
  border: 1px solid #c8d9d1;
}

/* Cart / checkout layouts */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.25rem;
}

.page-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.35rem;
}

.page-sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cart-table th {
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.65rem;
}

.qty-input {
  width: 4.5rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  padding: 0.4rem 0.5rem;
  background: #fff;
}

.split {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.35fr 0.85fr;
    align-items: start;
  }
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
}

.summary-row.total {
  border-top: 1px dashed var(--line);
  margin-top: 0.65rem;
  padding-top: 0.85rem;
  font-weight: 700;
  font-family: "Space Mono", monospace;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.form-group .req {
  color: var(--coral);
}

.form-control {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
  color: var(--ink);
}

.form-control:focus {
  outline: 3px solid rgba(226, 88, 63, 0.35);
  outline-offset: 1px;
  border-color: var(--coral);
}

.form-control.is-invalid {
  border-color: var(--coral);
}

.field-error {
  color: var(--coral);
  font-size: 0.8rem;
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.help {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Modal + image slider — above sticky header/nav */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  overflow: auto;
}

.modal.is-open {
  display: flex;
}

.modal__inner {
  position: relative;
  width: min(960px, 100%);
  margin: auto;
}

.modal__inner--slider {
  width: min(920px, 100%);
}

.modal__close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  z-index: 5;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-deep);
  cursor: pointer;
  font-family: "Space Mono", monospace;
}

.gallery-slider {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  position: relative;
}

.gallery-stage {
  position: relative;
  background: #111;
  border-radius: 1rem;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-stage img,
.modal__inner img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  background: #111;
  cursor: zoom-in;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-deep);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.gallery-nav--prev {
  left: 0.65rem;
}

.gallery-nav--next {
  right: 0.65rem;
}

.gallery-nav:disabled,
.gallery-nav[hidden] {
  display: none;
}

.gallery-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
}

.gallery-dots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.gallery-dot.is-active {
  background: var(--tag-yellow);
  transform: scale(1.2);
}

.gallery-count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(28, 36, 32, 0.72);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  pointer-events: none;
}

@media (max-width: 640px) {
  .gallery-nav {
    width: 2.35rem;
    height: 2.35rem;
  }
}

/* Footer */
.site-footer {
  background: var(--green-deep);
  color: rgba(242, 247, 241, 0.72);
  text-align: center;
  padding: 1.4rem 1rem;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  margin-top: auto;
}

.empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
}

/* Admin */
.admin-body {
  background: #eef3ef;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .admin-shell {
    grid-template-columns: 240px 1fr;
  }
}

.admin-side {
  background: var(--green-deep);
  color: var(--mint);
  padding: 1.4rem 1.1rem;
}

.admin-side a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.admin-side a:hover,
.admin-side a.is-active {
  background: rgba(242, 247, 241, 0.12);
}

.admin-main {
  padding: 1.4rem;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.stat__label {
  font-family: "Space Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.stat__value {
  font-family: "Fraunces", serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 0.92rem;
}

.data-table th {
  font-family: "Space Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: #f7faf7;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.badge {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.badge-new {
  background: #fff3cd;
  color: #7a5b00;
}

.badge-read {
  background: #e8eef0;
  color: #445;
}

.badge-done {
  background: #e5f4ea;
  color: #1f4b3f;
}

.badge-off {
  background: #fdecea;
  color: #8a2a1b;
}

.badge-on {
  background: #e5f4ea;
  color: #1f4b3f;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(244, 196, 48, 0.25), transparent 40%),
    linear-gradient(160deg, var(--green-deep), #16382f 55%, #2a5a49);
}

.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-family: "Fraunces", serif;
  margin: 0 0 0.35rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.focus-ring:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}

/* Stronger mobile / tablet layout */
@media (max-width: 900px) {
  .container {
    width: min(1120px, calc(100% - 1.25rem));
  }
  .site-header__inner {
    gap: 0.6rem 0.65rem;
    padding: 0.75rem 0 0.85rem;
  }
  .nav-links {
    width: 100%;
    gap: 0.3rem;
  }
  .nav-link,
  .cart-pill {
    min-height: 42px;
  }
  .header-search__field {
    padding: 0.45rem 0.85rem;
  }
  .home-hero {
    padding: 1.35rem 0 1.75rem;
  }
  .home-hero__title {
    font-size: clamp(1.75rem, 7.5vw, 2.6rem);
    max-width: none;
  }
  .home-hero__desc {
    font-size: 0.95rem;
    margin-top: 0.85rem;
  }
  .home-hero__chips {
    margin-top: 1rem;
  }
  .home-hero__frame video {
    height: clamp(200px, 52vw, 320px);
    object-fit: contain;
    background: #0d1f1a;
  }
  .hero {
    padding: 0.85rem 0 1.75rem;
  }
  .hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }
  .section {
    padding-block: 1.5rem;
  }
  .section__head {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }
  .card {
    border-radius: 0.9rem;
  }
  .card__body {
    padding: 0.65rem 0.7rem 0.8rem;
    gap: 0.25rem;
  }
  .card__cat {
    font-size: 0.55rem;
    letter-spacing: 0.1em;
  }
  .card__title {
    font-size: 0.88rem;
  }
  .card__size {
    font-size: 0.6rem;
  }
  .card__title-row {
    flex-direction: column;
    gap: 0.2rem;
  }
  .card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding-top: 0.5rem;
  }
  .card__footer .price {
    font-size: 0.9rem;
  }
  .card__footer .btn {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0.65rem;
    font-size: 0.62rem;
  }
  .hangtag {
    right: 0.45rem;
    bottom: -0.55rem;
    padding: 0.25rem 0.55rem 0.25rem 1.15rem;
  }
  .hangtag span {
    font-size: 0.68rem;
  }
  .sale-badge {
    top: 0.45rem;
    left: 0.45rem;
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
  }
  .stitch {
    margin: 0.75rem 0.65rem 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1120px, calc(100% - 0.9rem));
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .card__media img {
    padding: 0.3rem;
  }
  .btn,
  .header-search__input,
  .nav-dropdown__toggle {
    min-height: 44px;
  }
  .nav-dropdown__menu {
    left: 0;
    right: auto;
    min-width: min(240px, calc(100vw - 2rem));
    max-height: min(50vh, 360px);
  }
  .filters,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .cart-layout,
  .checkout-grid,
  .split {
    grid-template-columns: 1fr !important;
  }
  .home-hero__caption {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
  }
  .home-hero__caption-title {
    font-size: 0.95rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--green-mid);
  border-radius: 6px;
}

.error-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.4rem 1.4rem 2rem;
}
.error-code {
  position: absolute;
  left: 50%;
  top: -0.4rem;
  transform: translateX(-50%);
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(5.5rem, 16vw, 8.5rem);
  line-height: 0.8;
  color: rgba(31, 75, 63, 0.08);
  pointer-events: none;
}
.error-panel .page-title,
.error-panel .page-sub,
.error-panel .font-mono,
.error-panel .actions {
  position: relative;
}

.home-hero__cta {
  margin-top: 1.25rem;
}

.download-hero {
  padding-top: 2.5rem;
}

.download-hero__inner {
  max-width: 40rem;
}

.download-hero__title {
  margin: 0.35rem 0 0;
  font-family: Fraunces, serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.download-hero__lead {
  margin: 0.85rem 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted, #5c6a62);
}

.download-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.download-hero__status {
  margin: 0.85rem 0 0;
  min-height: 1.25em;
  font-size: 0.9rem;
  color: var(--green-mid, #2e6a55);
}

.download-hero__meta {
  margin: 0.55rem 0 0;
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #5c6a62);
}

.pdf-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  place-items: center;
  background: rgba(18, 40, 33, 0.55);
  color: #fff;
  text-align: center;
  padding: 1.5rem;
}

.pdf-overlay.is-on {
  display: grid;
}

.pdf-overlay strong {
  display: block;
  font-family: Fraunces, serif;
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

/* Content selection deterrent (forms remain usable) */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""] {
  -webkit-user-select: text;
  user-select: text;
}
img,
a {
  -webkit-user-drag: none;
  user-drag: none;
}
