:root {
  --primary: #ef3f9d;
  --primary-dark: #d72682;
  --secondary: #fff0f7;
  --text: #1f1f1f;
  --muted: #5d5d5d;
  --surface: #ffffff;
  --surface-soft: #f9f9fb;
  --border: #f0dfe8;
  --success: #34a853;
  --shadow: 0 20px 40px rgba(25, 18, 29, 0.08);
}

.d-none {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #fff 0%, #fff6fb 100%);
  color: var(--text);
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner,
.navbar,
.hero,
.section-header,
.footer-grid,
.footer-bottom,
.benefits-grid,
.product-grid,
.testimonial-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-inner {
  min-height: 42px;
  font-size: 0.75rem;
  color: var(--muted);
}

.navbar {
  min-height: 80px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ff88c9);
  color: white;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 500;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--primary-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-button {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-dark);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(239, 63, 157, 0.25);
}

.cart-close {
  border: none;
  background: #fdf0f8;
  color: var(--primary-dark);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}

.full-width {
  width: 100%;
}

.icon-button,
.primary-button,
.secondary-button,
.add-to-cart,
.view-detail {
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1.1rem;
}

.primary-button,
.secondary-button {
  padding: 0.9rem 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 14px 26px rgba(239, 63, 157, 0.25);
}

.secondary-button {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
}

.hero {
  padding: 64px 0 42px;
  min-height: 620px;
}

.hero-copy,
.hero-visual {
  flex: 1;
}

.kicker {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  margin: 18px 0 20px;
}

.hero p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 32px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 12px;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-card {
  position: relative;
  width: min(100%, 520px);
  background: linear-gradient(180deg, #ffeaf6 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: 36px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.photo-card img {
  border-radius: 28px;
  width: 100%;
  height: 620px;
  object-fit: cover;
}

.overlay-badge {
  position: absolute;
  left: 28px;
  bottom: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(239, 63, 157, 0.1);
  border-radius: 18px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.overlay-badge strong {
  display: block;
  font-size: 1.5rem;
}

section {
  padding: 40px 0 30px;
}

.section-header {
  align-items: end;
  margin-bottom: 28px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.05em;
}

.section-header p {
  max-width: 520px;
  color: var(--muted);
  margin: 0;
}

.featured-grid,
.product-grid,
.testimonial-grid,
.benefits-grid {
  display: grid;
  gap: 24px;
}

.featured-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.product-card,
.testimonial-card,
.benefit-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(23, 19, 30, 0.04);
}

.feature-card {
  padding: 16px;
}

.feature-card .image-wrap {
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
}

.feature-card img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.feature-card .card-body {
  padding: 20px 8px 8px;
}

.card-body h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.card-body p,
.benefit-card p,
.testimonial-card p {
  color: var(--muted);
  line-height: 1.7;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 32px rgba(25, 18, 29, 0.08);
}

.product-card .image-wrap {
  border-radius: 18px;
  overflow: hidden;
  height: 300px;
  background: #f9f1f5;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 4px 4px;
}

.product-info h3 {
  font-size: 1.08rem;
  margin: 0;
}

.price {
  font-weight: 800;
  color: var(--primary-dark);
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  padding: 0 4px 8px;
  font-size: 0.88rem;
}

.product-actions {
  padding: 4px 4px 10px;
}

.add-to-cart,
.view-detail {
  width: 100%;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(239, 63, 157, 0.18);
  animation: pulseButton 2.8s ease-in-out infinite;
}

.view-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(239, 63, 157, 0.26);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #fff0f7;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.benefits-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-card {
  padding: 24px 18px;
}

.benefit-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff0f7, #ffe6f5);
  color: var(--primary-dark);
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.testimonial-card {
  padding: 22px 20px;
}

.stars {
  color: #f4c542;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd8ef, #f2a8d3);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.person strong {
  display: block;
}

