/* ============================================================
   SALMA — Identidad visual @tiendasalmacr
   Carmesí pastel · Femenino · Bold · Móvil primero
   ============================================================ */

:root {
  /* Colores oficiales */
  --principal: #f491a6;
  --principal-hover: #e87a93;
  --principal-deep: #d96a86;
  --fondo: #fbe1e8;
  --blanco: #ffffff;

  /* Texto: blanco en superficies carmesí;
     rosa profundo en fondos claros (legibilidad) */
  --texto-blanco: #ffffff;
  --texto: #c45a72;
  --texto-suave: #d4899c;
  --texto-muted: #e0a8b6;

  /* Superficies */
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.72);
  --borde: rgba(244, 145, 166, 0.28);
  --sombra: rgba(244, 145, 166, 0.18);
  --sombra-hover: rgba(244, 145, 166, 0.28);

  /* Alias legacy (componentes existentes) */
  --rosa: #fbe1e8;
  --rosa-oscuro: #f491a6;
  --rosa-texto: #c45a72;
  --lavanda: #f8c8d4;
  --lavanda-oscuro: #f491a6;
  --menta: #f8d0dc;
  --menta-oscuro: #f491a6;
  --beige: #fff5f8;
  --beige-oscuro: #f8c8d4;
  --crema: #fbe1e8;

  /* Estados */
  --exito: #5cb88a;
  --error: #e06b7a;
  --aviso: #e0b86a;

  /* Tipografía — bold / black, estilo feed Instagram */
  --font: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Poppins", system-ui, sans-serif;

  /* Layout */
  --radio: 14px;
  --radio-sm: 10px;
  --radio-lg: 22px;
  --header-h: 68px;
  --max-w: 1100px;
  --trans: 0.25s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: 500;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

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

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* ---------- Header (carmesí + texto blanco) ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--principal);
  border-bottom: none;
  height: var(--header-h);
  box-shadow: 0 4px 20px var(--sombra);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--texto-blanco);
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Solo el nombre "Tienda Salma" del header principal — Anton (Canva) */
.logo--tienda {
  font-family: "Anton", Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
  font-size: clamp(1.55rem, 4.5vw, 1.95rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo span {
  font-weight: 600;
  opacity: 0.9;
}

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

.nav__link {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--texto-blanco);
  transition: background var(--trans), transform var(--trans);
}

.nav__link:hover,
.nav__link.active {
  background: rgba(255, 255, 255, 0.22);
  color: var(--texto-blanco);
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans);
}

.cart-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--texto-blanco);
  stroke-width: 2;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--blanco);
  color: var(--principal-deep);
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge:empty,
.cart-badge[data-count="0"] {
  display: none;
}

/* ---------- Hero — títulos tipo feed Instagram ---------- */
.hero {
  background: var(--principal);
  padding: 2.75rem 0 3rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 28px;
  background: var(--fondo);
  border-radius: 28px 28px 0 0;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 900;
  color: var(--texto-blanco);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(180, 70, 100, 0.25);
}

.hero__sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 500;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.55;
}

.hero__location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.15rem;
  padding: 0.4rem 1.1rem;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-blanco);
}

/* ---------- Filtros (panel expandible) ---------- */
.filters-wrap {
  margin-bottom: 1.75rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.filters-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--principal);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--texto);
  cursor: pointer;
  box-shadow: 0 6px 18px var(--sombra);
  transition: background var(--trans), box-shadow var(--trans), border-radius var(--trans);
  text-align: left;
}

.filters-toggle:hover {
  box-shadow: 0 8px 22px var(--sombra-hover);
}

.filters-wrap.is-open .filters-toggle {
  border-radius: 20px 20px 0 0;
  border-bottom-color: transparent;
  box-shadow: none;
}

.filters-toggle__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--principal);
  color: var(--texto-blanco);
  font-size: 0.95rem;
}

.filters-toggle__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.filters-toggle__label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texto-suave);
}

.filters-toggle__current {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--principal-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filters-toggle__chevron {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2.5px solid var(--principal);
  border-bottom: 2.5px solid var(--principal);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform var(--trans);
}

.filters-wrap.is-open .filters-toggle__chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.filters-panel {
  background: var(--blanco);
  border: 2px solid var(--principal);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 0.35rem 1rem 1.1rem;
  box-shadow: 0 10px 24px var(--sombra);
  animation: filtersDrop 0.22s ease;
}

.filters-panel[hidden] {
  display: none !important;
}

@keyframes filtersDrop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.filter-btn {
  padding: 0.48rem 0.95rem;
  border: 2px solid var(--borde);
  background: var(--fondo);
  border-radius: 999px;
  color: var(--principal-deep);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--trans);
}

.filter-btn:hover {
  border-color: var(--principal);
  background: rgba(244, 145, 166, 0.12);
}

.filter-btn.active {
  background: var(--principal);
  border-color: var(--principal);
  color: var(--texto-blanco);
  box-shadow: 0 4px 12px var(--sombra);
}

