/* Public sales website — mobile-first, desktop-enhanced */

:root {
  --shop-bg: #f7f4ef;
  --shop-surface: #fffdf9;
  --shop-ink: #1a1f24;
  --shop-muted: #5c6670;
  --shop-line: #e5ddd1;
  --shop-accent: #0f6b5c;
  --shop-accent-hover: #0b5448;
  --shop-warm: #c45c26;
  --shop-radius: 16px;
  --shop-shadow: 0 12px 32px rgba(26, 31, 36, 0.08);
  --shop-font: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shop-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --shop-max: 1120px;
  --shop-header-h: 4.25rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--shop-font);
  color: var(--shop-ink);
  background:
    radial-gradient(ellipse at top left, rgba(15, 107, 92, 0.07), transparent 40%),
    radial-gradient(ellipse at top right, rgba(196, 92, 38, 0.06), transparent 35%),
    var(--shop-bg);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--shop-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.mono { font-family: var(--shop-mono); font-size: 0.92em; }

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--shop-line);
  backdrop-filter: blur(12px);
}

.shop-header-inner {
  width: min(var(--shop-max), calc(100% - 1.5rem));
  margin: 0 auto;
  min-height: var(--shop-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

.shop-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.shop-logo:hover { text-decoration: none; }

.shop-logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: #e8f4f1;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.shop-logo strong { display: block; line-height: 1.15; font-size: 1.05rem; }
.shop-logo small { color: var(--shop-muted); font-size: 0.78rem; }

.shop-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.shop-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 650;
  color: var(--shop-ink);
  text-decoration: none;
  background: transparent;
}

.shop-nav a:hover {
  background: var(--shop-accent);
  color: white;
  text-decoration: none;
}

/* Layout */
.shop-main {
  width: min(var(--shop-max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.shop-hero {
  margin-bottom: 1.25rem;
}

.shop-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  letter-spacing: -0.02em;
}

.shop-hero p {
  margin: 0;
  color: var(--shop-muted);
  max-width: 42ch;
  font-size: 1.02rem;
}

/* Filters */
.shop-filters {
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 650;
  font-size: 0.85rem;
}

.filter-field span { color: var(--shop-muted); }

.filter-field input,
.filter-field select {
  width: 100%;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  font-weight: 500;
  background: white;
  color: var(--shop-ink);
  min-height: 2.85rem; /* touch-friendly */
}

.filter-field input:focus,
.filter-field select:focus {
  outline: 2px solid rgba(15, 107, 92, 0.35);
  outline-offset: 1px;
  border-color: var(--shop-accent);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.result-count {
  margin: 0 0 0 0.25rem;
  color: var(--shop-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

/* Buttons */
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--shop-line);
  background: white;
  color: var(--shop-ink);
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.75rem;
}

.shop-btn:hover { background: #f5f0e6; text-decoration: none; }
.shop-btn-primary {
  background: var(--shop-accent);
  border-color: var(--shop-accent);
  color: white;
}
.shop-btn-primary:hover { background: var(--shop-accent-hover); }
.shop-btn-ghost { background: transparent; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.product-grid.compact {
  margin-top: 0.75rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  overflow: hidden;
  box-shadow: var(--shop-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(26, 31, 36, 0.12);
  text-decoration: none;
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #efe9de;
  overflow: hidden;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  color: var(--shop-muted);
  background: linear-gradient(145deg, #efe9de, #e4ddd0);
}

.product-image-placeholder.large {
  min-height: 280px;
  font-size: 4rem;
  border-radius: var(--shop-radius);
}

.stock-pill {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(196, 92, 38, 0.95);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

.stock-pill.pending-pill {
  background: rgba(154, 91, 0, 0.95);
}

.stock-pill.stock-pill-secondary {
  top: auto;
  bottom: 0.65rem;
  left: 0.65rem;
}

.product-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.product-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 750;
}

h3.product-title { font-size: 0.98rem; }

.product-meta {
  margin: 0;
  color: var(--shop-muted);
  font-size: 0.9rem;
}

.product-pieces {
  margin: 0.15rem 0 0;
  color: var(--shop-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.product-price {
  margin: 0.45rem 0 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--shop-accent);
}

/* Empty / flash */
.shop-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
}

.shop-empty h2 { margin: 0 0 0.4rem; }
.shop-empty p { color: var(--shop-muted); margin: 0 0 1rem; }

.shop-flash-stack { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.shop-flash {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--shop-line);
  background: #fff6df;
}
.shop-flash-error { background: #fdecec; }
.shop-flash-success { background: #e7f6ef; }

/* Product detail */
.shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--shop-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.shop-breadcrumb a { font-weight: 650; }

.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  padding: 1rem;
}

.product-detail-media img {
  width: 100%;
  border-radius: 12px;
  background: #efe9de;
  max-height: 520px;
  object-fit: contain;
}

.product-detail-info h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  letter-spacing: -0.02em;
}

.product-detail-price {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--shop-accent);
}

.product-specs {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 1px solid var(--shop-line);
  border-radius: 12px;
  overflow: hidden;
}

.product-specs li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--shop-line);
  font-size: 0.95rem;
}

.product-specs li:last-child { border-bottom: none; }
.product-specs span { color: var(--shop-muted); }
.product-specs strong { text-align: right; }

.product-notes h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.product-notes p {
  margin: 0;
  color: var(--shop-muted);
  white-space: pre-wrap;
}

.product-cta {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cta-note {
  margin: 0 0 0.35rem;
  padding: 0.85rem 1rem;
  background: #f1faf7;
  border-radius: 12px;
  color: var(--shop-muted);
  font-size: 0.95rem;
}

.cta-note.sold-out { background: #fdecec; }
.cta-note.pending-note { background: #fff6e5; }

.cta-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.pending-text {
  color: #9a5b00;
  font-weight: 700;
}

.muted-note {
  margin: 0 0 0.4rem;
  color: var(--shop-muted);
  font-size: 0.92rem;
}

.unit-availability {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--shop-muted);
  line-height: 1.55;
}

.unit-availability .warn-text {
  color: #a12b2b;
  font-weight: 650;
}

.related {
  margin-top: 2rem;
}

.related h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

/* Footer + seller contact */
.shop-footer {
  text-align: center;
  padding: 1.5rem 1rem 2.5rem;
  color: var(--shop-muted);
  font-size: 0.9rem;
}

.shop-footer p { margin: 0.25rem 0; }
.shop-footer-meta { font-size: 0.8rem; opacity: 0.85; margin-top: 1rem !important; }

.seller-contact {
  width: min(var(--shop-max), calc(100% - 1.5rem));
  margin: 0 auto 0.5rem;
  padding: 1.25rem 1.15rem 1.35rem;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  text-align: left;
}

.seller-contact h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--shop-ink);
}

.seller-name {
  margin: 0 0 0.85rem !important;
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--shop-ink);
}

.seller-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.seller-contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: 1px solid var(--shop-line);
  font-size: 0.95rem;
}

.seller-contact-list li:first-child { border-top: none; padding-top: 0; }

.seller-label {
  min-width: 5.5rem;
  color: var(--shop-muted);
  font-weight: 650;
  font-size: 0.88rem;
}

.seller-note {
  margin: 0.9rem 0 0 !important;
  font-size: 0.9rem;
  color: var(--shop-muted);
}

@media (min-width: 600px) {
  .seller-contact-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet+ */
@media (min-width: 600px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-field.grow {
    grid-column: 1 / -1;
  }

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

/* Desktop */
@media (min-width: 900px) {
  .shop-main { padding-top: 1.75rem; }

  .filter-row {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .filter-field.grow {
    grid-column: auto;
  }

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

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

  .product-detail {
    grid-template-columns: 1.1fr 1fr;
    gap: 1.75rem;
    padding: 1.35rem;
  }

  .product-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .cta-note {
    flex: 1 1 100%;
  }
}

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

/* Cart */
.shop-cart-link {
  position: relative;
}

.cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--shop-warm);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.panel-shop {
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  padding: 1.1rem;
}

.cart-layout {
  display: grid;
  gap: 1.15rem;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--shop-line);
  align-items: start;
}

.cart-line:last-of-type { border-bottom: none; }

.cart-line-media {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #efe8dc;
}

.cart-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.cart-line-meta {
  margin: 0;
  color: var(--shop-muted);
  font-size: 0.9rem;
}

.cart-line-price {
  margin: 0.35rem 0 0;
  font-weight: 800;
  font-size: 1.05rem;
}

.cart-line-warn {
  margin: 0.35rem 0 0;
  color: #9a3412;
  font-weight: 650;
  font-size: 0.92rem;
}

.cart-line-unavailable { opacity: 0.92; }

.cart-line-actions {
  grid-column: 1 / -1;
}

.cart-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--shop-line);
}

.cart-total {
  margin: 0;
  font-size: 1.02rem;
}

.cart-checkout h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.cart-steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--shop-muted);
  font-size: 0.95rem;
}

