/* Cookies Paradise — estilos globales (migrado desde CSS Modules de Next.js) */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --color-primary: #111111;
  --color-primary-hover: #000000;
  --color-on-primary: #ffffff;
  --color-accent: #000000;
  --color-bg: #ffffff;
  --color-bg-alt: #f2f2f2;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-muted: #666666;
  --color-border: #dddddd;
  --color-danger: #cc0000;

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.16);

  --radius-md: 12px;
  --radius-lg: 20px;

  --container-max: 1200px;

  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

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

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

button {
  font-family: var(--font-body);
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Transición de página ---------- */

.page-fade {
  animation: pageFade 0.35s ease-out;
}

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

/* ---------- Scroll reveal (reemplaza whileInView de Framer Motion) ---------- */

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

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Navbar ---------- */

.navbar-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar-header-scrolled {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.navbar-header-light .navbar-logo,
.navbar-header-light .navbar-link,
.navbar-header-light .navbar-icon-button,
.navbar-header-light .navbar-menu-button {
  color: #fff;
}

.navbar-header-light .navbar-logo,
.navbar-header-light .navbar-link {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.navbar-header-light .navbar-icon-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.navbar-links {
  display: none;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .navbar-links {
    display: flex;
  }
}

.navbar-link {
  position: relative;
  font-weight: 500;
  padding: 8px 0;
}

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.navbar-header-light .navbar-link::after {
  background: #ffffff;
}

.navbar-link-active::after {
  transform: scaleX(1);
}

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

.navbar-icon-button,
.navbar-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--color-primary);
}

.navbar-icon-button:hover {
  background: var(--color-bg-alt);
}

.navbar-menu-button {
  display: inline-flex;
}

@media (min-width: 768px) {
  .navbar-menu-button {
    display: none;
  }
}

.navbar-mobile-menu {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base), padding var(--transition-base);
}

.navbar-mobile-menu.navbar-mobile-menu-open {
  max-height: 240px;
  padding: 8px 24px 20px;
}

