/* ============================================================
   Algodón Todo Evento - Máquina Automática Portátil A17
   Paleta: Celestes + Azules + Naranja/Dorado
   ============================================================ */

:root {
  --celeste-claro: #e0f7fa;
  --celeste: #4dd0e1;
  --celeste-oscuro: #00acc1;

  --azul-claro: #b3e5fc;
  --azul: #039be5;
  --azul-oscuro: #01579b;

  --naranja-claro: #ffe0b2;
  --naranja: #ff9800;
  --naranja-oscuro: #ef6c00;
  --dorado: #fbc02d;

  --verde-claro: #a5d6a7;
  --verde: #66bb6a;
  --verde-oscuro: #2e7d32;

  --blanco: #ffffff;
  --gris-claro: #f5f5f5;
  --gris: #bdbdbd;
  --gris-oscuro: #424242;
  --negro: #212121;

  --sombra-suave: 0 2px 8px rgba(0, 0, 0, 0.1);
  --sombra-media: 0 4px 16px rgba(0, 0, 0, 0.15);
  --sombra-fuerte: 0 8px 24px rgba(0, 0, 0, 0.2);

  --transicion-rapida: 0.3s ease;
  --transicion-media: 0.5s ease;
}

/* Reset básico */

* {
  box-sizing: border-box;
}

/* Fondo global */

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top left, #fffde7 0%, var(--celeste-claro) 40%, var(--azul-claro) 100%);
  color: var(--gris-oscuro);
  line-height: 1.6;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */

.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  overflow-x: hidden;
  position: relative;
}

.main-container::before,
.main-container::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.26;
  z-index: -1;
}

.main-container::before {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, var(--naranja-claro), var(--naranja));
  top: -30px;
  right: -40px;
}

.main-container::after {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--celeste), var(--azul));
  bottom: -50px;
  left: -40px;
}

/* Card principal */

.product-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  background: var(--blanco);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--sombra-fuerte);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
}

/* Franja diagonal dorada ligera */

.product-container::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -45%;
  width: 70%;
  height: 170%;
  background: linear-gradient(
    135deg,
    rgba(255, 224, 130, 0.35),
    rgba(255, 171, 64, 0.25),
    rgba(3, 155, 229, 0.2)
  );
  transform: rotate(-18deg);
  pointer-events: none;
}

/* Animaciones */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   GALERÍA
   ============================================================ */

.product-gallery {
  position: relative;
  z-index: 1;
}

.main-image {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--sombra-media);
  background: radial-gradient(circle at top, #fff8e1 0%, var(--azul-claro) 45%, var(--celeste-claro) 100%);
  margin-bottom: 1.5rem;
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform var(--transicion-media), box-shadow var(--transicion-rapida);
}

/* Etiqueta flotante */

.main-image::after {
  content: "Modelo A17 Portátil";
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 0.45rem 1.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--blanco);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transicion-media);
}

.main-image:hover img {
  transform: scale(1.08);
}

.main-image:hover {
  box-shadow: 0 14px 38px rgba(239, 108, 0, 0.55);
  transform: translateY(-4px);
}

/* Zoom fullscreen (coincide con z.js de las otras páginas) */

.main-image.zoomed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  border-radius: 0;
  cursor: zoom-out;
  background: rgba(0, 0, 0, 0.95);
  box-shadow: none;
}

.main-image.zoomed::after {
  display: none;
}

.main-image.zoomed img {
  object-fit: contain;
  transform: scale(1);
}

/* Thumbnails */

.thumbnail-gallery {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transicion-rapida);
  box-shadow: var(--sombra-suave);
  background: var(--gris-claro);
}

.thumbnail:hover {
  border-color: var(--celeste);
  transform: translateY(-5px);
  box-shadow: var(--sombra-media);
}

.thumbnail.active {
  border-color: var(--naranja-oscuro);
  box-shadow: 0 0 22px rgba(255, 167, 38, 0.6);
}

/* ============================================================
   INFO DEL PRODUCTO
   ============================================================ */

.product-details {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  z-index: 1;
}