.cart-steps li { margin-bottom: 0.35rem; }

.cart-request-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cart-fieldset {
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.9rem 1rem;
  border: 1px solid var(--shop-line);
  border-radius: 14px;
  background: #fff;
}

.cart-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 800;
  font-size: 0.98rem;
}

.cart-fieldset-help {
  margin: 0 0 0.75rem;
  color: var(--shop-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.cart-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.cart-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.address-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.address-fields.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.address-row-state-zip {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.75rem;
}

.shipping-address-block {
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.75rem;
  background: #f5f0e6;
  border-radius: 10px;
  font: inherit;
  white-space: pre-wrap;
  font-weight: 600;
}

@media (max-width: 420px) {
  .address-row-state-zip {
    grid-template-columns: 1fr;
  }
}

.cart-request-form .filter-field em {
  font-style: normal;
  font-weight: 500;
  color: var(--shop-muted);
  font-size: 0.82rem;
}

.cart-fineprint { margin: 0.25rem 0 0; font-size: 0.88rem; }

.shop-btn-sm {
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

.shop-btn-block {
  width: 100%;
}

.shop-btn-lg {
  min-height: 3.1rem;
  padding: 0.85rem 1.4rem;
  font-size: 1.05rem;
}

.unit-avail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.inline-add-form { margin: 0; }

.in-cart-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #e8f4f1;
  color: var(--shop-accent);
  font-size: 0.8rem;
  font-weight: 750;
}

.cart-done h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.1rem;
}

.cart-done-list {
  margin: 0;
  padding-left: 1.15rem;
}

.cart-done-list li { margin-bottom: 0.35rem; }

.cart-done-cta {
  margin-bottom: 0.5rem;
}

.cart-done-cta .shop-btn { margin-bottom: 0.65rem; }

.muted-list { color: var(--shop-muted); }

@media (min-width: 800px) {
  .cart-layout {
    grid-template-columns: 1.35fr 0.95fr;
    align-items: start;
  }

  .cart-line {
    grid-template-columns: 5rem 1fr auto;
  }

  .cart-line-actions {
    grid-column: auto;
  }

  .cart-checkout {
    position: sticky;
    top: calc(var(--shop-header-h) + 0.75rem);
  }
}
