/* ============================================================
   Evassentials — Boutique Product Grid Overrides
   assets/css/shop-boutique.css
   ============================================================ */

:root {
  --crimson:      #9e1b24;
  --crimson-dark: #7d1219;
  --forest:       var(--crimson);
}

/* ─────────────────────────────────────────────────────────────
   CATALOG HEADER
   ─────────────────────────────────────────────────────────── */

.catalog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--paper3);
}

.catalog-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.catalog-sub {
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 0.15rem;
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
   PRODUCT GRID
   ─────────────────────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2rem 1.5rem;
}

/* ─────────────────────────────────────────────────────────────
   PRODUCT CARD
   ─────────────────────────────────────────────────────────── */

.product-card {
  background: white;
  border-radius: 16px;
  border: none;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.32s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 14px rgba(26,26,46,0.07);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26,26,46,0.13);
}
.product-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Product image */
.product-img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .product-img img { transform: scale(1.08); }

/* Hover overlay */
.product-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26,26,46,0.72) 0%,
    rgba(26,26,46,0.1)  55%,
    transparent         100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.product-card:hover .product-img::after { opacity: 1; }

/* Quick View pill */
.product-img-overlay {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}
.product-card:hover .product-img-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.product-quick-view {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.55);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.32rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.product-quick-view:hover { background: rgba(255,255,255,0.26); }

/* Product info */
.product-info {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.product-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: none;
  border: none;
  padding: 0;
}

.product-name {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--crimson);
}
.product-price small {
  font-size: 0.72rem;
  color: var(--text3);
  font-weight: 400;
  font-family: 'Cabinet Grotesk', sans-serif;
}

.btn-add {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
}
.btn-add:hover { background: var(--crimson); transform: scale(1.1); }

/* ─────────────────────────────────────────────────────────────
   MODAL CTA BUTTONS — Buy Now + Add to Cart
   (must be OUTSIDE any media query)
   ─────────────────────────────────────────────────────────── */

.modal-cta-pair {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn-buy-now {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--crimson);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}
.btn-buy-now:hover  { background: var(--crimson-dark); transform: translateY(-1px); }
.btn-buy-now:active { transform: translateY(0); }
.btn-buy-now:focus-visible { outline: 3px solid var(--crimson); outline-offset: 3px; }

.btn-add-to-cart {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--sand);
  border-radius: 10px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.btn-add-to-cart:hover { border-color: var(--ink); background: var(--paper2); }
.btn-add-to-cart:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.modal-cta-note {
  font-size: 0.72rem;
  color: var(--text3);
  text-align: center;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────────────────────
   LOADING / EMPTY / ERROR STATES
   ─────────────────────────────────────────────────────────── */

.loading-state, .empty-state, .error-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--paper3);
  border-top-color: var(--crimson);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-icon { font-size: 3.5rem; }
.empty-state h3, .error-state h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--text2);
}

/* ─────────────────────────────────────────────────────────────
   HERO
   ─────────────────────────────────────────────────────────── */

.hero {
  min-height: 260px;
  background:
    radial-gradient(ellipse at 80% 40%, rgba(158,27,36,0.25) 0%, transparent 58%),
    radial-gradient(ellipse at 15% 75%, rgba(200,169,110,0.18) 0%, transparent 50%),
    var(--ink);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .product-grid { gap: 1.25rem 1rem; }
  .product-card { border-radius: 12px; }
  .product-img  { aspect-ratio: 1 / 1; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .product-name { font-size: 0.88rem; }
  .product-info { padding: 0.75rem 0.8rem 0.85rem; }
}

/* Mobile sticky CTA in modal */
@media (max-width: 600px) {
  .modal-cta-pair {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: white;
    margin-left:  -2rem;
    margin-right: -2rem;
    padding: 1rem 2rem 0.75rem;
    border-top: 1px solid var(--paper3);
    box-shadow: 0 -4px 16px rgba(26,26,46,0.06);
  }
}