﻿:root {
  color-scheme: light;
  --ink: #1d1915;
  --muted: #6f635b;
  --paper: #fffaf2;
  --panel: #ffffff;
  --line: #e6d8c7;
  --accent: #a97738;
  --accent-dark: #6f4a22;
  --gold: #d7b56d;
  --mint: #4f8f74;
  --shadow: 0 18px 45px rgba(30, 25, 20, 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;
}

body.modal-open {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #eee9e3;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.brand-trigger {
  cursor: pointer;
  user-select: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-logo {
  width: 150px;
  height: 58px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  color: var(--muted);
  font-size: 0.79rem;
}

nav {
  display: flex;
  gap: 8px;
}

nav a,
.primary-link,
.ghost-button,
.add-button,
.submit-button,
.admin-product-row {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

nav a {
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  color: var(--ink);
}

nav a:hover {
  background: #f5ebe2;
}

.cart-nav-link {
  grid-auto-flow: column;
  gap: 8px;
}

.cart-nav-link span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero {
  display: grid;
  min-height: 430px;
  align-items: center;
  padding: clamp(58px, 8vw, 96px) clamp(18px, 4vw, 56px) clamp(46px, 6vw, 76px);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 54%, #f7efe7 100%);
  border-bottom: 1px solid #eee9e3;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 9vw, 7.2rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.04em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.hero p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.primary-link,
.submit-button {
  display: inline-grid;
  place-items: center;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.primary-link:hover,
.submit-button:hover {
  background: var(--accent-dark);
}



.section-heading {
  padding: 38px clamp(18px, 4vw, 56px) 18px;
}

.order-contact-note a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.category-chip.active,
.category-chip:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.cart-toast {
  position: fixed;
  right: clamp(16px, 4vw, 34px);
  bottom: clamp(16px, 4vw, 34px);
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  width: min(440px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(31, 157, 131, 0.28);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(23, 22, 21, 0.2);
  transform: translateY(18px);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.cart-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.cart-toast strong,
.cart-toast p {
  margin: 0;
}

.cart-toast p {
  margin-top: 3px;
  color: var(--muted);
}

.cart-toast a {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.order-receipt-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 22, 21, 0.52);
}

.order-receipt {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(23, 22, 21, 0.28);
  padding: 20px;
}

.order-receipt h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.receipt-intro {
  color: var(--muted);
  line-height: 1.5;
}

.order-receipt pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 16px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6ee;
  color: var(--ink);
  font: 0.92rem/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.receipt-actions .submit-button,
.receipt-actions .ghost-button {
  min-height: 44px;
}

.section-heading.compact {
  padding: 0 0 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 clamp(14px, 4vw, 56px) 56px;
}

.product-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.product-group + .product-group {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.product-group-heading h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.product-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-empty {
  grid-column: 1 / -1;
}

.product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eee6dd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(30, 25, 20, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease;
}


.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 25, 20, 0.1);
}

.product-description {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 0.84rem;
}

.product-card.is-price-pending .available {
  display: none;
}

.product-card.is-out-of-stock .quantity-row label,
.product-card.is-out-of-stock .color-stock {
  display: none;
}

.product-card.is-out-of-stock .quantity-row {
  grid-template-columns: 1fr;
}

.product-card.is-out-of-stock .add-button {
  background: #efe4d9;
  color: var(--ink);
}
.product-photo-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #fffdfa;
}

.product-photo {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 8px;
  object-fit: contain;
}

.stock-pill {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(23, 22, 21, 0.86);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.product-card.is-out-of-stock .product-photo {
  filter: grayscale(0.35);
}

.product-card.is-out-of-stock .stock-pill {
  background: var(--accent);
}

.product-content {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.category-badge {
  display: inline-grid;
  min-height: 22px;
  align-items: center;
  margin-bottom: 2px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f8eee4;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-content h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.product-description,
.available,
.color-stock {
  color: var(--muted);
  line-height: 1.45;
}

.color-stock {
  display: none;
  margin: -8px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 0.98rem;
}

.colors {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.colors legend,
.quantity-row span,
.order-form span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
}

.color-option input {
  position: absolute;
  opacity: 0;
}

.color-option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.color-option.sold-out {
  opacity: 0.48;
  cursor: not-allowed;
}

.swatch {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.quantity-row {
  display: grid;
  grid-template-columns: 54px max-content;
  align-items: end;
  gap: 7px;
}

.quantity-row label,
.order-form label {
  display: grid;
}

.quantity-input,
.order-form input,
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.quantity-input {
  min-height: 38px;
  padding: 0 10px;
}

.order-form input {
  min-height: 44px;
  padding: 0 12px;
}

.order-form textarea {
  resize: vertical;
  padding: 12px;
}

.admin-page {
  background: #f5ebe2;
}

.admin-shell {
  padding: 52px clamp(18px, 4vw, 56px);
}

.admin-hero {
  margin-bottom: 24px;
}

.admin-hero-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  padding-bottom: 18px;
}

.admin-hero h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 9vw, 7.2rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(30, 25, 20, 0.08);
  padding: 18px;
}

.admin-login {
  grid-column: 1 / -1;
  max-width: 520px;
}

.admin-login-copy {
  margin: -8px 0 0;
  color: var(--muted);
}

.admin-card h2 {
  margin-bottom: 16px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.admin-analytics {
  grid-column: 1 / -1;
}

.admin-products {
  grid-column: 1 / -1;
}

.admin-security {
  grid-column: 1 / -1;
}

.security-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) max-content;
  gap: 12px;
  align-items: end;
}

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

.analytics-stat {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6ee;
}

.analytics-stat span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-stat strong {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1;
}

.analytics-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-login,
.admin-form {
  display: grid;
  gap: 16px;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-fields .wide {
  grid-column: 1 / -1;
}

.admin-form label,
.admin-login label {
  display: grid;
}

.admin-form span,
.admin-login span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-login input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.admin-form input,
.admin-form select,
.admin-login input {
  min-height: 44px;
  padding: 0 12px;
}

.admin-form select {
  padding: 0 12px;
}

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

.admin-form input[readonly] {
  background: #f8eee4;
  color: var(--muted);
}

.admin-form textarea {
  resize: vertical;
  padding: 12px;
}

.color-editor > .panel-title-row {
  margin-bottom: 10px;
}

.color-editor > .panel-title-row > span {
  margin: 0;
}

.admin-color-list {
  display: grid;
  gap: 10px;
}

.admin-color-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 92px 120px auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff6ee;
}

.admin-color-row input[type="color"] {
  height: 44px;
  padding: 4px;
}

.photo-uploader > span {
  display: block;
}

.photo-upload-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
}

.photo-upload-grid img {
  width: 180px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0dfd4;
  object-fit: cover;
}

.file-picker {
  display: inline-grid;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8eee4;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker span {
  margin: 0;
  color: var(--ink);
}

.photo-upload-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.admin-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-button.danger {
  color: var(--accent);
}

.ghost-button.warning {
  color: #8a5b00;
}

.admin-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.admin-product-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 8px;
  background: #fff6ee;
  color: var(--ink);
  text-align: left;
  cursor: grab;
}

.admin-product-row:active {
  cursor: grabbing;
}

.admin-product-row.is-dragging {
  opacity: 0.5;
}

.admin-product-row.is-hidden {
  opacity: 0.62;
}

.admin-product-row.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.admin-product-row img {
  width: 64px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #f0dfd4;
}

.admin-product-row strong,
.admin-product-row small {
  display: block;
}

.admin-product-row small {
  color: var(--muted);
  margin-top: 4px;
}

.add-button {
  width: auto;
  min-height: 38px;
  justify-self: start;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.add-button:hover {
  background: #393532;
}

.add-button:disabled {
  cursor: not-allowed;
  background: #b8b0a6;
}

.order-shell {
  padding: 64px clamp(18px, 4vw, 56px);
  background: #f5ebe2;
  border-top: 1px solid var(--line);
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.cart-panel,
.order-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(30, 25, 20, 0.08);
}

.cart-panel {
  padding: 18px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-title-row h3 {
  margin: 0;
}

.ghost-button {
  padding: 0 12px;
  background: #f8eee4;
  color: var(--ink);
}

.cart-lines {
  display: grid;
  gap: 10px;
  min-height: 80px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-line p {
  margin: 0;
}

.cart-line small {
  color: var(--muted);
}

.remove-line {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
}

.empty-cart {
  margin: 0;
  color: var(--muted);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
}

.order-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.order-contact-note {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.45;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-status.success {
  color: var(--mint);
}

.form-status.error {
  color: var(--accent);
}

@media (max-width: 900px) {
  .hero,
  .order-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: 360px;
    padding: 52px clamp(16px, 4vw, 34px) 42px;
  }

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

  .security-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .admin-hero-row {
    align-items: start;
  }

  .admin-hero-actions {
    padding-bottom: 8px;
  }

  .topbar {
    gap: 12px;
    padding: 10px 14px;
  }

  .brand-logo {
    width: 58px;
    height: 38px;
  }

  nav {
    gap: 2px;
  }

  nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.9rem;
  }

  .section-heading.compact {
    padding: 0 14px 16px;
  }

  .section-heading:not(.compact) {
    padding: 28px 14px 16px;
  }

  .section-heading h2,
  h2 {
    font-size: 1.9rem;
  }

  .category-filter {
    padding: 0 14px 14px;
    gap: 8px;
  }

  .category-chip {
    min-height: 36px;
    padding: 0 13px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 10px 44px;
  }

  .product-group {
    gap: 8px;
  }

  .product-group-heading {
    padding: 0 4px;
  }

  .product-group-heading h3 {
    font-size: 1.35rem;
  }

  .product-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(30, 25, 20, 0.06);
  }

  .product-card:hover {
    transform: none;
  }

  .product-photo-wrap {
    aspect-ratio: 1 / 1;
  }

  .product-photo {
    padding: 6px;
  }

  .stock-pill {
    top: 6px;
    right: 6px;
    padding: 3px 5px;
    font-size: 0.66rem;
  }

  .product-content {
    gap: 7px;
    padding: 10px;
  }

  .category-badge {
    min-height: 20px;
    padding: 0 7px;
    font-size: 0.62rem;
  }

  .product-content h3 {
    font-size: 0.94rem;
  }

  .product-description {
    display: none;
  }

  .price {
    font-size: 0.92rem;
  }

  .available {
    display: none;
  }

  .colors legend,
  .quantity-row span {
    font-size: 0.64rem;
  }

  .color-option {
    max-width: 100%;
    gap: 5px;
    min-height: 28px;
    padding: 3px 7px 3px 4px;
    font-size: 0.78rem;
  }

  .swatch {
    width: 16px;
    height: 16px;
  }

  .quantity-row {
    grid-template-columns: 48px 1fr;
    gap: 6px;
  }

  .quantity-input {
    min-height: 34px;
    padding: 0 8px;
  }

  .add-button {
    min-height: 34px;
    width: 100%;
    padding: 0 10px;
    font-size: 0.78rem;
  }
}

@media (max-width: 360px) {
  .product-grid,
  .product-group-grid {
    grid-template-columns: 1fr;
  }
}

