/* Page-specific styles for store.html. Fonts, nav, footer, buttons, cards
   and modals all come from assets/styles.css. */

html, body { background: #fff; }

.store-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.store-header .section-title { margin: 0; }

.track-order-link { display: block; margin: 0 0 26px; font-size: 13.5px; color: var(--muted); }
.track-order-link a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.track-order-link a:hover { color: var(--gold); }

.store-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filter-btn {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-grid > p { grid-column: 1 / -1; }
.product-card { cursor: pointer; overflow: hidden; }
.product-image { height: 180px; background: var(--surface); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.out-of-stock { color: #b3261e; font-size: 12px; }

/* Product detail modal */
.product-modal-content { width: 480px; }
.product-detail-image { height: 240px; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-price { font-size: 20px; font-weight: 700; color: var(--brand); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty-row input { width: 70px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Cart modal */
.cart-modal-content { width: min(460px, 100%); }
.cart-modal-content h3 { margin: 0 0 12px; font-family: var(--font-display); color: var(--brand); font-size: 21px; }

/* Bounded, scrollable so a long cart never grows the whole modal past the
   viewport — the header/total/checkout form around it stay put. */
#cart-items {
  max-height: 34vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 14px;
  margin-bottom: 4px;
}
.cart-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cart-line:last-child { border-bottom: none; }
.cart-line span:first-child { color: var(--ink); }
.cart-line span:nth-child(2) { color: var(--brand); font-weight: 600; white-space: nowrap; }
.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.cart-remove:hover { color: #b3261e; background: var(--surface); }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  padding-top: 14px;
  margin: 12px 0 18px;
  border-top: 1.5px solid var(--border);
}

#checkout-form { display: flex; flex-direction: column; gap: 12px; }
#checkout-form input,
#checkout-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: var(--font-text);
  font-size: 15px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
#checkout-form textarea { min-height: 78px; resize: vertical; }
#checkout-form input:focus,
#checkout-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, .16);
}
#checkout-submit { width: 100%; margin-top: 4px; }

@media (max-width: 480px) {
  #cart-items { max-height: 30vh; }
}

/* Confirmation modal */
.order-ref-badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: .03em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin: 8px 0 16px;
}
#confirmationDetails .btn { width: 100%; }
