/* =============================================
   Paleta: Morado principal (#a66dd4)
============================================= */

:root {
  --primary: #a66dd4;
  --primary-dark: #7c3aed;
  --primary-light: #d4a8f0;
  --primary-glow: rgba(166, 109, 212, 0.22);

  --accent: #ff6ec7;
  --accent-2: #f9c74f;

  --white: #ffffff;
  --off-white: #faf9fc;
  --gray-50: #f7f5fb;
  --gray-100: #f0ecf8;
  --gray-200: #e2daf0;
  --gray-300: #ccc3de;
  --gray-500: #9587b0;
  --gray-700: #4a3f65;
  --dark: #140f24;

  --lila-light: #f3e9f9;
  --lila-subtle: rgba(166, 109, 212, 0.07);

  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;

  --radius-xs: 4px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 3px rgba(20, 15, 36, 0.08);
  --shadow-sm: 0 2px 10px rgba(20, 15, 36, 0.07);
  --shadow-md: 0 8px 28px rgba(20, 15, 36, 0.09);
  --shadow-lg: 0 20px 56px rgba(20, 15, 36, 0.13);
  --shadow-xl: 0 36px 90px rgba(20, 15, 36, 0.16);
  --shadow-glow: 0 4px 32px rgba(166, 109, 212, 0.28);

  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --t-fast: 0.15s;
  --t-mid: 0.25s;
  --t-slow: 0.4s;
}

/* ── Reset ────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  background-image:
    radial-gradient(
      ellipse 80% 60% at 10% -10%,
      rgba(166, 109, 212, 0.07) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 50% at 90% 110%,
      rgba(124, 58, 237, 0.05) 0%,
      transparent 60%
    );
  min-height: 100vh;
}

/* ── Container principal ──────────────────── */
.detalle-container {
  max-width: 1260px;
  margin: 90px auto;
  padding: 20px 24px 80px;
  animation: fadeInUp 0.6s var(--ease-out) both;
  background: var(--white);
  border-radius: var(--radius-lg);
  animation:
    fadeInUp 0.6s var(--ease-out) both,
    glowSpin 4s linear infinite;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes glowSpin {
  0% {
    box-shadow:
      20px 0px 40px 6px rgba(166, 109, 212, 0.3),
      -20px 0px 40px 6px rgba(124, 58, 237, 0.3);
  }
  25% {
    box-shadow:
      0px 20px 40px 6px rgba(255, 110, 199, 0.3),
      0px -20px 40px 6px rgba(166, 109, 212, 0.3);
  }
  50% {
    box-shadow:
      -20px 0px 40px 6px rgba(249, 199, 79, 0.2),
      20px 0px 40px 6px rgba(255, 110, 199, 0.3);
  }
  75% {
    box-shadow:
      0px -20px 40px 6px rgba(124, 58, 237, 0.3),
      0px 20px 40px 6px rgba(249, 199, 79, 0.3);
  }
  100% {
    box-shadow:
      20px 0px 40px 6px rgba(166, 109, 212, 0.3),
      -20px 0px 40px 6px rgba(124, 58, 237, 0.3);
  }
}

/* ── Header ───────────────────────────────── */
.header-detalle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    #9b4dca 60%,
    var(--primary) 100%
  );
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.header-detalle::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 80% 50%,
      rgba(255, 110, 199, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      circle at 10% 80%,
      rgba(249, 199, 79, 0.08) 0%,
      transparent 40%
    );
  pointer-events: none;
}

.header-detalle::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.header-detalle h1 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.header-detalle h1 i {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05em;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 10px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: all var(--t-mid) var(--ease);
  position: relative;
  z-index: 1;
}

.btn-volver:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-volver i {
  font-size: 0.9rem;
}

/* ── Layout contenido ─────────────────────── */
.contenido-detalle {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 52px;
  align-items: start;
}

/* ── Carrusel ─────────────────────────────── */
.carousel-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 1 / 1.05;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(166, 109, 212, 0.1);
}

.carousel-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(20, 15, 36, 0.12), transparent);
  pointer-events: none;
  z-index: 1;
}

.carousel-slide {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.carousel-slide.active {
  display: block;
  animation: slideReveal 0.45s var(--ease-out) both;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dark);
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all var(--t-fast) var(--ease-spring);
  z-index: 2;
}

.carousel-nav:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.1);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.16),
    var(--shadow-glow);
  color: var(--primary);
}

.carousel-nav.prev {
  left: 16px;
}
.carousel-nav.next {
  right: 16px;
}

.carousel-indicators {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
}