.newsletter {
  background: linear-gradient(135deg, #fff4fa, #ffeaf6);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px 24px;
  margin: 36px auto 10px;
  width: min(1120px, calc(100% - 32px));
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.newsletter form {
  display: flex;
  gap: 12px;
  width: min(520px, 100%);
}

.newsletter input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1rem 1.15rem;
  font: inherit;
}

.footer {
  padding: 30px 0 60px;
}

.footer-grid {
  align-items: start;
  padding-bottom: 28px;
}

.footer-brand p,
.footer-links a,
.footer-meta {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes pulseButton {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 18px rgba(239, 63, 157, 0.18);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 14px 24px rgba(239, 63, 157, 0.28);
  }
}

@media (max-width: 980px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    order: 3;
    padding-top: 10px;
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero,
  .section-header,
  .newsletter-inner,
  .footer-grid,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .featured-grid,
  .product-grid,
  .benefits-grid,
  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .featured-grid,
  .product-grid,
  .benefits-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 38px;
  }

  .hero-actions,
  .newsletter form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter form {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

/* ============================================================
   Utilidades base
   ============================================================ */

[hidden] {
  display: none !important;
}

body.no-scroll {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(239, 63, 157, 0.45);
  outline-offset: 2px;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary-dark);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.load-error {
  padding: 60px 20px;
  text-align: center;
  line-height: 1.7;
}

.load-error code {
  background: var(--secondary);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 6px;
}

.load-error-detail {
  color: var(--muted);
  font-size: 0.86rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Banner promocional
   ============================================================ */

.promo-banner {
  background: linear-gradient(100deg, #2a0f22, var(--primary-dark) 55%, #ff6fb5);
  color: #fff;
  font-size: 0.88rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.promo-banner.is-closing {
  opacity: 0;
  transform: translateY(-100%);
}

.promo-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 0;
  position: relative;
}

.promo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap;
}

.promo-tag {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.promo-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--primary-dark);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.promo-code:hover {
  transform: translateY(-1px);
}

.promo-code-value {
  letter-spacing: 0.08em;
}

.promo-code-action {
  background: var(--primary-dark);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.74rem;
}

.promo-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
}

.promo-timer strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.promo-close {
  position: absolute;
  right: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.promo-close:hover {
  color: #fff;
}

/* ============================================================
   Navegación
   ============================================================ */

.nav-links a.is-current {
  color: var(--primary-dark);
  font-weight: 700;
}

/* ============================================================
   Carrito (drawer lateral)
   ============================================================ */

.drawer-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 14, 25, 0.44);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

/* El cajón del carrito (z-index 50) va por encima de su velo. */
.drawer-overlay {
  z-index: 40;
}

/* Dentro del modal el velo debe quedar DEBAJO de la tarjeta (z-index 2);
   si no, su desenfoque se aplica sobre el propio formulario. */
.modal-overlay {
  z-index: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(25, 18, 29, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 50;
}

.cart-drawer.is-open {
  transform: none;
}

.cart-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-head h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.cart-drawer-count {
  color: var(--muted);
  font-size: 0.84rem;
}

.cart-shipping {
  padding: 14px 20px;
  background: #fff7fb;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--muted);
}

.cart-shipping p {
  margin: 0 0 8px;
}

.cart-shipping strong {
  color: var(--primary-dark);
}

.cart-shipping-track {
  height: 6px;
  border-radius: 999px;
  background: #ffe3f1;
  overflow: hidden;
}

.cart-shipping-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.3s ease;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-media {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  overflow: hidden;
  background: #fdeef6;
  display: grid;
  place-items: center;
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-fallback {
  font-weight: 800;
  color: var(--primary-dark);
}

.cart-item-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cart-item-body strong {
  font-size: 0.96rem;
}

.cart-item-price {
  color: var(--muted);
  font-size: 0.8rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff6fb;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 6px;
}

.qty-control span {
  min-width: 20px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
}

.qty-button {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
}

.qty-button:hover {
  background: #ffe3f1;
  color: var(--primary-dark);
}

.cart-item-remove {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.cart-item-remove:hover {
  color: #c62828;
}

.cart-item-total {
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.cart-empty-icon {
  font-size: 2.4rem;
}

.cart-empty strong {
  color: var(--text);
  font-size: 1.05rem;
}

.cart-empty p {
  margin: 0 0 8px;
}

.cart-coupon {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.coupon-form {
  display: flex;
  gap: 8px;
}

.coupon-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font: inherit;
  text-transform: uppercase;
  background: #fff;
}

.coupon-form .secondary-button {
  padding: 0.72rem 1.2rem;
}

.coupon-applied {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eaf7ee;
  border: 1px solid #c9e9d3;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.86rem;
  color: #1f6b38;
}

.coupon-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.coupon-applied button {
  margin-left: auto;
  border: none;
  background: none;
  color: #1f6b38;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.78rem;
}

.coupon-feedback {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1em;
}

.coupon-feedback.is-ok {
  color: #1f6b38;
}

.coupon-feedback.is-error {
  color: #c62828;
}

.coupon-hints {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.coupon-hints button {
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
}

.cart-drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.cart-summary {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.cart-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary dt {
  color: var(--muted);
}

.cart-summary dd {
  margin: 0;
  font-weight: 600;
}

.cart-summary dd.is-discount {
  color: var(--success);
}

.cart-summary-total {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}

.cart-summary-total dt {
  color: var(--text);
  font-weight: 700;
}

.cart-summary-total dd {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.primary-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-button[disabled]:hover {
  transform: none;
}

.cart-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
}

/* ============================================================
   Catálogo: filtros y buscador
   ============================================================ */

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.catalog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.chip.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
}

.catalog-search input {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  background: #fff;
  width: min(260px, 100%);
}

.catalog-count {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.catalog-empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 0 8px;
}

.image-wrap {
  position: relative;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(25, 18, 29, 0.1);
}

.badge.is-sale {
  background: var(--primary-dark);
  color: #fff;
}

.price s {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  margin-right: 4px;
}

/* ============================================================
   Formularios
   ============================================================ */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
}

.field-optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.82rem 1rem;
  font: inherit;
  background: #fff;
  color: var(--text);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 63, 157, 0.12);
}

.field-error {
  margin: 0;
  font-size: 0.76rem;
  color: #c62828;
  min-height: 0;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #e57373;
  background: #fff8f8;
}

.field-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-counter {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}

.field-check label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.field-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.form-feedback {
  margin: 12px 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  min-height: 1em;
}

.form-feedback.is-ok {
  color: #1f6b38;
  background: #eaf7ee;
  border: 1px solid #c9e9d3;
  border-radius: 14px;
  padding: 12px 14px;
}

.form-feedback.is-error {
  color: #c62828;
}

.newsletter-form-wrap {
  width: min(520px, 100%);
}

.newsletter form {
  align-items: start;
}

.newsletter .field {
  flex: 1;
  margin-bottom: 0;
}

.newsletter input {
  border-radius: 999px;
}

/* ============================================================
   Contacto
   ============================================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.contact-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 12px 28px rgba(23, 19, 30, 0.04);
}

.contact-aside {
  display: grid;
  gap: 16px;
}

.contact-info,
.contact-faq {
  background: linear-gradient(135deg, #fff4fa, #ffeaf6);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
}

.contact-info h3,
.contact-faq h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-line:last-child {
  margin-bottom: 0;
}

.contact-line strong {
  display: block;
  color: var(--text);
  font-size: 0.94rem;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(25, 18, 29, 0.06);
  flex-shrink: 0;
}

.contact-faq details {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.contact-faq details:last-of-type {
  border-bottom: none;
}

.contact-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

.contact-faq p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ============================================================
   Modal de pago (pasarela simulada)
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(900px, 100%);
  max-height: min(92vh, 860px);
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 40px 90px rgba(25, 18, 29, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.25s ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
}

.modal-head h2 {
  margin: 6px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.demo-pill {
  display: inline-block;
  background: #fff4cc;
  color: #8a6100;
  border: 1px solid #f2dc9a;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 24px 16px;
  flex-wrap: wrap;
}

.step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: var(--surface-soft);
}

.step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 800;
}

.step.is-active {
  background: var(--secondary);
  color: var(--primary-dark);
  font-weight: 700;
}

.step.is-active span {
  background: var(--primary-dark);
  border-color: transparent;
  color: #fff;
}

.step.is-done span {
  background: var(--success);
  border-color: transparent;
  color: #fff;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.modal-card.is-final .modal-grid {
  grid-template-columns: 1fr;
}

.modal-card.is-final .checkout-summary {
  display: none;
}

.modal-body {
  padding: 4px 24px 24px;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.modal-actions .primary-button {
  flex: 1;
}

.demo-notice {
  background: #fff9e6;
  border: 1px solid #f2dc9a;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #7a5700;
  margin-bottom: 16px;
}

.methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.method {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--muted);
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method strong {
  display: block;
  color: var(--text);
  font-size: 0.86rem;
}

.method-icon {
  font-size: 1.3rem;
}

.method.is-active {
  border-color: var(--primary);
  background: #fff7fb;
  box-shadow: 0 0 0 3px rgba(239, 63, 157, 0.1);
}

.method-note {
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

.input-with-badge {
  position: relative;
}

.card-brand {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--secondary);
  color: var(--primary-dark);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
}

.test-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  font-size: 0.76rem;
  color: var(--muted);
}

.test-cards button {
  border: 1px dashed var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
}

.test-cards button:hover {
  border-color: var(--primary);
  background: #fff7fb;
}

.checkout-summary {
  background: var(--surface-soft);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
}

.checkout-summary h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.checkout-items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
}

.checkout-items li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.checkout-item-qty {
  color: var(--primary-dark);
  font-weight: 800;
}

.checkout-item-name {
  color: var(--muted);
}

.checkout-coupon {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--success);
}

.checkout-secure {
  margin: 16px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Resultado del pago */

.result-card {
  text-align: center;
  padding: 24px 8px 8px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.result-card h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.result-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.result-card.is-ok .result-icon {
  background: var(--success);
  box-shadow: 0 14px 28px rgba(52, 168, 83, 0.28);
}

.result-card.is-error .result-icon {
  background: #d93025;
  box-shadow: 0 14px 28px rgba(217, 48, 37, 0.24);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 10px 0 0;
  text-align: left;
}

.result-grid > div {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}

.result-grid dt {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.result-grid dd {
  margin: 0;
  font-weight: 800;
  font-size: 0.96rem;
}

.result-note {
  font-size: 0.78rem;
  color: var(--muted);
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid #ffe3f1;
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

/* ============================================================
   Avisos flotantes
   ============================================================ */

.toast-host {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  justify-items: end;
  gap: 8px;
  z-index: 70;
  width: min(380px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  background: #26121f;
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.86rem;
  box-shadow: 0 20px 40px rgba(25, 18, 29, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast-success {
  background: #1f6b38;
}

.toast-error {
  background: #b3261e;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Responsive de los bloques nuevos
   ============================================================ */

@media (max-width: 980px) {
  .contact-layout,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-search input {
    width: 100%;
  }

  .hide-sm {
    display: none;
  }

  .promo-inner {
    justify-content: flex-start;
    padding-right: 28px;
  }

  .section-header > div {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .field-row,
  .methods,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .cart-drawer {
    width: 100%;
  }

  .promo-timer {
    display: none;
  }

  .newsletter form {
    display: grid;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .secondary-button,
  .modal-actions .primary-button {
    width: 100%;
  }

  /* El botón del cupón no debe comerse el campo de texto en pantallas pequeñas. */
  .coupon-form .secondary-button {
    width: auto;
    flex-shrink: 0;
  }

  .toast-host {
    right: 12px;
    left: 12px;
    top: 12px;
    bottom: auto;
    width: auto;
    justify-items: stretch;
  }
}

/* ===== Detalle de producto (modal con selección de talla) ===== */
.product-card {
  cursor: pointer;
}

.product-modal .modal-card {
  width: min(820px, 100%);
}

.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.pd-media {
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pd-media img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.pd-info {
  padding: 8px 26px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pd-info .price {
  font-size: 1.5rem;
}

.pd-category {
  text-transform: capitalize;
}

.pd-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pd-sizes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.92rem;
}

.pd-size-selected {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.85rem;
}

.pd-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pd-size {
  min-width: 56px;
  padding: 0.55rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink, #2a2230);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.pd-size:hover:not([disabled]) {
  border-color: var(--primary);
}

.pd-size.is-active {
  border-color: var(--primary-dark);
  background: var(--secondary);
  color: var(--primary-dark);
}

.pd-size[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: line-through;
}

.pd-size small {
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.pd-size-hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.pd-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.pd-size-options.shake {
  animation: pdShake 0.4s ease;
}

@keyframes pdShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 720px) {
  .pd-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .pd-media img {
    max-height: 300px;
  }
}