.product-details h1 {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--azul-oscuro), var(--naranja-oscuro));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInRight 0.6s ease;
}

.brand,
.sku {
  font-size: 0.98rem;
  color: var(--gris-oscuro);
  font-weight: 500;
}

.brand span,
.sku span {
  font-weight: 600;
  color: var(--azul-oscuro);
}

/* Disponibilidad */

.availability {
  display: inline-block;
  padding: 0.5rem 1.6rem;
  color: var(--blanco);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  width: fit-content;
  background: linear-gradient(135deg, var(--verde), var(--verde-oscuro));
  box-shadow: 0 4px 13px rgba(46, 125, 50, 0.5);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 4px 13px rgba(46, 125, 50, 0.5);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 7px 24px rgba(46, 125, 50, 0.85);
  }
}

/* ============================================================
   ESPECIFICACIONES
   ============================================================ */

.specifications {
  background: linear-gradient(135deg, var(--blanco) 0%, var(--celeste-claro) 60%, #fff8e1 100%);
  border-radius: 18px;
  padding: 1.7rem 1.8rem;
  box-shadow: var(--sombra-media);
  border: 2px solid rgba(255, 167, 38, 0.4);
  position: relative;
  overflow: hidden;
}

.specifications::before {
  content: "🔧";
  position: absolute;
  font-size: 90px;
  opacity: 0.15;
  right: -2px;
  top: -18px;
}

.specifications h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--azul-oscuro);
  position: relative;
  padding-bottom: 0.4rem;
}

.specifications h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--naranja-oscuro), var(--azul));
}

.specifications ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.specifications > ul > li {
  padding: 0.45rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.98rem;
}

.specifications > ul > li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.45rem;
  background: linear-gradient(135deg, var(--naranja), var(--celeste));
  flex-shrink: 0;
}

.specifications strong {
  color: var(--negro);
  font-weight: 600;
}

/* ============================================================
   PRECIO
   ============================================================ */

.pricing {
  background: linear-gradient(135deg, var(--blanco) 0%, #fff8e1 100%);
  padding: 2.1rem;
  border-radius: 20px;
  box-shadow: var(--sombra-media);
  border: 3px solid var(--naranja-oscuro);
  position: relative;
  overflow: hidden;
  margin-top: 0.7rem;
}

.pricing::before,
.pricing::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.35), transparent 60%);
  opacity: 0.6;
}

.pricing::before {
  top: -60px;
  right: -40px;
}

.pricing::after {
  bottom: -70px;
  left: -50px;
}

.bulk-pricing {
  font-size: 1.2rem;
  color: var(--azul-oscuro);
  font-weight: 700;
  margin-bottom: 1.1rem;
  padding: 1.3rem;
  background: var(--blanco);
  border-radius: 16px;
  border-left: 6px solid var(--naranja-oscuro);
  box-shadow: var(--sombra-suave);
  transition: all var(--transicion-rapida);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  line-height: 1.4;
}

.bulk-pricing:hover {
  transform: translateX(8px);
  box-shadow: var(--sombra-media);
  border-left-color: var(--azul);
}

.bulk-pricing strong {
  color: var(--naranja-oscuro);
  font-size: 1.26rem;
  flex: 1;
  min-width: 200px;
}

.bulk-pricing .price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--blanco);
  background: linear-gradient(135deg, var(--naranja), var(--naranja-oscuro));
  padding: 0.55rem 1.7rem;
  border-radius: 15px;
  box-shadow: 0 4px 18px rgba(239, 108, 0, 0.55);
  animation: priceGlow 2.1s infinite;
  white-space: nowrap;
}

@keyframes priceGlow {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(239, 108, 0, 0.45);
  }
  50% {
    box-shadow: 0 8px 28px rgba(239, 108, 0, 0.85);
  }
}

.description {
  font-size: 1.02rem;
  color: var(--gris-oscuro);
  padding: 1rem 1.3rem 1rem 3.1rem;
  background: var(--blanco);
  border-radius: 12px;
  margin-top: 0.4rem;
  border: 2px dashed var(--naranja);
  line-height: 1.8;
  position: relative;
}

