:root {
  --ink: #2A1F26;
  --plum: #4A2E42;
  --mauve: #8C6B85;
  --mauve-light: #C9AEC3;
  --gold: #C9A15B;
  --cream: #F7F1EC;
  --cream-2: #EFE6DE;
  --white: #FFFFFF;
  --radius: 4px;
  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em 0;
  color: var(--plum);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--plum);
  color: var(--cream);
}
.btn-primary:hover { background: #3A2334; }
.btn-block { width: 100%; text-align: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand-logo {
  height: 52px;
  width: 52px;
  object-fit: cover;
  border-radius: 50%;
}
.header-nav { display: flex; gap: 28px; }
.header-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--plum);
}
.cart-button {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--plum);
  padding: 6px;
}
#cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--gold);
  color: var(--plum);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero */
.hero {
  padding: 88px 0 64px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
}
.hero-inner { max-width: 620px; }
.hero-eyebrow {
  font-size: 0.9rem;
  color: var(--mauve);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.05rem;
  color: #5A4A54;
  margin-bottom: 30px;
  max-width: 48ch;
}

/* Catálogo */
.catalog-section { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--mauve-light);
  background: transparent;
  color: var(--plum);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
}
.chip.active { background: var(--plum); color: var(--cream); border-color: var(--plum); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}
.catalog-empty { color: var(--mauve); font-style: italic; grid-column: 1/-1; }

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 var(--cream-2);
}
.product-image {
  aspect-ratio: 1 / 1;
  background: var(--cream-2);
  overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mauve); }
.product-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--plum); }
.product-desc { font-size: 0.85rem; color: #6B5A63; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.product-price { font-weight: 600; color: var(--plum); font-size: 1.05rem; }
.add-btn {
  border: 1px solid var(--plum);
  background: transparent;
  color: var(--plum);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 600;
}
.add-btn:hover { background: var(--plum); color: var(--cream); }
.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Contacto */
.contact-section { background: var(--plum); color: var(--cream); padding: 64px 0; }
.contact-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.contact-section h2 { color: var(--cream); }
.contact-section p { color: var(--mauve-light); margin: 0; }
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--mauve-light);
  color: var(--cream);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.contact-link:hover { background: rgba(255,255,255,0.08); }
.contact-icon { width: 18px; height: 18px; flex-shrink: 0; }

.site-footer { padding: 24px 0; text-align: center; color: var(--mauve); font-size: 0.85rem; }

/* Carrito */
.cart-overlay, .modal-overlay {
  position: fixed; inset: 0; background: rgba(42, 31, 38, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 30;
}
.cart-overlay.open, .modal-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 92vw);
  background: var(--white); z-index: 31; transform: translateX(100%);
  transition: transform 0.25s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--cream-2); }
.cart-drawer-head button { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--plum); line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--cream-2); align-items: center; }
.cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); background: var(--cream-2); }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-item-qty button { border: 1px solid var(--mauve-light); background: none; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; }
.cart-item-remove { background: none; border: none; color: var(--mauve); cursor: pointer; font-size: 0.8rem; text-decoration: underline; }
.cart-drawer-foot { padding: 20px; border-top: 1px solid var(--cream-2); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.05rem; }
.cart-empty { color: var(--mauve); font-style: italic; padding: 20px 0; }

/* Modal checkout */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--white); padding: 28px; border-radius: var(--radius);
  width: min(420px, 92vw); z-index: 32; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open .modal { opacity: 1; pointer-events: auto; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--plum); }
#checkout-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
#checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 500; }
#checkout-form input[type="text"], #checkout-form input[type="tel"] {
  padding: 10px 12px; border: 1px solid var(--mauve-light); border-radius: var(--radius); font-family: var(--font-body); font-size: 0.95rem;
}
.payment-options { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.payment-options legend { font-size: 0.9rem; font-weight: 600; padding: 0; margin-bottom: 4px; }
.payment-option { display: flex; align-items: center; gap: 8px; font-weight: 400; flex-direction: row !important; }
.checkout-error { color: #B23A48; font-size: 0.85rem; min-height: 1.2em; margin: 0; }

@media (max-width: 640px) {
  .header-nav { display: none; }
  .hero { padding: 64px 0 48px; }
}