.indicator.active {
  background: var(--white);
  width: 22px;
  border-radius: 4px;
}

/* ── Info producto ────────────────────────── */
.info-producto {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Título */
.titulo-producto {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(3.0rem, 4.0vw, 2.0rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--dark);
  margin: 0 0 20px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--gray-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Badge categoría */
.badge-categoria {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: linear-gradient(
    135deg,
    var(--lila-light),
    rgba(212, 168, 240, 0.25)
  );
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  margin-bottom: 28px;
  width: fit-content;
  box-shadow: 0 2px 10px rgba(166, 109, 212, 0.12);
}

/* Marca — info item mejorado */
.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--gray-700);
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}

.info-item:last-of-type {
  border-bottom: none;
}

/* Icono con fondo */
.info-item i {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lila-subtle);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 1px solid rgba(166, 109, 212, 0.1);
}

.info-item strong {
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
  font-family: Arial, Helvetica, sans-serif;
}

/* Wrapper para label + valor en columna */
.info-item .info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-item .info-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.1px;
}

/* Precio */
.product-price-relacionado {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 4px;
  font-size: 3rem;
}

.product-price-relacionado .amount {
  font-size: 1.8rem;
  font-weight: 900;
  background-clip: text;
  padding: 0;
}

.product-price-relacionado .currency {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gray-500);
  -webkit-text-fill-color: var(--gray-500);
  margin-bottom: 6px;
}

/* Stock disponible — chip debajo del precio */
.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-bottom: 8px;
}

.stock-chip.disponible {
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.stock-chip.disponible::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.08);
  }
}

/* Descripción */
.descripcion-producto {
  background: linear-gradient(
    135deg,
    var(--gray-100) 0%,
    rgba(212, 168, 240, 0.08) 100%
  );
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.descripcion-producto::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  right: 16px;
  font-size: 5rem;
  font-family: Georgia, serif;
  color: rgba(166, 109, 212, 0.08);
  line-height: 1;
  pointer-events: none;
}

.descripcion-producto h5 {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.descripcion-producto p {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin: 0;
  line-height: 1.7;
  font-weight: 300;
  font-style: italic;
}

/* ── Controles compra ─────────────────────── */
.controles-compra {
  margin-top: 28px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Label cantidad */
.cantidad-selector label {
  font-family: var(--font-display) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
  color: var(--dark) !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.cantidad-selector label i {
  color: var(--primary);
}

/* Wrapper botones cantidad */
.cantidad-selector > div {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: fit-content;
}
/* Botones cantidad */
.btn-cantidad {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.btn-cantidad:hover:not(:disabled) {
  background: var(--lila-subtle);
  color: var(--primary);
}

.btn-cantidad:active:not(:disabled) {
  background: var(--gray-200);
  transform: scale(0.92);
}

.btn-cantidad:disabled {
  opacity: 0.28;
}

/* Input cantidad */
#cantidadProducto {
  width: 64px !important;
  text-align: center !important;
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-left: 1px solid var(--gray-200) !important;
  border-right: 1px solid var(--gray-200) !important;
  border-radius: 0 !important;
  padding: 10px 8px !important;
  background: var(--white);
  color: var(--dark);
  outline: none;
}
/* Botón agregar carrito */
.btn-agregar-carrito {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: none;
  background: #a66dd4ff;
  color: #fff;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  box-shadow:
    0 6px 24px rgba(124, 58, 237, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-agregar-carrito::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.btn-agregar-carrito:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 10px 32px rgba(124, 58, 237, 0.38),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-agregar-carrito:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.22);
}

.btn-agregar-carrito:disabled {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.22);
  cursor: default;
  pointer-events: none;
}

/* ── Relacionados ─────────────────────────── */
.productos-relacionados-section {
  margin-top: 80px;
  padding-top: 52px;
  border-top: 1px solid var(--gray-200);
}

.relacionados-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.3px;
}

.relacionados-title i {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(166, 109, 212, 0.3);
}

.relacionados-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.relacionados-wrapper {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 10px 4px 24px;
  flex: 1;
}

.relacionados-wrapper::-webkit-scrollbar {
  display: none;
}

.scroll-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-700);
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast) var(--ease-spring);
}

.scroll-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: scale(1.08);
}

/* Cards relacionados */
.product-card-relacionado {
  flex-shrink: 0;
  width: 284px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(166, 109, 212, 0.08);
  box-shadow:
    var(--shadow-sm),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  transition: all var(--t-slow) var(--ease-spring);
}

