:root {
  --bg-ivory: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-soft: #F3EFE6;
  --text-forest: #1A2F23;
  --text-muted: #5A6B61;
  --gold-border: #D4AF37;
  --gold-cta: #C59B27;
  --gold-cta-hover: #AD851B;
  --wa-green: #1FA855;
  --wa-green-hover: #178A44;
  --shadow-soft: 0 8px 24px rgba(26, 47, 35, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-ivory);
  color: var(--text-forest);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Barra superior */
.top-bar {
  background-color: var(--text-forest);
  color: var(--bg-ivory);
  text-align: center;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-border);
  box-shadow: 0 2px 10px rgba(26, 47, 35, 0.14);
  flex-shrink: 0;
  background-color: var(--bg-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  font-weight: 700;
  color: var(--text-forest);
  line-height: 1.1;
  text-decoration: none;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-wrap {
  flex: 1;
  max-width: 380px;
  min-width: 0;
}

.search-input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.65);
  background-color: var(--bg-card);
  color: var(--text-forest);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--gold-cta);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.15);
}

/* Categorías */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 14px;
}

.cat-pill {
  text-transform: uppercase;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background-color: var(--bg-card);
  color: var(--text-forest);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cat-pill:hover {
  border-color: var(--gold-cta);
  background-color: var(--bg-soft);
}

.cat-pill.active {
  background-color: var(--text-forest);
  color: var(--bg-ivory);
  border-color: var(--text-forest);
}

/* Hero */
.hero {
  text-align: center;
  padding: 42px 20px 30px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  color: var(--text-forest);
}

.hero p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

/* Catálogo */
.catalog-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 20px 48px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 47, 35, 0.1);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background-color: var(--bg-soft);
  overflow: hidden;
  cursor: pointer;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.03);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--text-forest);
  color: var(--bg-ivory);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.product-gallery-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(26, 47, 35, 0.84);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  min-width: 0;
}

.product-cat {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-cta);
}

.product-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.38rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text-forest);
  overflow-wrap: break-word;
}

.product-desc-short {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.price-offer {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-forest);
}

.price-regular {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.btn-outline {
  border: 1px solid var(--text-forest);
  background-color: transparent;
  color: var(--text-forest);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  background-color: var(--bg-soft);
}

/* Botón WhatsApp verde con animación de latido y salto */
@keyframes waLatido {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 12px rgba(31, 168, 85, 0.28);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 20px rgba(31, 168, 85, 0.48);
  }
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--wa-green);
  color: #FFFFFF;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  animation: waLatido 2.2s ease-in-out infinite;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-wa:hover {
  background-color: var(--wa-green-hover);
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .btn-wa {
    animation: none;
  }
}

/* Estado vacío */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  background-color: var(--bg-card);
  border: 1px dashed var(--gold-border);
  border-radius: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.empty-state h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  margin: 0 0 10px;
}

.empty-state p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Confianza y logística */
.trust-section {
  background-color: var(--bg-soft);
  border-top: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  padding: 44px 20px;
}

.trust-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.trust-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 16px;
  padding: 24px;
}

.trust-card h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--text-forest);
}

.trust-card p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.payment-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.payment-pill {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background-color: var(--bg-ivory);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-forest);
}

/* Footer */
.site-footer {
  background-color: var(--text-forest);
  color: var(--bg-ivory);
  padding: 36px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-schedule {
  font-size: 0.9rem;
  margin: 0 0 14px;
  opacity: 0.92;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-link-btn {
  background: none;
  border: none;
  color: var(--gold-border);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0;
}

.disclaimer {
  font-size: 0.78rem;
  line-height: 1.55;
  opacity: 0.78;
  max-width: 780px;
  margin: 0 auto;
}

/* Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(26, 47, 35, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-backdrop[hidden],
.modal-backdrop.hidden {
  display: none !important;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.6);
  background-color: var(--bg-ivory);
  color: var(--text-forest);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-close:hover {
  background-color: var(--bg-soft);
}

.modal-grid,
.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: start;
}

.modal-gallery-col {
  min-width: 0;
  width: 100%;
}

.modal-gallery-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--bg-soft);
}

.modal-gallery-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.65);
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--text-forest);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.modal-nav-btn.prev { left: 10px; }
.modal-nav-btn.next { right: 10px; }

.modal-img-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(26, 47, 35, 0.82);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.modal-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.modal-thumb-btn {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--bg-soft);
}

.modal-thumb-btn.active {
  border-color: var(--gold-cta);
}

.modal-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-cat {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-cta);
}

.modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.18;
  overflow-wrap: break-word;
}

.modal-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.modal-price-row .price-offer {
  font-size: 1.5rem;
}

.modal-bonus {
  background-color: var(--bg-ivory);
  border-left: 3px solid var(--gold-cta);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.modal-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-forest);
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-wa-btn {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  margin-top: 6px;
}

/* Tablet */
@media (max-width: 960px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* Celular */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
  }
  .brand-logo-img {
    width: 48px;
    height: 48px;
  }
  .search-wrap {
    max-width: 100%;
  }
  .category-bar {
    padding: 0 16px 12px;
  }
  .hero {
    padding: 28px 16px 22px;
  }
  .catalog-section {
    padding: 24px 16px 36px;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal-box {
    padding: 16px;
    max-height: 92vh;
    border-radius: 14px;
  }
  .modal-grid,
  .modal-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-gallery-wrap {
    max-height: 360px;
  }
  .modal-thumb-btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 520px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .product-actions {
    grid-template-columns: 1fr;
  }
}