.navbar-mobile-link {
  padding: 12px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Hero ---------- */

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.hero-image-wrap {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  bottom: -60px;
  z-index: 0;
  will-change: transform;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.1) 70%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero-eyebrow,
.hero-title,
.hero-subtitle,
.hero-cta-wrap {
  opacity: 0;
  transform: translateY(24px);
  animation: heroItem 0.6s ease forwards;
}

.hero-eyebrow { animation-delay: 0.2s; }
.hero-title { animation-delay: 0.35s; }
.hero-subtitle { animation-delay: 0.5s; }
.hero-cta-wrap { animation-delay: 0.65s; }

@keyframes heroItem {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-title, .hero-subtitle, .hero-cta-wrap {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-eyebrow {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.hero-title {
  color: #fff;
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin-bottom: 16px;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--color-text);
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  border: none;
  font-size: 1rem;
  transition: transform var(--transition-fast);
}

.hero-cta:hover {
  transform: translateY(-2px);
}

.hero-crumb {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.7;
  animation: crumbFloat 4s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-crumb { animation: none; }
}

/* ---------- Marquee de beneficios ---------- */

.marquee {
  background: var(--color-primary);
  color: var(--color-on-primary);
  overflow: hidden;
  padding: 14px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 22s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  font-weight: 500;
  white-space: nowrap;
}

.marquee-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Grid de categorías (home) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 180px;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  overflow: hidden;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #333333, #000000);
  opacity: 0.95;
  transition: transform var(--transition-base);
}

.category-tile:hover::before {
  transform: scale(1.08);
}

.category-label {
  position: relative;
  z-index: 1;
}

/* ---------- Grid y tarjeta de producto ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.product-grid-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 48px 0;
  grid-column: 1 / -1;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
}

.product-card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.product-card:hover .product-card-image {
  transform: scale(1.05);
}

.product-card-body {
  padding: 16px 20px 20px;
}

.product-card-name {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.product-card-description {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card-price {
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.product-card-add-button {
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.product-card-add-button:hover {
  background: var(--color-accent);
  color: var(--color-on-primary);
}

.product-card-add-button:active {
  transform: scale(0.92);
}

/* ---------- Historia de marca ---------- */

.brand-story-section {
  background: var(--color-bg-alt);
  padding: 96px 24px;
}

.brand-story-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .brand-story-inner {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.brand-story-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.brand-story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-story-eyebrow {
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.brand-story-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 16px;
}

.brand-story-text {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* ---------- Testimonios ---------- */

.testimonials-section {
  padding: 96px 24px;
}

.testimonials-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.testimonials-title {
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 48px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonials-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.testimonials-quote {
  color: var(--color-text);
  margin-bottom: 20px;
  font-style: italic;
}

.testimonials-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonials-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonials-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonials-role {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ---------- Newsletter ---------- */

.newsletter-section {
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 72px 24px;
  text-align: center;
}

.newsletter-title {
  color: var(--color-on-primary);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.newsletter-subtitle {
  opacity: 0.85;
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

@media (min-width: 520px) {
  .newsletter-form {
    flex-direction: row;
  }
}

.newsletter-input {
  flex: 1;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 1rem;
}

.newsletter-button {
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: none;
  background: #ffffff;
  color: var(--color-text);
  font-weight: 600;
}

.newsletter-error {
  color: #ff8080;
  font-size: 0.85rem;
  margin-top: 8px;
}

.newsletter-success {
  font-weight: 600;
  margin-top: 8px;
}

.newsletter-hidden {
  display: none;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-text);
  color: #ededed;
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
}

.footer-tagline {
  color: #b3b3b3;
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-heading {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: #b3b3b3;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #4d4d4d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #333333;
  color: #999999;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Tabs de categoría (catálogo) ---------- */

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
  margin-bottom: 32px;
}

.category-tab {
  position: relative;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-weight: 600;
  color: var(--color-text-muted);
  min-height: 44px;
}

.category-tab-active {
  color: var(--color-primary);
}

.category-tab-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -5px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-accent);
}

/* ---------- Carrito (stub visual) ---------- */

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--color-surface);
  z-index: 201;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

body.cart-open .cart-drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

body.cart-open .cart-drawer {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cart-drawer-title {
  font-size: 1.3rem;
}

.cart-drawer-close {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  color: var(--color-primary);
}

.cart-drawer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  gap: 12px;
}

/* ---------- Estado de error ---------- */

.error-state-wrapper {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 16px;
}

.error-state-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.error-state-text {
  color: var(--color-text-muted);
}

.error-state-button {
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
}

/* ---------- Utilidades ---------- */

.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;
}

/* ---------- Insignia del carrito (navbar) ---------- */

.navbar-cart-button {
  position: relative;
}

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

.navbar-header-light .cart-badge {
  background: #ffffff;
  color: var(--color-text);
}

.cart-badge-hidden {
  display: none;
}

/* ---------- Lista de productos dentro del carrito lateral ---------- */

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
}

.cart-drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-drawer-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}

.cart-drawer-item-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.cart-drawer-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

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

.cart-drawer-item-remove {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.cart-drawer-item-remove:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.cart-drawer-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.cart-drawer-view,
.cart-drawer-checkout {
  display: block;
  text-align: center;
  min-height: 44px;
  line-height: 44px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.cart-drawer-view {
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.cart-drawer-checkout {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* ---------- Página de carrito ---------- */

.cart-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

@media (max-width: 640px) {
  .cart-row {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "image info"
      "image cantidad"
      "image subtotal-eliminar";
  }
}

.cart-row-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.cart-row-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-row-price {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.cart-row-cantidad {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-row-cantidad-input {
  width: 60px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.cart-row-actualizar {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-text);
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-row-actualizar:hover {
  background: var(--color-text);
  color: #ffffff;
}

.cart-row-subtotal {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart-row-eliminar {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.cart-row-eliminar:hover {
  background: var(--color-bg-alt);
  color: var(--color-danger);
}

.cart-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
}

.cart-summary-vaciar {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  text-decoration: underline;
  min-height: 44px;
  margin-right: auto;
}

.cart-summary-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.2rem;
}

.cart-summary-checkout {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
}

/* ---------- Checkout ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

@media (min-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1.4fr 1fr;
  }
}

.checkout-form {
  display: flex;
  flex-direction: column;
}

.checkout-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 16px;
  margin-bottom: 6px;
}

.checkout-input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  background: var(--color-surface);
  color: var(--color-text);
}

.checkout-input:focus {
  border-color: var(--color-text);
}

.checkout-textarea {
  min-height: 96px;
  padding: 12px 16px;
  resize: vertical;
}

.checkout-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: 6px;
}

.checkout-submit {
  margin-top: 28px;
  min-height: 52px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
  font-size: 1rem;
}

.checkout-submit:hover {
  background: var(--color-primary-hover);
}

.checkout-disclaimer {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.checkout-summary {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.checkout-summary-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-text);
  font-size: 1.1rem;
}

.checkout-confirm {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.checkout-confirm-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--color-text);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Popup de redirección a WhatsApp ---------- */

.whatsapp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.whatsapp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 301;
  width: min(360px, calc(100vw - 48px));
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
  text-align: center;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

body.whatsapp-open .whatsapp-modal-backdrop {
  opacity: 1;
  visibility: visible;
}

body.whatsapp-open .whatsapp-modal {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.whatsapp-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-modal-close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.whatsapp-modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-text);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-modal-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.whatsapp-modal-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.whatsapp-modal-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--color-bg-alt);
  overflow: hidden;
  margin-bottom: 20px;
}

.whatsapp-modal-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-text);
}

.whatsapp-modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
}

.whatsapp-modal-button:hover {
  background: var(--color-primary-hover);
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-modal-progress-bar {
    transition: none !important;
  }
}