/* ---------- Grid de productos ---------- */
.products-section {
  flex: 1;
  padding-bottom: 3.5rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }
}

@media (min-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.product-card {
  background: var(--card);
  border-radius: var(--radio-lg);
  overflow: hidden;
  border: 1px solid var(--borde);
  box-shadow: 0 6px 20px var(--sombra);
  transition: transform var(--trans), box-shadow var(--trans);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px var(--sombra-hover);
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--beige);
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.65rem;
  background: var(--principal);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--texto-blanco);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card__out {
  position: absolute;
  inset: 0;
  background: rgba(251, 225, 232, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--error);
}

.product-card__body {
  padding: 0.95rem 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.product-card__name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--texto);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--principal-deep);
  margin-top: auto;
  padding-top: 0.4rem;
}

/* ---------- Detalle de producto ---------- */
.product-detail {
  padding: 1.5rem 0 3rem;
  flex: 1;
}

.product-detail__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .product-detail__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

/* ---------- Carrusel de fotos ---------- */
.carousel {
  position: relative;
  background: var(--blanco);
  border-radius: var(--radio-lg);
  overflow: hidden;
  border: 1px solid var(--borde);
  box-shadow: 0 8px 28px var(--sombra);
  outline: none;
  -webkit-user-select: none;
  user-select: none;
}

.carousel__viewport {
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  aspect-ratio: 3 / 4;
}

@media (min-width: 768px) {
  .carousel__viewport {
    aspect-ratio: 3 / 4;
    max-height: min(72vh, 640px);
  }
}

.carousel__track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--beige);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--principal-deep);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--sombra);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans), transform var(--trans);
}

.carousel__btn:hover {
  background: var(--principal);
  color: var(--texto-blanco);
}

.carousel__btn--prev {
  left: 0.65rem;
}

.carousel__btn--next {
  right: 0.65rem;
}

@media (max-width: 480px) {
  .carousel__btn {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }
}

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.5rem;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform var(--trans), background var(--trans);
  box-shadow: 0 1px 4px rgba(196, 90, 114, 0.25);
}

.carousel__dot.is-active {
  background: var(--principal);
  transform: scale(1.25);
}

.carousel__counter {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(244, 145, 166, 0.92);
  color: var(--texto-blanco);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* legacy single image (por si se usa en otro lado) */
.product-detail__img-wrap {
  background: var(--blanco);
  border-radius: var(--radio-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--borde);
  box-shadow: 0 8px 28px var(--sombra);
}

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

.product-detail__info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 900;
  color: var(--texto);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.product-detail__price {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--principal-deep);
  margin-bottom: 1rem;
}

.product-detail__desc {
  color: var(--texto-suave);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.product-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: var(--principal);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-blanco);
}

.chip--stock-low {
  background: #fde8c8;
  color: #8a5a20;
}

.chip--stock-out {
  background: #fce0e6;
  color: var(--error);
}

.option-group {
  margin-bottom: 1.25rem;
}

.option-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--texto-suave);
  margin-bottom: 0.5rem;
}

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.option-pill {
  min-width: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--borde);
  background: var(--blanco);
  border-radius: var(--radio-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--texto);
  transition: all var(--trans);
  text-align: center;
}

.option-pill:hover {
  border-color: var(--principal);
}

.option-pill.selected {
  background: var(--principal);
  border-color: var(--principal);
  color: var(--texto-blanco);
}

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

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--borde);
  border-radius: var(--radio-sm);
  overflow: hidden;
  background: var(--blanco);
}

.qty-control button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--principal-deep);
  transition: background var(--trans);
}

.qty-control button:hover {
  background: var(--fondo);
}

.qty-control span {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  color: var(--texto);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--trans), background var(--trans), box-shadow var(--trans),
    opacity var(--trans);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--principal);
  color: var(--texto-blanco);
  width: 100%;
  box-shadow: 0 6px 18px var(--sombra);
}

.btn--primary:hover:not(:disabled) {
  background: var(--principal-hover);
  box-shadow: 0 8px 22px var(--sombra-hover);
}

.btn--whatsapp {
  background: #25d366;
  color: var(--texto-blanco);
  width: 100%;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
}

.btn--whatsapp:hover:not(:disabled) {
  background: #1ebe57;
}

.btn--secondary {
  background: var(--blanco);
  color: var(--principal-deep);
  border: 2px solid var(--principal);
}

.btn--secondary:hover:not(:disabled) {
  background: rgba(244, 145, 166, 0.12);
}

.btn--ghost {
  background: transparent;
  color: var(--texto-suave);
  border: 2px solid var(--borde);
}

.btn--danger {
  background: #fce0e6;
  color: var(--error);
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--principal-deep);
  margin-bottom: 1.25rem;
  transition: color var(--trans);
}

.back-link:hover {
  color: var(--principal-hover);
}

