/* ============================================
   Paloma Patisserie - Estilos
   ============================================ */

:root {
  /* Paleta */
  --rose: #dfb6a4;
  --rose-deep: #c89080;
  --rose-soft: #ecd2c5;
  --cream: #f8efe8;
  --cream-warm: #f2e4d7;
  --cocoa: #3d2a1e;
  --cocoa-soft: #6b5647;
  --white: #ffffff;
  --line: #e8d7cb;
  --shadow-soft: 0 2px 12px rgba(61, 42, 30, 0.06);
  --shadow-md: 0 8px 32px rgba(61, 42, 30, 0.10);
  --shadow-lg: 0 20px 60px rgba(61, 42, 30, 0.14);

  /* Tipografía */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Espaciado base */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
}

/* Reset liviano */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cocoa);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Textura de fondo muy sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 20% 10%, rgba(223, 182, 164, 0.08), transparent 40%),
                    radial-gradient(circle at 80% 80%, rgba(223, 182, 164, 0.06), transparent 45%);
}

/* ============================================
   TOPBAR + HEADER
   ============================================ */
.top-bar {
  background: var(--cocoa);
  color: var(--cream);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 16px;
  position: relative;
  z-index: 10;
}

.site-header {
  background: rgba(248, 239, 232, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-main {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  font-style: italic;
  letter-spacing: -0.01em;
}
.logo-sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cocoa-soft);
  margin-top: 3px;
}

.logo-img {
  height: 66px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .logo-img { height: 52px; }
}

.nav {
  display: none;
  gap: 34px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--rose-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.nav a:hover { color: var(--rose-deep); }
.nav a:hover::after { transform: scaleX(1); }

@media (min-width: 768px) {
  .nav { display: flex; }
  .logo-main { font-size: 1.7rem; }
}

.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cart-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--rose-deep);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cream);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 48px 0 40px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}


.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-deep);
  font-weight: 600;
  margin: 0 0 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--cocoa);
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--rose-deep);
}

.hero-text {
  font-size: 1.02rem;
  color: var(--cocoa-soft);
  max-width: 480px;
  margin: 0 0 28px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
}
.hero-art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(61, 42, 30, 0.12));
  animation: float 6s ease-in-out infinite;
}
.hero-orn {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 50%, var(--rose-soft) 0%, transparent 60%);
  opacity: 0.5;
  z-index: -1;
  border-radius: 50%;
}

.hero-logo {
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(61, 42, 30, 0.12));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (min-width: 900px) {
  .hero { padding: 80px 0 60px; }
  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
  }
  .hero-art { max-width: 500px; }
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cocoa);
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(61, 42, 30, 0.15);
}
.btn-primary:hover {
  background: var(--rose-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(200, 144, 128, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--cocoa);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--white);
  border-color: var(--rose);
}
.btn-full { width: 100%; }

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  color: var(--rose);
  max-width: 200px;
  margin: 20px auto;
  opacity: 0.6;
}
.divider svg { width: 100%; height: 10px; }

/* ============================================
   SECCIONES
   ============================================ */
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.1;
}
.section-sub {
  color: var(--cocoa-soft);
  margin: 0;
}

/* ============================================
   PRODUCTOS
   ============================================ */
.products { padding: 50px 0; }

.filters {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 20px 20px;
  margin: 0 -20px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cocoa-soft);
  transition: all 0.2s;
}
.filter-chip:hover {
  border-color: var(--rose);
  color: var(--cocoa);
}
.filter-chip.active {
  background: var(--cocoa);
  color: var(--cream);
  border-color: var(--cocoa);
}

@media (min-width: 768px) {
  .filters {
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 0 20px;
    margin: 0 0 32px;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-card:focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 3px;
}

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

.product-img {
  aspect-ratio: 4 / 3;
  background: var(--cream-warm);
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.product-card:hover .product-img img { transform: scale(1.05); }

.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose);
  background: linear-gradient(135deg, var(--cream-warm) 0%, var(--rose-soft) 100%);
}

.product-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cocoa);
}

.product-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 450;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.product-desc {
  font-size: 0.88rem;
  color: var(--cocoa-soft);
  margin: 0 0 16px;
  flex: 1;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.product-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}
.price-from {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cocoa-soft);
  text-transform: uppercase;
  margin-right: 2px;
}
.product-view {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.02em;
  transition: transform 0.2s;
}
.product-card:hover .product-view {
  transform: translateX(3px);
}

.product-gallery-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cocoa);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.products-empty,
.products-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--cocoa-soft);
}