.description::before {
  content: "ⓘ";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--naranja-oscuro);
  background: #fff3e0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact {
  font-size: 0.98rem;
  color: var(--azul-oscuro);
  padding: 1rem 1.3rem;
  background: linear-gradient(135deg, var(--azul-claro), var(--celeste-claro));
  border-radius: 12px;
  margin-top: 1rem;
  font-weight: 600;
  border: 2px solid var(--azul);
  box-shadow: var(--sombra-suave);
  position: relative;
}

.contact::before {
  content: "📞";
  margin-right: 8px;
}

/* ============================================================
   CTA / COMPRA
   ============================================================ */

.product-details1 {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--blanco) 0%, var(--celeste-claro) 100%);
  border-radius: 16px;
  box-shadow: var(--sombra-media);
  text-align: center;
}

.info-text {
  font-size: 1.02rem;
  color: var(--gris-oscuro);
  margin-bottom: 1.4rem;
  line-height: 1.8;
}

.product-details1 h6 {
  font-size: 1.25rem;
  color: var(--azul-oscuro);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.product-details1 li {
  list-style: none;
}

/* Botón CTA */

.cta-button {
  display: inline-block;
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--naranja), var(--naranja-oscuro));
  color: var(--blanco);
  text-decoration: none;
  border-radius: 999px;
  font-size: 1.08rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 20px rgba(239, 108, 0, 0.7);
  transition: all var(--transicion-rapida);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
  width: 260px;
  height: 260px;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(230, 81, 0, 0.8);
  background: linear-gradient(135deg, var(--naranja-oscuro), #e65100);
}

.cta-button:active {
  transform: translateY(-1px);
}

/* ============================================================
   PRODUCTOS RECOMENDADOS
   ============================================================ */

.recommended-products {
  background: var(--blanco);
  padding: 2rem 1.5rem;
  border-radius: 22px;
  box-shadow: var(--sombra-fuerte);
  margin: 0 auto 3rem;
  max-width: 1400px;
  overflow: hidden;
}

.recommended-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.recommended-header h2 {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--azul-oscuro), var(--naranja-oscuro));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
  min-width: 200px;
}

.carousel-controls {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

.carousel-prev,
.carousel-next {
  width: 50px;
  height: 50px;
  border: none;
  background: linear-gradient(135deg, var(--celeste), var(--azul));
  color: var(--blanco);
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transicion-rapida);
  box-shadow: var(--sombra-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  position: relative;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: linear-gradient(135deg, var(--azul), var(--naranja-oscuro));
  transform: scale(1.15) translateY(-1px);
  box-shadow: var(--sombra-media);
}

.carousel-prev:active,
.carousel-next:active {
  transform: scale(0.95);
}

.recommended-grid {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease;
  will-change: transform;
}

/* Tarjetas */

.recommended-item {
  flex: 0 0 calc(25% - 1.125rem);
  min-width: 250px;
  max-width: 300px;
}

.recommended-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.recommended-item > a {
  background: linear-gradient(135deg, var(--blanco) 0%, var(--celeste-claro) 100%);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: var(--sombra-suave);
  transition: all var(--transicion-rapida);
  cursor: pointer;
  border: 2px solid transparent;
  height: 100%;
  display: block;
  position: relative;
  overflow: hidden;
}

.recommended-item > a::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.9),
    transparent
  );
  transform: skewX(-18deg);
  opacity: 0;
  transition: opacity 0.4s ease, left 0.4s ease;
}

.recommended-item:hover > a::after {
  opacity: 1;
  left: 130%;
}

.recommended-item:hover > a {
  transform: translateY(-10px);
  box-shadow: var(--sombra-fuerte);
  border-color: var(--celeste);
}

.product-image {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.product-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform var(--transicion-media);
}

.recommended-item:hover img {
  transform: scale(1.1);
}

.product-info h3 {
  font-size: 1.15rem;
  color: var(--azul-oscuro);
  margin-bottom: 0.35rem;
  font-weight: 600;
  text-align: center;
}

