/* Shop page — product catalog, cart drawer, order form */

/* NAV link override for shop page */
.nav a.nav-logo { text-decoration: none; }

/* ── SHOP HEADER ─────────────────────────────────────── */
.shop-header {
  padding: 72px 48px 56px;
  border-bottom: 1px solid var(--surface-dark);
  max-width: 760px;
}

.shop-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.shop-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
}

.shop-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

/* ── PRODUCT GRID ─────────────────────────────────────── */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  background: var(--surface-dark);
  border-top: 1px solid var(--surface-dark);
  border-bottom: 1px solid var(--surface-dark);
}

.product-card {
  background: var(--bg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-roast-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-light);
  background: #fdf6ee;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 8px;
  width: fit-content;
}

.product-origin-flag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.2;
}

.product-notes {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 14px;
  line-height: 1.5;
}

.product-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 28px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--surface-dark);
  padding-top: 20px;
}

.product-price-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.product-weight {
  font-size: 12px;
  color: var(--muted);
}

.btn-add {
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-add:hover { background: #b57530; }
.btn-add:active { transform: scale(0.97); }

/* ── CART TOGGLE ─────────────────────────────────────── */
.cart-toggle {
  position: relative;
  background: none;
  border: 1px solid var(--surface-dark);
  border-radius: 2px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s;
}

.cart-toggle:hover { border-color: var(--accent); color: var(--accent); }

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── CART DRAWER ─────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 13, 7, 0.45);
  z-index: 100;
  backdrop-filter: blur(2px);
}

.cart-overlay.visible { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 95vw;
  background: var(--bg);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--surface-dark);
  overflow: hidden;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--surface-dark);
  flex-shrink: 0;
}

.cart-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 2px;
  display: flex;
  align-items: center;
}

.cart-close:hover { color: var(--fg); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px;
}

.cart-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.cart-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-dark);
}

.cart-item-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

.cart-item-unit {
  font-size: 13px;
  color: var(--muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-dark);
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: background 0.1s;
}

.qty-btn:hover { background: var(--surface-dark); }

.qty-num {
  font-size: 15px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.cart-item-subtotal {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-left: auto;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  display: flex;
  align-items: center;
}

.remove-btn:hover { color: #b00; }

/* ── CART FOOTER / ORDER FORM ─────────────────────────── */
.cart-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--surface-dark);
  background: var(--surface);
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 65vh;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
}

#cartSubtotal {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--accent);
}

.form-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.form-field input,
.form-field textarea {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--surface-dark);
  border-radius: 2px;
  color: var(--fg);
  transition: border-color 0.15s;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  border-radius: 2px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c00;
  margin-bottom: 12px;
}

.btn-order {
  width: 100%;
  padding: 14px 24px;
  background: var(--fg);
  color: var(--bg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 12px;
}

.btn-order:hover:not(:disabled) { background: #2d1a10; }
.btn-order:active:not(:disabled) { transform: scale(0.99); }
.btn-order:disabled { opacity: 0.6; cursor: not-allowed; }

.form-fine-print {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-header { padding: 48px 24px 40px; }
  .catalog { grid-template-columns: 1fr; }
  .product-card { padding: 28px 24px; }
  .cart-drawer { width: 100%; }
}
