/* ══════════════════════════════════════════════════════════
   LUMID STORE — styles
   Relies on CSS variables already defined in ../lumid.css
   (--charcoal, --gold, --off-white, --serif, --sans, etc.)
══════════════════════════════════════════════════════════ */

/* ── PAGE HERO (reuses the site's page-hero pattern) ── */
.shop-hero {
  background: var(--charcoal);
  padding: 10rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.shop-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle at top right, rgba(200,151,60,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.shop-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  color: var(--off-white);
  line-height: 1.1;
  max-width: 16ch;
}
.shop-hero h1 em { font-style: italic; color: var(--gold); }
.shop-hero p {
  font-size: 0.95rem;
  color: var(--mid-grey);
  line-height: 1.8;
  max-width: 480px;
  margin-top: 1rem;
}

/* ── SHOP TOOLBAR: filters + cart button ── */
.shop-toolbar {
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  background: var(--off-white);
}
.shop-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.shop-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
/* .filter-tab styling is inherited from lumid.css */

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.4rem;
  background: var(--charcoal);
  color: var(--white);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background 0.3s ease, transform 0.3s ease;
}
.cart-toggle:hover { background: var(--gold); transform: translateY(-2px); }
.cart-count {
  background: var(--gold);
  color: var(--charcoal);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
}
.cart-toggle:hover .cart-count { background: var(--white); }

/* ── PRODUCT GRID ── */
#shop-grid-section { padding: 1rem 0 7rem; background: var(--off-white); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--warm-grey);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

.product-thumb {
  aspect-ratio: 4/3;
  background: var(--warm-grey);
  overflow: hidden;
  position: relative;
}
.product-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.05); }

.product-stock-badge {
  position: absolute;
  top: 0.8rem; left: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product-stock-badge.in_stock { background: var(--sage-lt); color: #2f4a31; }
.product-stock-badge.made_to_order { background: var(--gold-pale); color: var(--gold); }
.product-stock-badge.sold_out { background: var(--warm-grey); color: var(--dim-grey); }

.product-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.product-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.product-dims {
  font-size: 0.76rem;
  color: var(--dim-grey);
  margin-bottom: 0.9rem;
}
.product-price {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.product-btn-row {
  margin-top: auto;
  display: flex;
  gap: 0.6rem;
}
.product-add-btn {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.product-add-btn:hover:not(:disabled) { background: var(--charcoal); color: var(--white); }
.product-add-btn:disabled {
  background: var(--warm-grey);
  color: var(--mid-grey);
  border-color: var(--warm-grey);
  cursor: not-allowed;
}
.product-buy-btn {
  flex: 1;
  padding: 0.75rem;
  background: var(--gold);
  color: var(--white);
  border: 1.5px solid var(--gold);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}
.product-buy-btn:hover:not(:disabled) { background: var(--charcoal); border-color: var(--charcoal); }
.product-buy-btn:disabled {
  background: var(--warm-grey);
  color: var(--mid-grey);
  border-color: var(--warm-grey);
  cursor: not-allowed;
}

/* ── EMPTY / LOADING STATES ── */
.shop-state-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--dim-grey);
  font-size: 0.9rem;
}

/* ── CART DRAWER ── */
.cart-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 398;
  backdrop-filter: blur(2px);
}
.cart-backdrop.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: -420px;
  width: min(400px, 90vw);
  height: 100%;
  background: var(--white);
  z-index: 399;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 40px rgba(0,0,0,0.2);
}
.cart-drawer.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--warm-grey);
}
.cart-header h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--charcoal);
}
.cart-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--warm-grey);
  background: none;
  cursor: pointer;
  color: var(--dim-grey);
}
.cart-close:hover { border-color: var(--gold); color: var(--gold); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}
.cart-empty-msg {
  text-align: center;
  color: var(--dim-grey);
  font-size: 0.85rem;
  padding: 3rem 1rem;
}

.cart-item {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--warm-grey);
}
.cart-item img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}
.cart-item-price { font-size: 0.8rem; color: var(--gold); }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--warm-grey);
  background: none;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--charcoal);
}
.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.cart-item-remove {
  font-size: 0.7rem;
  color: var(--dim-grey);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  margin-left: auto;
}
.cart-item-remove:hover { color: #b23; }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--warm-grey);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}
.cart-subtotal strong { font-family: var(--serif); font-size: 1.1rem; color: var(--gold); }
.cart-checkout-btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--charcoal);
  color: var(--white);
  border: none;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}
.cart-checkout-btn:hover:not(:disabled) { background: var(--gold); }
.cart-checkout-btn:disabled { background: var(--warm-grey); color: var(--mid-grey); cursor: not-allowed; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .shop-toolbar { flex-direction: column; align-items: flex-start; }
}