.product-info p {
  font-size: 0.95rem;
  color: var(--gris-oscuro);
  text-align: center;
}

/* Skeleton loading */

.loading {
  animation: shimmerLoading 2s infinite;
  background: linear-gradient(
    to right,
    var(--gris-claro) 0%,
    var(--celeste-claro) 20%,
    var(--gris-claro) 40%,
    var(--gris-claro) 100%
  );
  background-size: 1000px 100%;
}

@keyframes shimmerLoading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1400px) {
  .main-container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .product-container {
    gap: 2.4rem;
    padding: 2.6rem;
  }
  .recommended-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 220px;
  }
}

@media (max-width: 992px) {
  .product-container {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }

  .main-image {
    height: 430px;
  }

  .product-details h1 {
    font-size: 2.1rem;
  }

  .pricing {
    padding: 2rem;
  }

  .bulk-pricing {
    font-size: 1.08rem;
    padding: 1.25rem;
  }

  .bulk-pricing strong {
    font-size: 1.2rem;
  }

  .bulk-pricing .price {
    font-size: 1.8rem;
  }

  .description {
    font-size: 0.98rem;
    padding: 0.95rem 1.3rem 0.95rem 3.1rem;
  }

  .recommended-item {
    flex: 0 0 calc(50% - 0.75rem);
    min-width: 200px;
  }

  .carousel-prev,
  .carousel-next {
    width: 48px;
    height: 48px;
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 0 1rem;
    margin: 1.5rem auto;
  }

  .product-container {
    padding: 1.6rem;
    border-radius: 18px;
    gap: 1.6rem;
  }

  .main-image {
    height: 380px;
  }

  .product-details h1 {
    font-size: 1.9rem;
  }

  .thumbnail {
    width: 88px;
    height: 88px;
  }

  .specifications {
    padding: 1.6rem 1.5rem;
  }

  .pricing {
    padding: 1.8rem;
  }

  .bulk-pricing {
    font-size: 1.02rem;
    padding: 1.15rem;
  }

  .bulk-pricing strong {
    font-size: 1.15rem;
  }

  .bulk-pricing .price {
    font-size: 1.7rem;
  }

  .description {
    font-size: 0.96rem;
  }

  .product-details1 {
    padding: 1.8rem;
  }

  .info-text {
    font-size: 1.01rem;
  }

  .product-details1 h6 {
    font-size: 1.18rem;
  }

  .cta-button {
    padding: 0.94rem 2.7rem;
    font-size: 1.05rem;
  }

  .recommended-products {
    padding: 1.8rem 1.2rem;
  }

  .recommended-header h2 {
    font-size: 1.8rem;
  }

  .recommended-item {
    flex: 0 0 calc(50% - 0.75rem);
    min-width: 170px;
  }

  .product-image,
  .product-image img {
    height: 170px;
  }

  .product-info h3 {
    font-size: 1.08rem;
  }
}

@media (max-width: 640px) {
  .main-container {
    margin: 1.3rem auto;
  }

  .product-container {
    padding: 1.4rem;
  }

  .main-image {
    height: 340px;
  }

  .product-details h1 {
    font-size: 1.75rem;
  }

  .thumbnail {
    width: 78px;
    height: 78px;
  }

  .pricing {
    padding: 1.55rem;
  }

  .bulk-pricing {
    font-size: 0.99rem;
    padding: 1.05rem;
  }

  .bulk-pricing .price {
    font-size: 1.6rem;
  }

  .description {
    font-size: 0.94rem;
    padding: 0.9rem 1.1rem 0.9rem 2.8rem;
  }

  .contact {
    font-size: 0.94rem;
  }

  .cta-button {
    padding: 0.9rem 2.5rem;
    font-size: 1.02rem;
  }
}