/* Skeleton loader */
.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
}
.sk-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, var(--cream-warm) 0%, var(--rose-soft) 50%, var(--cream-warm) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.sk-line {
  height: 14px;
  margin: 16px 20px 10px;
  background: var(--cream-warm);
  border-radius: 4px;
  animation: shimmer 1.6s infinite;
  background: linear-gradient(90deg, var(--cream-warm) 0%, var(--rose-soft) 50%, var(--cream-warm) 100%);
  background-size: 200% 100%;
}
.sk-line.short { width: 50%; margin-bottom: 24px; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   SOBRE NOSOTROS
   ============================================ */
.about {
  padding: 60px 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
  position: relative;
}
.about-inner {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.about-copy h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  line-height: 1.15;
}
.about-copy p {
  color: var(--cocoa-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* ============================================
   CONTACTO
   ============================================ */
.contact { padding: 60px 0; }

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .contact-cards { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--rose);
}
.contact-icon {
  width: 52px;
  height: 52px;
  background: var(--cream-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cocoa);
  flex-shrink: 0;
}
.contact-info { flex: 1; }
.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cocoa-soft);
  font-weight: 600;
  margin: 0 0 2px;
}
.contact-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 450;
}
.contact-arrow {
  font-size: 1.3rem;
  color: var(--rose-deep);
  transition: transform 0.2s;
}
.contact-card:hover .contact-arrow { transform: translateX(4px); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--cocoa);
  color: var(--cream);
  padding: 44px 0 32px;
  text-align: center;
  margin-top: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.footer-logo-img {
  height: 70px;
  width: auto;
  margin: 0 auto 12px;
  display: block;
}
.footer-text {
  color: var(--rose-soft);
  margin: 0 0 20px;
  font-size: 0.92rem;
}
.footer-legal {
  font-size: 0.78rem;
  color: rgba(248, 239, 232, 0.5);
  margin: 0;
  letter-spacing: 0.05em;
}

/* ============================================
   WHATSAPP FLOTANTE
   ============================================ */
.wa-float {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  z-index: 40;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulseWa 2.5s infinite;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}
@keyframes pulseWa {
  0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ============================================
   DRAWER CARRITO
   ============================================ */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(61, 42, 30, 0.4);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.3s;
}
.drawer-backdrop.open {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--cream);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(61, 42, 30, 0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0;
}
.cart-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cocoa);
  transition: background 0.2s;
}
.cart-close:hover { background: var(--cream-warm); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--cocoa-soft);
}
.cart-empty svg {
  width: 60px;
  height: 60px;
  color: var(--rose);
  margin: 0 auto 16px;
  display: block;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  background: var(--cream-warm);
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 2px;
  line-height: 1.2;
}
.cart-item-variant {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: var(--cream-warm);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--cocoa-soft);
  margin: 0 0 10px;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s;
}
.qty-btn:hover {
  border-color: var(--rose);
  background: var(--cream);
}
.qty-btn:active { transform: scale(0.92); }
.qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cart-item-remove {
  margin-left: auto;
  color: var(--cocoa-soft);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--rose-deep); }

.cart-footer {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.cart-total strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}
.cart-note {
  font-size: 0.75rem;
  color: var(--cocoa-soft);
  text-align: center;
  margin: 12px 0 0;
  line-height: 1.5;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cocoa);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.3s, transform 0.3s;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   ACCESIBILIDAD / REDUCE MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible para navegación con teclado */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   MODAL DE PRODUCTO
   ============================================ */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.product-modal.open { pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 42, 30, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s;
}
.product-modal.open .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative;
  background: var(--cream);
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s;
  -webkit-overflow-scrolling: touch;
}
.product-modal.open .modal-panel {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 768px) {
  .product-modal { align-items: center; padding: 20px; }
  .modal-panel {
    border-radius: var(--radius-lg);
    max-height: 88vh;
    transform: translateY(20px) scale(0.96);
  }
  .product-modal.open .modal-panel {
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cocoa);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}
.modal-close:hover { transform: scale(1.08); }

.modal-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .modal-content { grid-template-columns: 1fr 1fr; }
}

/* Galería */
.modal-gallery {
  display: flex;
  flex-direction: column;
  background: var(--cream-warm);
}
.modal-main-img {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}
.modal-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeImg 0.3s ease;
}
@keyframes fadeImg {
  from { opacity: 0.5; }
  to { opacity: 1; }
}
.modal-main-img .product-img-placeholder {
  width: 100%;
  height: 100%;
}

.modal-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.modal-thumbs::-webkit-scrollbar { display: none; }

.modal-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
  background: var(--white);
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-thumb:hover { transform: scale(1.05); }
.modal-thumb.active {
  border-color: var(--rose-deep);
}

/* Info */
.modal-info {
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .modal-info { padding: 44px 36px; justify-content: center; }
}

.modal-category {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rose-deep);
  margin: 0 0 10px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--cocoa);
}
.modal-desc {
  color: var(--cocoa-soft);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 24px;
  white-space: pre-wrap;
}

.modal-single-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 22px;
  color: var(--cocoa);
}

.modal-variants {
  margin: 0 0 24px;
}
.modal-variants-label {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cocoa-soft);
  margin: 0 0 10px;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.variant-btn {
  flex: 1 1 auto;
  min-width: 110px;
  padding: 12px 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: all 0.18s;
  text-align: left;
}
.variant-btn:hover {
  border-color: var(--rose);
  transform: translateY(-1px);
}
.variant-btn.active {
  border-color: var(--cocoa);
  background: var(--cocoa);
  color: var(--cream);
}
.variant-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.variant-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.modal-add {
  margin-top: auto;
}
