/* ---------- Base ---------- */
:root {
  --fuchsia: #b23a6b;
  --fuchsia-dark: #8a2a52;
  --olive: #7a7a3d;
  --cream: #fdf8f3;
  --ink: #2b2320;
  --ink-soft: #6b5f58;
  --border: #e8ddd3;
  --shadow: 0 10px 30px rgba(43, 35, 32, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

h1, h2, h3, .logo, .footer-brand {
  font-family: 'Fraunces', Georgia, serif;
}

a { color: inherit; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--fuchsia);
  color: white;
  box-shadow: 0 6px 16px rgba(178, 58, 107, 0.35);
}
.btn-primary:hover { background: var(--fuchsia-dark); }

.btn-link {
  background: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
  padding: 0.5rem 0.8rem;
}

.btn-add {
  width: 100%;
  background: var(--ink);
  color: white;
  margin-top: 0.9rem;
}
.btn-add:hover { background: var(--fuchsia-dark); }
.btn-add.added { background: #4a7c4e; }

/* ---------- Promo banner ---------- */
.promo-banner {
  background: var(--fuchsia);
  color: white;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
}
.promo-code {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  letter-spacing: 0.03em;
  font-weight: 800;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
}
.logo span { color: var(--fuchsia); }
.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.main-nav a { text-decoration: none; }
.main-nav a:hover { color: var(--fuchsia); }
.cart {
  font-weight: 700;
  white-space: nowrap;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
#cart-count {
  display: inline-block;
  background: var(--fuchsia);
  border-radius: 999px;
  padding: 0 0.5rem;
  margin-left: 0.3rem;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}
.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 2rem;
}

/* ---------- Catalogue ---------- */
.catalogue {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 0.4rem;
}
.section-subtitle {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

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

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.product-card.featured {
  border: 2px solid var(--fuchsia);
}

.product-img {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ece3da;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }

.badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: var(--fuchsia);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
}

.product-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-body h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
  flex: 1;
}
.rating {
  font-size: 0.85rem;
  color: var(--olive);
  margin-bottom: 0.6rem;
}
.rating-count {
  color: var(--ink-soft);
  font-weight: 600;
  margin-left: 0.2rem;
}
.review {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 3px solid var(--border);
  padding-left: 0.7rem;
  margin: 0 0 0.9rem;
}
.review cite {
  display: block;
  margin-top: 0.3rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--ink);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}
.price-old {
  text-decoration: line-through;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.price-final {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--fuchsia-dark);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #e9e2dc;
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  font-size: 0.9rem;
}
.footer-brand {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  color: white;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.3rem;
  margin: 1.2rem 0;
  flex-wrap: wrap;
}
.footer-nav a { text-decoration: none; opacity: 0.85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-legal, .footer-copy {
  opacity: 0.55;
  font-size: 0.78rem;
  max-width: 620px;
  margin: 0.4rem auto;
}

/* ---------- Popup ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 35, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}
.popup-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.popup {
  position: relative;
  background: var(--cream);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 2.4rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.25s ease;
}
.popup-overlay.visible .popup {
  transform: translateY(0) scale(1);
}
.popup-emoji { font-size: 2.2rem; margin: 0 0 0.4rem; }
.popup h2 { margin: 0 0 0.8rem; font-size: 1.5rem; }
.popup p { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 1.2rem; }
.popup-code {
  background: white;
  border: 1px dashed var(--fuchsia);
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
}
.popup-code span { color: var(--fuchsia-dark); letter-spacing: 0.04em; }
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.popup-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.popup-close:hover { color: var(--ink); }

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 200;
}
.toast {
  background: var(--ink);
  color: white;
  padding: 0.8rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 280px;
}
.toast.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 1.9rem; }
}
