:root {
  --ink: #20201d;
  --muted: #6b665f;
  --line: #ded8ce;
  --paper: #f7f3ed;
  --surface: #ffffff;
  --sage: #637266;
  --clay: #a45f3d;
  --navy: #263449;
  --gold: #c99442;
  --shadow: 0 18px 45px rgba(42, 37, 30, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(222, 216, 206, 0.82);
  background: rgba(247, 243, 237, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.1vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
}

.main-nav a {
  padding: 8px 0;
}

.main-nav a:hover {
  color: var(--ink);
}

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

.icon-button,
.cart-button,
.filter,
.admin-button,
.ghost-button,
.studio-panel button,
.newsletter button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.25rem;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 76px));
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(20, 18, 16, 0.74), rgba(20, 18, 16, 0.22) 48%, rgba(20, 18, 16, 0.04));
}

.hero-content {
  position: relative;
  width: min(680px, calc(100% - 36px));
  margin: 0 0 clamp(42px, 8vw, 86px) clamp(18px, 7vw, 92px);
  color: white;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f5c27e;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 8vw, 6.9rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
}

h3 {
  font-size: 1.08rem;
}

.hero-content p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

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

.primary-link,
.secondary-link,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-link {
  padding: 0 22px;
  background: #fff;
  color: var(--ink);
}

.secondary-link {
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: white;
}

section:not(.hero) {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 4vw, 58px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading.row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.section-heading h2 {
  max-width: 13ch;
}

.category-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, 1fr);
  grid-auto-rows: minmax(230px, 22vw);
  gap: 16px;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #ddd;
  box-shadow: var(--shadow);
}

.category-card.tall {
  grid-row: span 2;
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.58));
}

.category-card span {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 1;
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
}

.commerce-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: var(--line);
}

.commerce-strip div {
  min-height: 122px;
  padding: 26px;
  background: #f0ebe3;
}

.commerce-strip strong,
.commerce-strip span {
  display: block;
}

.commerce-strip span {
  margin-top: 6px;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
}

.filter.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.product-card[hidden] {
  display: none;
}

.sync-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  padding: clamp(54px, 8vw, 98px) clamp(18px, 4vw, 58px);
  background: #eef1ea;
  border-bottom: 1px solid var(--line);
}

.sync-hero h1 {
  max-width: 11ch;
  color: var(--ink);
}

.sync-hero p {
  max-width: 660px;
  color: var(--muted);
}

.sync-panel,
.mapping-panel,
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sync-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.sync-panel label,
.mapping-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.sync-panel input,
.sync-panel select,
.mapping-panel input,
.mapping-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.sync-panel input[type="file"] {
  padding: 10px;
}

.sync-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-button,
.ghost-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 900;
}

