/* ── Provvista Store — Shared Styles ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #F5F0E8;
  --warm-white: #FDFBF7;
  --olive: #4A5D3A;
  --olive-dark: #3A4A2D;
  --terracotta: #C4704B;
  --terracotta-light: #D4845F;
  --ink: #1A1A18;
  --stone: #8B8579;
  --linen: #EDE8DE;
  --red: #B84040;
  --green: #4A7A4A;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--warm-white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
.store-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(253,251,247,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-left { display: flex; align-items: center; gap: 2.5rem; }

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--terracotta); }

.nav-links { display: flex; gap: 1.8rem; }

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--stone);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.cart-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--linen);
  border-radius: 8px;
  transition: all 0.2s;
}
.cart-link:hover { border-color: var(--terracotta); color: var(--terracotta); }

.cart-badge {
  background: var(--terracotta);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge:empty { display: none; }

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* ── SHOP HEADER ── */
.shop-header {
  padding: 7rem 0 2rem;
}

.shop-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.shop-header p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--stone);
  max-width: 600px;
  margin-top: 0.75rem;
}

/* ── CATEGORY FILTERS ── */
.category-filters {
  display: flex;
  gap: 0.6rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--linen);
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--linen);
  border-radius: 100px;
  background: transparent;
  color: var(--stone);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.filter-btn:hover { border-color: var(--stone); color: var(--ink); }
.filter-btn.active {
  background: var(--ink);
  color: var(--warm-white);
  border-color: var(--ink);
}

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 5rem;
}

.product-card {
  background: var(--cream);
  border-radius: 14px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.product-card-category {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.75rem;
}

.product-card-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.product-card-origin {
  font-size: 0.78rem;
  color: var(--stone);
  margin-bottom: 0.75rem;
}

.product-card-desc {
  font-size: 0.83rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-card-price {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.product-card-weight {
  font-size: 0.78rem;
  color: var(--stone);
}

.add-to-cart-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.add-to-cart-btn:hover { background: var(--terracotta); }
.add-to-cart-btn.added {
  background: var(--olive);
  pointer-events: none;
}

/* ── PRODUCT DETAIL ── */
.product-detail {
  padding: 7rem 0 5rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-detail-visual {
  background: var(--cream);
  border-radius: 16px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.product-detail-emoji {
  font-size: 6rem;
}

.product-detail-info h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.product-detail-origin {
  font-size: 0.85rem;
  color: var(--stone);
  margin-bottom: 0.3rem;
}

.product-detail-region {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1.5rem;
}

.product-detail-price {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.product-detail-weight {
  font-size: 0.85rem;
  color: var(--stone);
  margin-bottom: 2rem;
}

.product-detail-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--linen);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  font-family: 'Outfit', sans-serif;
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--linen); }

.qty-value {
  width: 40px;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
}

.detail-add-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 2.5rem;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.detail-add-btn:hover { background: var(--terracotta); }

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ink); }

/* ── CART PAGE ── */
.cart-page {
  padding: 7rem 0 5rem;
  min-height: 80vh;
}

.cart-page h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 0;
}

.cart-empty p {
  font-size: 1.1rem;
  color: var(--stone);
  margin-bottom: 2rem;
}

.cart-empty a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 2.5rem;
  background: var(--ink);
  color: var(--warm-white);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}
.cart-empty a:hover { background: var(--terracotta); }

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 1.5rem;
  background: var(--cream);
  border-radius: 12px;
}

.cart-item-info { flex-grow: 1; }

.cart-item-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--stone);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--linen);
  border-radius: 6px;
  overflow: hidden;
  background: var(--warm-white);
}

.cart-item-qty button {
  font-family: 'Outfit', sans-serif;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink);
}
.cart-item-qty button:hover { background: var(--linen); }

.cart-item-qty span {
  width: 32px;
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
}

.cart-item-price {
  font-weight: 600;
  font-size: 1rem;
  min-width: 70px;
  text-align: right;
}

.cart-item-remove {
  font-family: 'Outfit', sans-serif;
  background: none;
  border: none;
  color: var(--stone);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.3rem;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--red); }

/* ── CART SUMMARY ── */
.cart-summary {
  background: var(--cream);
  border-radius: 16px;
  padding: 2rem;
  position: sticky;
  top: 6rem;
}

.cart-summary h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--linen);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.summary-row.total {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--linen);
}

.checkout-btn {
  font-family: 'Outfit', sans-serif;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.checkout-btn:hover { background: var(--terracotta); }
.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-note {
  font-size: 0.75rem;
  color: var(--stone);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ── SUCCESS PAGE ── */
.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.success-page h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.success-page p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--stone);
  max-width: 450px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.success-page a {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--ink);
  color: var(--warm-white);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}
.success-page a:hover { background: var(--terracotta); }

/* ── FOOTER ── */
.store-footer {
  padding: 3rem;
  text-align: center;
  background: var(--warm-white);
  border-top: 1px solid var(--linen);
}

.store-footer .footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.store-footer .footer-sub {
  font-size: 0.78rem;
  color: var(--stone);
  letter-spacing: 0.1em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--stone);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--ink); }

.footer-contact {
  font-size: 0.78rem;
  color: var(--stone);
}

.footer-contact a {
  color: var(--stone);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover { color: var(--ink); }

/* ── LOADING ── */
.loading {
  display: flex;
  justify-content: center;
  padding: 4rem;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--linen);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--warm-white);
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 400;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
/* ── NEWSLETTER SIGNUP ── */
.newsletter-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--linen);
}
.newsletter-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.newsletter-tagline {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--stone);
  margin-bottom: 1rem;
}
.newsletter-form {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--linen);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--warm-white);
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input[type="email"]:focus {
  border-color: var(--terracotta);
}
.newsletter-form button {
  padding: 0.65rem 1.2rem;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--terracotta); }
.newsletter-form button:disabled { opacity: 0.6; cursor: not-allowed; }
.newsletter-success {
  font-size: 0.85rem;
  color: var(--olive);
  font-weight: 400;
  display: none;
  margin-top: 0.6rem;
}
.newsletter-error {
  font-size: 0.78rem;
  color: #c44b2b;
  display: none;
  margin-top: 0.6rem;
}

/* ── EXIT-INTENT POPUP ── */
.exit-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,24,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}
.exit-popup-overlay.show {
  display: flex;
}
.exit-popup {
  background: var(--warm-white);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  animation: popupSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes popupSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.exit-popup-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--stone);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}
.exit-popup-close:hover { color: var(--ink); }
.exit-popup-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}
.exit-popup h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.exit-popup h2 em {
  font-style: italic;
  color: var(--terracotta);
}
.exit-popup p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.exit-popup .newsletter-form {
  margin-bottom: 0.5rem;
}
.exit-popup .newsletter-tagline { margin-bottom: 0.75rem; }
.exit-popup .newsletter-success { margin-top: 0.5rem; }
.exit-popup-note {
  font-size: 0.75rem;
  color: var(--stone);
  font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .store-nav { padding: 0.8rem 1.2rem; }
  .nav-links { display: none; }
  .container { padding: 0 1.2rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cart-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .category-filters { gap: 0.4rem; }
  .filter-btn { font-size: 0.75rem; padding: 0.4rem 0.9rem; }
  .shop-header { padding: 6rem 0 1.5rem; }
  .newsletter-form { flex-direction: column; }
}
