/* ===== Body y fuente ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ===== Contenedor del producto ===== */
.product-detail {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 50px auto;
  gap: 40px;
}

/* ===== Galería de imágenes ===== */
.product-gallery {
  flex: 1 1 500px;
}

/* Imagen principal fija */
.main-image img {
  width: 800px;
  height: 800px;
  object-fit: cover;
  border-radius: 8px;
}

/* Miniaturas uniformes */
.sub-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}
.sub-img.active-thumb { border: 2px solid black; }
.sub-img:hover { transform: scale(1.1); }

/* ===== Información del producto ===== */
.product-info {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.product-title { font-size: 28px; font-weight: bold; }
.product-price { font-size: 24px; color: #3f3e3e; font-weight: bold; }

/* ===== Opciones ===== */
.product-options { display: flex; flex-direction: column; gap: 15px; }
.product-options label { font-weight: bold; margin-bottom: 5px; }
.product-options input {
  padding: 8px; border-radius: 5px;
  border: 1px solid #ccc; max-width: 120px;
}

/* ===== Botones ===== */
.product-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.product-buttons .btn {
  border-radius: 1px; font-size: 18px; font-weight: bold;
  cursor: pointer; transition: background 0.3s; font-family: Arial, sans-serif;
}
.product-buttons .btn-buy {
  background-color: black; color: white; padding: 10px;
  width: 500px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; transition: all 0.3s ease;
}
.product-buttons .btn-buy:hover {
  background-color: white; color: black;
  border: 1px solid black; transform: scale(1.02);
}
.product-buttons .btn-cart {
  background-color: white; color: black; padding: 10px;
  width: 500px; display: flex; align-items: center;
  justify-content: center; font-size: 18px;
  transition: all 0.3s ease; border: 1px solid black;
}
.product-buttons .btn-cart:hover {
  background-color: black; color: white;
  border: 1px solid black; transform: scale(1.02);
}

/* ===== Color / Talla ===== */
.color-box.active-color { border: 2px solid #000 !important; }
.talla-box {
  width: 35px; height: 35px; border: 1px solid #000;
  display: flex; justify-content: center; align-items: center; cursor: pointer;
}
.talla-box.disabled { text-decoration: line-through; opacity: 0.5; cursor: not-allowed; }
.talla-box.selected { background-color: #000; color: #fff; }

/* ── Productos similares: cards pegadas a la imagen ── */
.similar-products {
  padding-bottom: 50px;
}

.similar-products .card {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 8px;
}

.similar-products .card > div:first-child {
  width: 100%;
  height: 330px !important;
  overflow: hidden;
}

.similar-products .card > div:first-child img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.similar-products .card-title {
  margin-top: 20px !important;
}
.similar-products .card-title,
.similar-products .card-text {
  padding: 0 8px;
}

.similar-products a {
    text-decoration: none !important;
    color: inherit !important;
  }
  .similar-products .swiper {
    padding: 0 50px !important;
  }

/* ❌ Ocultar por defecto (desktop) */
.similar-products .swiper-button-next,
.similar-products .swiper-button-prev,
.similar-products .custom-arrow {
  display: none !important;
}

.main-image {
  position: relative;
}

.main-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(0,0,0,0.50);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.main-arrow.left {
  left: 10px;
}

.main-arrow.right {
  right: 10px;
}

.main-arrow:active {
  transform: translateY(-50%) scale(0.9);
  background: #000;
  color: #fff;
}
/* =====================================================
   RESPONSIVE MÓVIL — hasta 767px
===================================================== */
@media (max-width: 767px) {
.product-gallery .sub-images.d-flex.flex-column {
    flex-direction: row !important;
  }
  /* ── Galería: apila en columna ── */
  .product-gallery {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    flex: none !important;
    padding: 0 !important;
  }

  /* ── Imagen principal: centrada, fondo gris, tamaño completo ── */
  .main-image {
    order: 1;
    width: 100%;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -80px;
    overflow: hidden;
  }
  .main-image img {
    width: 100% !important;
    height: 400px !important;
    object-fit: contain !important;
    border-radius: 10px;
  }

  /* ── Contenedor miniaturas: fila con carrusel ── */
/* DESPUÉS */
.sub-images {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;  /* ← espacio uniforme entre miniaturas */
  flex: 0 0 auto !important;  /* ← no estira el contenedor */
}

.sub-img {
  width: 80px !important;
  height: 80px !important;
  flex-shrink: 0 !important;
  object-fit: cover !important;
  border-radius: 5px !important;
  border: 2px solid transparent !important;
  cursor: pointer;
}

.sub-img.active-thumb {
  border: 2px solid black !important;
}

  /* ── Navegación carrusel de miniaturas ── */
  #thumb-nav {
    order: 3;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
  }

  /* ── Wrapper flechas + miniaturas ── */
.thumb-wrapper {
  order: 2;
  display: flex !important;
  align-items: center;
  justify-content: center !important;  /* ← cambia space-between por center */
  width: 100% !important;
  margin-top: 10px;
  padding: 0 8px;
  box-sizing: border-box;
  overflow: visible !important;
  gap: 8px;  /* ← agrega gap entre flechas y miniaturas */
}

#thumb-prev {
  justify-self: start;
}

#thumb-next {
  justify-self: end;
  margin-left: -17px;
}

/* Flechas */
#thumb-prev, #thumb-next {
  background: transparent;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s;
}
.thumb-wrapper .sub-img.active-thumb {
  border: 2px solid black !important;
}

#thumb-prev:hover, #thumb-next:hover { transform: scale(1.15); }
#thumb-prev:disabled, #thumb-next:disabled { opacity: 0.3; cursor: default; }

/* Puntos indicadores */
#thumb-dots {
  order: 3;
  display: flex !important;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  padding: 0;
}
#thumb-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  display: inline-block;
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
#thumb-dots span.active-dot {
  background: #000;
  transform: scale(1.3);
}
  /* ── Info producto ── */
  .product-info {
    flex: none !important;
    width: 100% !important;
  }
  .product-title { font-size: 25px !important; }
  .product-price { font-size: 20px !important; }

  /* ── Botones compactos ── */
  .product-buttons .btn-buy,
  .product-buttons .btn-cart {
    width: 100% !important;
    font-size: 15px !important;
    padding: 10px !important;
  }
  .product-buttons .btn-buy {
    color: #fff !important;
    background-color: #000 !important;
  }
  .product-buttons .btn-cart {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #000 !important;
    margin-bottom: -70px;
  }

  /*Productos similares*/
 
/* 🔥 Quitar espacio del Swiper */

  .similar-products .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
  }

  .similar-products .card {
    width: 100%;
    max-width: 270px !important;
    margin: 0 auto;
  }

  .similar-products .card > div:first-child {
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .similar-products .card > div:first-child img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
  }

  .similar-products .card-title,
  .similar-products .card-text {
    text-align: center;
  }

  .main-arrow {
    display: none !important;
  }
}

/* 🔥 Texto pegado a la imagen */
.similar-products .card-body {
  padding: 6px 8px !important;
  margin: 0 !important;
}

/* 🔥 Eliminar cualquier gap del swiper */
.similar-products .swiper {
  padding: 1px !important;
}

  .similar-products .swiper-button-next.custom-arrow {
    right: 0px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  .similar-products .swiper-button-prev.custom-arrow {
    left: 0px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .similar-products .swiper-button-disabled.custom-arrow {
    opacity: 0.5 !important;
    pointer-events: auto !important;
  }
/* ✅ Mostrar solo en mobile */
@media (max-width: 767px) {
  .similar-products .swiper-button-next,
  .similar-products .swiper-button-prev,
  .similar-products .custom-arrow {
    display: flex !important;
  }
}