@media (max-width: 576px) {
  .product-container {
    padding: 1.2rem;
    border-radius: 16px;
    gap: 1.3rem;
  }

  .main-image {
    height: 300px;
  }

  .product-details h1 {
    font-size: 1.63rem;
  }

  .brand,
  .sku {
    font-size: 0.95rem;
  }

  .availability {
    font-size: 0.84rem;
    padding: 0.44rem 1.3rem;
  }

  .thumbnail {
    width: 70px;
    height: 70px;
  }

  .specifications {
    padding: 1.4rem 1.3rem;
  }

  .bulk-pricing {
    font-size: 0.96rem;
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .bulk-pricing strong {
    font-size: 1.08rem;
    min-width: 100%;
  }

  .bulk-pricing .price {
    font-size: 1.48rem;
  }

  .description {
    font-size: 0.92rem;
    padding: 0.9rem 1rem 0.9rem 2.7rem;
    line-height: 1.7;
  }

  .product-details1 {
    padding: 1.5rem 1.2rem;
  }

  .info-text {
    font-size: 0.98rem;
  }

  .product-details1 h6 {
    font-size: 1.12rem;
  }

  .cta-button {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 2.1rem;
    font-size: 1rem;
  }

  .recommended-products {
    padding: 1.5rem 1rem;
    border-radius: 18px;
  }

  .recommended-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .recommended-header h2 {
    font-size: 1.6rem;
    width: 100%;
  }

  .carousel-controls {
    width: 100%;
    justify-content: center;
  }

  .recommended-item {
    flex: 0 0 100%;
    min-width: auto;
    max-width: 100%;
  }

  .product-image,
  .product-image img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 0 0.8rem;
    margin: 1rem auto;
  }

  .product-container {
    padding: 1rem;
    border-radius: 14px;
  }

  .main-image {
    height: 270px;
  }

  .product-details h1 {
    font-size: 1.5rem;
  }

  .thumbnail {
    width: 64px;
    height: 64px;
  }

  .bulk-pricing {
    font-size: 0.92rem;
    padding: 0.9rem;
  }

  .bulk-pricing .price {
    font-size: 1.4rem;
  }

  .description {
    font-size: 0.9rem;
  }

  .product-details1 {
    padding: 1.3rem 1rem;
  }

  .cta-button {
    font-size: 0.97rem;
  }

  .recommended-products {
    padding: 1.3rem 0.9rem;
  }

  .carousel-prev,
  .carousel-next {
    width: 46px;
    height: 46px;
    font-size: 1.65rem;
  }

  .product-image,
  .product-image img {
    height: 185px;
  }
}

@media (max-width: 400px) {
  .product-details h1 {
    font-size: 1.38rem;
  }

  .main-image {
    height: 240px;
  }

  .thumbnail {
    width: 58px;
    height: 58px;
  }

  .bulk-pricing {
    font-size: 0.88rem;
  }

  .bulk-pricing .price {
    font-size: 1.32rem;
  }

  .description {
    font-size: 0.88rem;
  }

  .cta-button {
    padding: 0.7rem 1.6rem;
    font-size: 0.94rem;
  }

  .carousel-prev,
  .carousel-next {
    width: 44px;
    height: 44px;
    font-size: 1.55rem;
  }

  .product-image,
  .product-image img {
    height: 170px;
  }
}

@media (max-width: 360px) {
  .product-details h1 {
    font-size: 1.3rem;
  }

  .main-image {
    height: 220px;
  }

  .thumbnail {
    width: 54px;
    height: 54px;
  }

  .pricing {
    padding: 1.05rem;
  }

  .bulk-pricing {
    font-size: 0.85rem;
    padding: 0.8rem;
  }

  .bulk-pricing .price {
    font-size: 1.2rem;
  }

  .description {
    font-size: 0.86rem;
    padding: 0.8rem 0.8rem 0.8rem 2.3rem;
  }

  .product-details1 {
    padding: 1.2rem 0.9rem;
  }

  .cta-button {
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
  }

  .recommended-header h2 {
    font-size: 1.34rem;
  }

  .product-image,
  .product-image img {
    height: 160px;
  }
}

