/* Shop templates reuse the --ink / --accent / --accent2 / --muted / --border tokens.
   These are now defined once in style.css :root (aliased from --text-primary,
   --accent, --secondary, etc.) rather than in three separate overlapping systems. */

.shop-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* ── Shop hero carousel (full-bleed, /shop landing page only) ── */
.shop-hero-wrap { width: 100%; }

.shop-hero-carousel { position: relative; }

.shop-hero-track {
  gap: 0;
  scroll-snap-type: x mandatory;
}

.shop-hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 420px;
  display: flex;
  align-items: flex-end;
  position: relative;
  text-decoration: none;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
}

.shop-hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0.35) 55%, rgba(15,23,42,0.15) 100%);
}

.shop-hero-slide-content {
  position: relative;
  z-index: 1;
  padding: 40px 56px;
  max-width: 560px;
}

.shop-hero-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.shop-hero-slide-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.shop-hero-cta.btn-outline-ink {
  border-color: #fff;
  color: #fff;
}

.shop-hero-cta.btn-outline-ink:hover { background: #fff; color: var(--ink); }

.shop-hero-arrow {
  background: rgba(255,255,255,0.9);
}

.shop-hero-arrow.prev { left: 24px; }
.shop-hero-arrow.next { right: 24px; }

@media (max-width: 768px) {
  .shop-hero-slide { height: 300px; }
  .shop-hero-slide-content { padding: 24px 28px; }
  .shop-hero-arrow { display: none; }
}

.shop-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

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

.shop-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.shop-subheading {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* ── Collection tiles (shop index) ── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.collection-tile {
  display: block;
  border: 2px solid var(--ink);
  text-decoration: none;
  background: var(--surface);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.collection-tile:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 var(--ink);
}

.collection-tile-image {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  overflow: hidden;
}

.collection-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.collection-tile:hover .collection-tile-image img { transform: scale(1.05); }

.collection-tile-body { padding: 20px 24px 24px; }

.collection-tile h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.collection-tile p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Shop search box ── */
.shop-search-form {
  display: flex;
  max-width: 420px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.shop-search-form input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  font-family: 'Syne', sans-serif;
  background: var(--surface);
  color: var(--ink);
}

.shop-search-form button {
  border: none;
  background: var(--ink);
  color: var(--bg);
  padding: 0 18px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-search-form button:hover { background: var(--accent); }

/* ── Faceted filter sidebar ── */
.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: 100px;
}

.filter-clear {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 20px;
}

.filter-clear:hover { text-decoration: underline; }

.filter-group {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.filter-group h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.filter-option:hover { color: var(--ink); }
.filter-option.checked { color: var(--ink); font-weight: 600; }

.filter-checkbox-box {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.filter-option.checked .filter-checkbox-box {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.filter-option-label { flex: 1; }
.filter-count { color: var(--muted); font-size: 0.75rem; }

/* ── Product grid (collection page) ── */
.product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.sort-select {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.product-card:hover {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.15s;
}

.product-card.is-out-of-stock .product-card-image img { opacity: 0.45; }
.product-card.is-out-of-stock .product-card-title,
.product-card.is-out-of-stock .product-card-price { color: var(--muted); }

/* ── Quick add-to-cart (same dark-circle language as the floating cart/WhatsApp buttons) ── */
.product-card-quickadd {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  transition: transform 0.15s, color 0.15s;
}

.product-card-quickadd .material-icons { font-size: 18px; }

.product-card-quickadd:hover { transform: scale(1.08); color: var(--accent); }
.product-card-quickadd:disabled { opacity: 0.6; cursor: not-allowed; }

.product-card-quickadd.is-added { color: var(--accent2); }

@media (prefers-reduced-motion: reduce) {
  .product-card-quickadd { transition: none; }
}

@media (max-width: 768px) {
  .product-card-quickadd { width: 34px; height: 34px; }
  .product-card-quickadd .material-icons { font-size: 16px; }
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 8px;
  flex: 1;
}

.product-card-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--surface);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.pagination-row {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* ── Product detail page ── */
.pdp-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.pdp-gallery-main {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.pdp-gallery-slide {
  width: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-gallery-slide img { width: 100%; height: 100%; object-fit: contain; }

.pdp-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.pdp-thumbs img {
  width: 64px; height: 64px; object-fit: contain;
  border: 1px solid var(--border); background: var(--bg); padding: 4px; cursor: pointer;
}

.pdp-buybox {
  position: sticky;
  top: 100px;
  border: 2px solid var(--ink);
  padding: 32px;
  background: var(--surface);
}

.pdp-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}

.pdp-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.pdp-variant-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.pdp-variant-select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
  margin-bottom: 20px;
}

#pdpQuantity {
  text-align: center;
}

.pdp-phone-field {
  display: flex;
  align-items: stretch;
  margin-bottom: 20px;
}

.pdp-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--bg);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.pdp-phone-field input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
}

.pdp-add-to-cart {
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  border: 2px solid var(--ink);
  padding: 14px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}

.pdp-add-to-cart:hover { background: var(--accent); border-color: var(--accent); }
.pdp-add-to-cart:disabled { background: var(--border); border-color: var(--border); cursor: not-allowed; color: var(--muted); }

.pdp-checkout-btn {
  width: 100%;
  background: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 14px 24px;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pdp-checkout-btn:hover { background: var(--ink); color: var(--bg); }
.pdp-checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pdp-stock-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; }

/* ── Trust row (buy box) ── */
.trust-row {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trust-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.trust-item svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent2); }
.trust-item strong { color: var(--ink); font-weight: 600; }

/* ── Product description ──
   Shopify's descriptionHtml is merchant-authored rich text, not structured
   data — these rules target common patterns (a bold-only paragraph used as
   a section label, a following list) generically, so any product's
   description gets the same treatment regardless of exact markup. */
.pdp-description { margin-top: 48px; line-height: 1.7; color: var(--ink); max-width: 70ch; }

.pdp-description p { margin-bottom: 20px; }

.pdp-description h2,
.pdp-description h3,
.pdp-description h4,
.pdp-description p:has(> strong:only-child),
.pdp-description p:has(> b:only-child) {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 36px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdp-description h2::after,
.pdp-description h3::after,
.pdp-description h4::after,
.pdp-description p:has(> strong:only-child)::after,
.pdp-description p:has(> b:only-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pdp-description ul,
.pdp-description ol {
  list-style: none;
  margin: 0 0 32px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdp-description li {
  display: flex;
  gap: 10px;
  font-size: 0.92rem;
  align-items: flex-start;
}

.pdp-description li::before {
  content: '—';
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  flex: 0 0 auto;
}

/* JS (shop.js) wraps "Label: Value" list items in these spans to render
   as a two-column spec row instead of a plain bullet. */
.pdp-description li.spec-row-item { gap: 20px; }
.pdp-description li.spec-row-item::before { content: none; }
.pdp-description li.spec-row-item .spec-k {
  flex: 0 0 34%;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}
.pdp-description li.spec-row-item .spec-v { flex: 1; }

/* ── Cart page ── */
.cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-line img { width: 80px; height: 80px; object-fit: contain; background: var(--bg); }

.cart-line-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.cart-line-remove .material-icons { font-size: 18px; }

.cart-line-remove:hover { color: var(--danger); border-color: var(--danger); }
.cart-line-remove:disabled { opacity: 0.5; cursor: not-allowed; }

.cart-summary {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-checkout-btn {
  background: var(--ink);
  color: var(--bg);
  padding: 14px 28px;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cart-checkout-btn:hover { background: var(--accent); }

.cart-clear-btn {
  margin-top: 16px;
  background: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.cart-clear-btn:hover { color: var(--danger); border-color: var(--danger); }
.cart-clear-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.cart-empty { text-align: center; padding: 80px 20px; color: var(--muted); }

/* ── Confirm modal (e.g. Clear Cart) ──
   Mirrors the site's existing lead-magnet popup language (surface card, 2px ink
   border, hard offset shadow, slide-in) so it reads as part of the same design
   system rather than a generic browser confirm(). */
.confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal.active { display: flex; }

.confirm-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
}

.confirm-modal-content {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  max-width: 400px;
  width: 100%;
  padding: 40px 32px 32px;
  text-align: center;
  animation: confirmModalSlideIn 0.3s ease;
}

@keyframes confirmModalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .confirm-modal-content { animation: none; }
}

.confirm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  transition: color 0.15s;
}

.confirm-modal-close:hover { color: var(--ink); }

.confirm-modal-icon {
  font-size: 40px;
  color: var(--danger);
  margin-bottom: 16px;
}

.confirm-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.confirm-modal-message {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-actions .btn-outline-ink { flex: 1; justify-content: center; }

.confirm-modal-danger-btn {
  flex: 1;
  background: var(--danger);
  color: var(--bg);
  border: 2px solid var(--danger);
  padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}

.confirm-modal-danger-btn:hover { opacity: 0.85; }
.confirm-modal-danger-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
  .cart-line { grid-template-columns: 56px 1fr auto; grid-template-areas: "img info remove" "img qty price"; row-gap: 6px; }
  .cart-line img { grid-area: img; width: 56px; height: 56px; }
  .cart-line > div:nth-of-type(1) { grid-area: info; }
  .cart-line > div:nth-of-type(2) { grid-area: qty; }
  .cart-line .product-card-price { grid-area: price; }
  .cart-line-remove { grid-area: remove; justify-self: end; }
}

@media (max-width: 768px) {
  .pdp-layout { grid-template-columns: 1fr; gap: 32px; }
  .pdp-buybox { position: static; padding: 24px; }
  .pdp-title { font-size: 1.5rem; }
  .shop-wrap { padding: 40px 20px 60px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }

  /* Description reads better narrower and tighter on mobile — it now sits
     below the buybox (see product.html), so it needs its own top margin
     rather than inheriting spacing meant for the old in-gallery position. */
  .pdp-description { margin-top: 8px; max-width: 100%; }
  .pdp-description li.spec-row-item { flex-direction: column; gap: 4px; }
  .pdp-description li.spec-row-item .spec-k { flex: none; }
}