/* ---------- Carrito ---------- */
.cart-page {
  padding: 1.25rem 0 3.5rem;
  flex: 1;
}

.cart-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--texto);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.cart-empty,
.cart-done {
  text-align: center;
  padding: 2.75rem 1.25rem;
  background: var(--card);
  border-radius: var(--radio-lg);
  border: 2px dashed var(--borde);
  box-shadow: 0 6px 20px var(--sombra);
}

.cart-empty p,
.cart-done p {
  color: var(--texto-suave);
  margin: 0.5rem 0 1.25rem;
  font-weight: 500;
}

.cart-done h2 {
  color: var(--exito);
  font-weight: 900;
  font-size: 1.35rem;
}

.wa-fallback {
  margin: 1rem 0;
}

.wa-fallback .btn {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.cart-layout {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  width: 100%;
}

@media (min-width: 860px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.75rem;
  }
}

.cart-section-title {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0 0 1rem;
  color: var(--principal-deep);
  letter-spacing: -0.01em;
}

.cart-items-section {
  background: var(--card);
  border: 2px solid var(--principal);
  border-radius: var(--radio-lg);
  padding: 1.15rem 1rem 1.3rem;
  min-width: 0;
  position: static !important;
  z-index: 2;
  box-shadow: 0 6px 20px var(--sombra);
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  position: static !important;
}

.cart-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.9rem;
  background: var(--fondo);
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.cart-item__img {
  width: 88px !important;
  height: 110px !important;
  flex: 0 0 88px;
  object-fit: cover;
  border-radius: var(--radio-sm);
  background: var(--beige);
  display: block;
}

.cart-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cart-item__name {
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--texto);
  word-break: break-word;
  margin: 0;
}

.cart-item__meta,
.cart-item__unit {
  font-size: 0.8rem;
  color: var(--texto-suave);
  margin: 0;
  font-weight: 500;
}

.cart-item__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--borde);
}

.cart-item__line-total {
  font-weight: 900;
  color: var(--principal-deep);
  font-size: 1rem;
}

.cart-item__remove {
  border: none;
  background: none;
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem 0;
  margin-left: auto;
}

.cart-summary {
  background: var(--card);
  border-radius: var(--radio-lg);
  border: 2px solid var(--principal);
  padding: 1.2rem 1.05rem 1.4rem;
  position: static !important;
  bottom: auto !important;
  top: auto !important;
  width: 100%;
  min-width: 0;
  z-index: 1;
  box-shadow: 0 6px 20px var(--sombra);
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--texto);
}

.cart-summary__total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 900;
  padding-top: 0.75rem;
  margin: 0.35rem 0 1.15rem;
  border-top: 2px solid var(--borde);
  color: var(--principal-deep);
}

.checkout-form {
  margin: 0;
}

.cart-wa-hint {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--texto-suave);
  text-align: center;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--texto-suave);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 2px solid var(--borde);
  border-radius: var(--radio-sm);
  background: var(--fondo);
  color: var(--texto);
  font-weight: 500;
  transition: border-color var(--trans), background var(--trans);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--principal);
  background: var(--blanco);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

/* ---------- Loaders / empty ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
  color: var(--texto-suave);
  font-weight: 600;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(244, 145, 166, 0.25);
  border-top-color: var(--principal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--texto-suave);
}

.empty-state h2 {
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: var(--texto);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(90%, 360px);
  pointer-events: none;
}

.toast {
  padding: 0.9rem 1.15rem;
  background: var(--principal-deep);
  color: var(--texto-blanco);
  border-radius: var(--radio);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--sombra-hover);
  animation: toastIn 0.3s ease;
  text-align: center;
  pointer-events: auto;
}

.toast--success {
  background: var(--exito);
}

.toast--error {
  background: var(--error);
}

/* ---------- Footer (carmesí + blanco) ---------- */
.footer {
  margin-top: auto;
  padding: 2rem 0;
  background: var(--principal);
  border-top: none;
  text-align: center;
  box-shadow: 0 -4px 20px var(--sombra);
}

.footer p {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.footer__brand {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  color: var(--texto-blanco);
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.footer a {
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(196, 90, 114, 0.35);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--trans), visibility var(--trans);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}

.modal {
  background: var(--blanco);
  border-radius: var(--radio-lg) var(--radio-lg) 0 0;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  transform: translateY(20px);
  transition: transform var(--trans);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .modal {
    border-radius: var(--radio-lg);
  }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal__header h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--texto);
}

.modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--fondo);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--texto-suave);
  font-weight: 700;
}

/* ---------- Animaciones ---------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:nth-child(1) { animation-delay: 0.02s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.14s; }
.product-card:nth-child(5) { animation-delay: 0.18s; }
.product-card:nth-child(6) { animation-delay: 0.22s; }
.product-card:nth-child(7) { animation-delay: 0.26s; }
.product-card:nth-child(8) { animation-delay: 0.3s; }