.admin-button {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.ghost-button {
  background: transparent;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 58px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.admin-card {
  padding: 18px;
}

.admin-card strong {
  display: block;
  font-size: 1.8rem;
}

.admin-card span {
  color: var(--muted);
}

.mapping-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px;
}

.product-workbench {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.product-workbench label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.product-workbench input,
.product-workbench select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.product-workbench .admin-actions {
  grid-column: 1 / -1;
  align-items: center;
}

.selection-count {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef1ea;
  color: var(--sage);
  font-weight: 900;
}

.editor-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.editor-panel[hidden] {
  display: none;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.editor-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.editor-grid .wide {
  grid-column: 1 / -1;
}

.editor-grid input,
.editor-grid select,
.editor-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.editor-media {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.editor-media-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.editor-media-heading h3 {
  margin: 0;
  color: var(--ink);
}

.editor-media-heading span {
  color: var(--muted);
  font-weight: 800;
}

.editor-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.editor-media-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.editor-media-grid img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

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

.admin-table th {
  background: #f0ebe3;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef1ea;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.draft {
  background: #fff4df;
  color: #946117;
}

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

.product-detail {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(32px, 5vw, 64px) clamp(18px, 4vw, 58px);
}

.product-gallery {
  display: grid;
  gap: 12px;
}

.product-main-image {
  overflow: hidden;
  border-radius: 8px;
  background: #eee;
  box-shadow: var(--shadow);
}

.product-main-image img {
  aspect-ratio: 1 / 1;
  height: auto;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.product-thumbs button {
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.product-thumbs button.active {
  border-color: var(--ink);
}

.product-thumbs img {
  aspect-ratio: 1 / 1;
  height: auto;
}

.gallery-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-buybox {
  display: grid;
  align-content: start;
  gap: 18px;
}

.product-buybox h1 {
  max-width: 13ch;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 5rem);
}

.rating-line,
.product-buybox p {
  color: var(--muted);
}

.product-price {
  font-size: 2rem;
  font-weight: 900;
}

.product-buybox label,
.checkout-panel label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--muted);
}

.product-buybox select,
.checkout-panel input,
.cart-item input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.trust-grid span {
  padding: 10px;
  border-radius: 6px;
  background: #eef1ea;
  color: var(--sage);
  font-weight: 800;
}

.add-cart-button,
.product-cart-link {
  justify-content: center;
  text-align: center;
}

.product-story,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(34px, 5vw, 72px) clamp(18px, 4vw, 58px);
  border-top: 1px solid var(--line);
}

.product-story p {
  color: var(--muted);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.spec-grid div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.spec-grid span {
  color: var(--muted);
}

.cart-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr 90px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.cart-item img {
  width: 96px;
  height: 96px;
  border-radius: 6px;
}

.checkout-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.checkout-panel h2 {
  font-size: 1.8rem;
}

.checkout-panel form {
  display: grid;
  gap: 14px;
}

.total-lines {
  display: grid;
  gap: 10px;
}

.total-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.confirmation-page {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(42px, 8vw, 96px) clamp(18px, 4vw, 58px);
}

.confirmation-page h1 {
  color: var(--ink);
}

.landing-band,
.faq-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(34px, 5vw, 72px) clamp(18px, 4vw, 58px);
  border-top: 1px solid var(--line);
}

.landing-band {
  background: #eef1ea;
}

.benefit-list,
.faq-grid {
  display: grid;
  gap: 12px;
}

.benefit-list article,
.faq-grid details {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.benefit-list strong,
.benefit-list span {
  display: block;
}

.benefit-list span,
.faq-grid p {
  margin: 8px 0 0;
  color: var(--muted);
}

.faq-grid summary {
  cursor: pointer;
  font-weight: 900;
}

.product-card img {
  aspect-ratio: 1 / 1;
  height: auto;
}

.save-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.save-button.is-saved {
  background: var(--ink);
  color: white;
}

.product-info {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1ea;
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 900;
}

.product-info p,
.feature-copy p,
.lookbook p,
.design-studio p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-row span {
  color: var(--muted);
  text-decoration: line-through;
}

.split-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(300px, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  background: #e8ece4;
}

.feature-copy {
  max-width: 560px;
}

.feature-copy p:not(.eyebrow) {
  margin-top: 16px;
  font-size: 1.05rem;
}

.text-link {
  margin-top: 26px;
  color: var(--clay);
}

.feature-image {
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lookbook-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lookbook article {
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.lookbook article img {
  aspect-ratio: 4 / 3;
  height: auto;
}

.lookbook article div {
  padding: 18px;
}

.lookbook h3 {
  margin-bottom: 8px;
}

.design-studio {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 520px);
  gap: clamp(28px, 6vw, 90px);
  align-items: center;
  background: var(--navy);
  color: white;
}

.design-studio .eyebrow {
  color: #f1bc66;
}

.design-studio p {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.05rem;
}

.studio-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.studio-panel label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.studio-panel select,
.studio-panel input[type="range"] {
  width: 100%;
}

.studio-panel select {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

.studio-panel button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #f1bc66;
  font-weight: 900;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 460px) minmax(280px, 520px);
  justify-content: space-between;
  gap: 28px;
  padding: 46px clamp(18px, 4vw, 58px);
  background: #171714;
  color: white;
}

.footer-brand .brand-mark {
  background: white;
  color: #171714;
}

.site-footer p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.66);
}

.newsletter label {
  display: block;
  margin-bottom: 12px;
  font-weight: 800;
}

.newsletter div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.newsletter input {
  min-height: 46px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.newsletter button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: white;
  font-weight: 900;
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .commerce-strip,
  .lookbook-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sync-hero,
  .mapping-panel,
  .product-workbench {
    grid-template-columns: repeat(2, 1fr);
  }

  .editor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
    gap: 12px;
  }

  .header-actions .icon-button {
    display: none;
  }

  .cart-button {
    width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .cart-button span {
    font-size: 1rem;
  }

  .hero {
    min-height: 680px;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(20, 18, 16, 0.06), rgba(20, 18, 16, 0.78));
  }

  .hero-content {
    margin: 0 auto 38px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.4rem);
  }

  .category-grid,
  .split-feature,
  .design-studio,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-auto-rows: 260px;
  }

  .category-card.tall {
    grid-row: auto;
  }

  .section-heading.row {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .commerce-strip,
  .lookbook-grid,
  .product-grid,
  .sync-hero,
  .mapping-panel,
  .product-workbench,
  .metric-grid,
  .editor-grid,
  .product-detail,
  .product-story,
  .checkout-layout,
  .spec-grid,
  .landing-band,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 82px 1fr;
  }

  .cart-item label {
    grid-column: 1 / -1;
  }

  .feature-image {
    min-height: 360px;
  }

  .newsletter div {
    grid-template-columns: 1fr;
  }
}