.product-card-relacionado:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(166, 109, 212, 0.2);
  box-shadow:
    var(--shadow-lg),
    var(--shadow-glow),
    0 0 0 1px rgba(166, 109, 212, 0.08);
}

.product-image-relacionado {
  position: relative;
  height: 224px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
  border-bottom: 1px solid rgba(166, 109, 212, 0.06);
}

.product-image-relacionado img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-spring);
}

.product-card-relacionado:hover .product-image-relacionado img {
  transform: scale(1.07);
}

.product-image-relacionado::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(20, 15, 36, 0.06) 100%
  );
  pointer-events: none;
}

/* Badges stock */
.badge-agotado-rel,
.badge-pocas-rel {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.badge-agotado-rel {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.badge-pocas-rel {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: var(--dark);
}

/* Info relacionado */
.product-info-relacionado {
  padding: 18px 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name-relacionado {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.2px;
  transition: color var(--t-fast) var(--ease);
}

.product-card-relacionado:hover .product-name-relacionado {
  color: var(--primary-dark);
}

.product-meta-relacionado {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(166, 109, 212, 0.07);
}

.product-brand-relacionado {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.product-category-relacionado {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price-relacionado {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.product-price-relacionado .amount {
  background: linear-gradient(135deg, var(--dark), var(--gray-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0;
  font-size: inherit;
}

.product-price-relacionado .currency {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gray-500);
  -webkit-text-fill-color: var(--gray-500);
}

.product-stock-relacionado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin-top: auto;
}

.product-stock-relacionado::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.product-stock-relacionado.stock-disponible {
  color: #065f46;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.product-stock-relacionado.stock-limitado {
  color: #92400e;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.14);
}

.product-stock-relacionado.stock-agotado {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.12);
}

/* Acciones relacionado */
.product-actions-relacionado {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
  flex-shrink: 0;
}

.btn-modal-relacionado {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
}

.btn-modal-relacionado:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--lila-subtle);
}

.btn-add-relacionado {
  flex: 1;
  padding: 11px 16px;
  border: none;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-mid) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2);
}

.btn-add-relacionado:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.32);
}

.btn-add-relacionado:disabled {
  background: var(--gray-200);
  color: var(--gray-500);
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.btn-add-relacionado.btn-added {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
  cursor: default;
  pointer-events: none;
}

/* ── Notificaciones ───────────────────────── */
.mensaje-notificacion {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  padding: 15px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--ease-out) both;
  max-width: 340px;
  line-height: 1.4;
  backdrop-filter: blur(10px);
}

.mensaje-exito {
  background: rgba(209, 250, 229, 0.95);
  color: #065f46;
  border-left: 3px solid var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 3px solid var(--success);
}

.mensaje-error {
  background: rgba(254, 226, 226, 0.95);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-left: 3px solid var(--danger);
}

/* ── Animaciones ──────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideReveal {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ── Responsive ───────────────────────────── */