@media (max-width: 320px) {
  .product-details h1 {
    font-size: 1.2rem;
  }

  .main-image {
    height: 200px;
  }

  .thumbnail {
    width: 50px;
    height: 50px;
  }

  .bulk-pricing {
    font-size: 0.82rem;
    padding: 0.75rem;
  }

  .bulk-pricing .price {
    font-size: 1.15rem;
  }

  .cta-button {
    font-size: 0.86rem;
    padding: 0.6rem 1.2rem;
  }

  .carousel-prev,
  .carousel-next {
    width: 40px;
    height: 40px;
    font-size: 1.35rem;
  }
}
/* ============================
   PRODUCTOS RECOMENDADOS - CARRUSEL MEJORADO
   ============================ */

.recommended-products {
    background: var(--blanco);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: var(--sombra-fuerte);
    margin-bottom: 3rem;
    overflow: hidden;
}

.recommended-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.recommended-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--azul-oscuro), var(--celeste-oscuro));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    min-width: 200px;
}

.carousel-controls {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.carousel-prev,
.carousel-next {
    width: 50px;
    height: 50px;
    border: none;
    background: linear-gradient(135deg, var(--celeste), var(--azul));
    color: var(--blanco);
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transicion-rapida);
    box-shadow: var(--sombra-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: relative;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
    transform: scale(1.15);
    box-shadow: var(--sombra-media);
}

.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95);
}

/* Wrapper del carrusel (por si lo usas) */
.recommended-grid-wrapper {
    position: relative;
    width: 100%;
}

/* Contenedor de ítems: carrusel horizontal con snap */
.recommended-grid {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 0.75rem;
    will-change: transform;
    overflow-x: auto;              /* Scroll horizontal */
    overflow-y: visible;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; /* Snap por ítem */
}

/* Tarjetas recomendadas */
.recommended-item {
    flex: 0 0 calc(25% - 1.125rem);
    min-width: 250px;
    max-width: 300px;
    scroll-snap-align: center;     /* Se centra cada card al hacer scroll */
}

.recommended-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recommended-item > a {
    background: linear-gradient(135deg, var(--blanco) 0%, var(--celeste-claro) 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--sombra-suave);
    transition: all var(--transicion-rapida);
    cursor: pointer;
    border: 2px solid transparent;
    height: 100%;
    display: block;
}

.recommended-item:hover > a {
    transform: translateY(-10px);
    box-shadow: var(--sombra-fuerte);
    border-color: var(--celeste);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform var(--transicion-media);
}

.recommended-item:hover img {
    transform: scale(1.1);
}

.product-info h3 {
    font-size: 1.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: center;
}

/* Efecto shimmer opcional */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(
        to right,
        var(--gris-claro) 0%,
        var(--celeste-claro) 20%,
        var(--gris-claro) 40%,
        var(--gris-claro) 100%
    );
    background-size: 1000px 100%;
}

/* Scrollbar del carrusel */
.recommended-grid::-webkit-scrollbar {
    height: 8px;
}

.recommended-grid::-webkit-scrollbar-track {
    background: var(--gris-claro);
    border-radius: 10px;
}

.recommended-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--celeste), var(--azul));
    border-radius: 10px;
}

.recommended-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
}

/* ===== Ajustes RESPONSIVE específicos del carrusel ===== */

/* Tablets: 2–3 cards visibles */
@media (max-width: 992px) {
    .recommended-item {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: 220px;
    }
}

/* Teléfonos: una card centrada por “pantalla” */
@media (max-width: 576px) {
    .recommended-grid {
        gap: 1rem;
        padding: 0.5rem 0.25rem 1rem;
        scroll-snap-type: x mandatory;
    }

    .recommended-item {
        flex: 0 0 85%;        /* O 90% si quieres más margen */
        min-width: 85%;
        max-width: 420px;
        margin: 0 auto;
    }

    .product-image,
    .product-image img {
        height: 200px;
    }
}

/* Muy pequeños */
@media (max-width: 400px) {
    .recommended-item {
        flex: 0 0 90%;
        min-width: 90%;
    }

    .product-image,
    .product-image img {
        height: 180px;
    }
}