/* Tablet grande y Desktop pequeño */
@media (max-width: 1024px) {
  .detalle-container {
    margin: 24px 16px;
    padding: 16px 20px 60px;
    border-radius: var(--radius-md);
  }

  .header-detalle {
    padding: 20px 24px;
    margin-bottom: 36px;
    border-radius: var(--radius-md);
  }

  .header-detalle h1 {
    font-size: 1.4rem;
  }

  .contenido-detalle {
    gap: 40px;
  }

  .productos-relacionados-section {
    margin-top: 60px;
    padding-top: 40px;
  }

  .relacionados-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .detalle-container {
    margin: 16px 12px;
    padding: 12px 16px 50px;
  }

  .header-detalle {
    padding: 18px 20px;
    margin-bottom: 32px;
  }

  .header-detalle h1 {
    font-size: 1.3rem;
  }

  .header-detalle h1 i {
    width: 38px;
    height: 38px;
  }

  .contenido-detalle {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .carousel-container {
    aspect-ratio: 4 / 3;
    max-height: 480px;
  }

  .titulo-producto {
    font-size: 2.2rem;
    margin-bottom: 16px;
  }

  .badge-categoria {
    margin-bottom: 20px;
  }

  .info-item {
    padding: 12px 0;
  }

  .descripcion-producto {
    margin: 16px 0;
    padding: 16px 18px;
  }

  .controles-compra {
    margin-top: 24px !important;
  }

  .productos-relacionados-section {
    margin-top: 50px;
    padding-top: 36px;
  }

  .relacionados-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .product-card-relacionado {
    width: 260px;
  }
}

/* Móvil grande */
@media (max-width: 600px) {
  body {
    background-image: none;
    background: var(--gray-50);
  }

  .detalle-container {
    margin: 0;
    padding: 0 0 40px;
    border-radius: 0;
    animation: fadeInUp 0.6s var(--ease-out) both;
  }

  .header-detalle {
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .header-detalle h1 {
    font-size: 1.15rem;
    gap: 10px;
  }

  .header-detalle h1 i {
    width: 36px;
    height: 36px;
    font-size: 0.95em;
  }

  .btn-volver {
    padding: 9px 16px;
    font-size: 0.75rem;
  }

  .btn-volver span {
    display: none;
  }

  /* Contenido principal con padding lateral */
  .contenido-detalle {
    gap: 28px;
    padding: 0 16px;
  }

  .carousel-container {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    margin: 0 -16px;
    width: calc(100% + 32px);
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-nav.prev {
    left: 12px;
  }
  .carousel-nav.next {
    right: 12px;
  }

  .info-producto {
    padding: 0;
  }

  .titulo-producto {
    font-size: 1.75rem;
    margin-bottom: 14px;
  }

  .badge-categoria {
    font-size: 0.65rem;
    padding: 5px 14px;
    margin-bottom: 20px;
  }

  .info-item {
    padding: 10px 0;
  }

  .info-item i {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .info-item strong {
    font-size: 0.9rem;
  }

  .info-item .info-value {
    font-size: 0.88rem;
  }

  .product-price-relacionado {
    margin: 2px 0 2px;
  }

  .product-price-relacionado .amount {
    font-size: 1.6rem;
  }

  .product-price-relacionado .currency {
    font-size: 1rem;
  }

  .stock-chip {
    font-size: 0.72rem;
    padding: 4px 12px;
    margin-bottom: 6px;
  }

  .descripcion-producto {
    margin: 16px 0;
    padding: 14px 16px;
  }

  .descripcion-producto h5 {
    font-size: 0.65rem;
    margin-bottom: 8px;
  }

  .descripcion-producto p {
    font-size: 0.85rem;
  }

  .controles-compra {
    margin-top: 20px !important;
    gap: 14px;
  }

  .cantidad-selector label {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
  }

  .cantidad-selector > div {
    width: 100%;
    max-width: 200px;
  }

  .btn-cantidad {
    width: 44px;
    height: 44px;
  }

  #cantidadProducto {
    width: 56px !important;
    font-size: 1rem !important;
  }

  .btn-agregar-carrito {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  /* Productos relacionados */
  .productos-relacionados-section {
    margin-top: 40px;
    padding-top: 32px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .relacionados-title {
    font-size: 1.35rem;
    margin-bottom: 18px;
    gap: 10px;
  }

  .relacionados-title i {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .relacionados-container {
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .relacionados-wrapper {
    gap: 16px;
    padding: 8px 0 20px;
  }

  .product-card-relacionado {
    width: 240px;
  }

  .product-image-relacionado {
    height: 200px;
  }

  .product-info-relacionado {
    padding: 14px 14px 10px;
  }

  .product-name-relacionado {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .product-meta-relacionado {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .product-price-relacionado {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .product-actions-relacionado {
    padding: 0 12px 12px;
    gap: 6px;
  }

  .btn-modal-relacionado {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  .btn-add-relacionado {
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .scroll-btn {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  /* Notificaciones */
  .mensaje-notificacion {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    padding: 12px 18px;
    font-size: 0.82rem;
  }
}

/* Móvil pequeño */
@media (max-width: 400px) {
  .header-detalle {
    padding: 14px 16px;
  }

  .header-detalle h1 {
    font-size: 1.05rem;
  }

  .header-detalle h1 i {
    width: 32px;
    height: 32px;
  }

  .btn-volver {
    padding: 8px 14px;
  }

  .contenido-detalle {
    padding: 0 12px;
  }

  .carousel-container {
    margin: 0 -12px;
    width: calc(100% + 24px);
  }

  .titulo-producto {
    font-size: 1.6rem;
  }

  .product-price-relacionado .amount {
    font-size: 1.5rem;
  }

  .product-price-relacionado .currency {
    font-size: 0.5rem;
  }

  .btn-agregar-carrito {
    padding: 13px 20px;
    font-size: 0.85rem;
  }

  .productos-relacionados-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .relacionados-title {
    font-size: 1.25rem;
  }

  .relacionados-container {
    margin: 0 -12px;
    padding: 0 12px;
  }

  .product-card-relacionado {
    width: 220px;
  }

  .product-image-relacionado {
    height: 180px;
  }

  .scroll-btn {
    width: 32px;
    height: 32px;
  }
}