@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  padding: 0;
}

.container-detallesproducto {
  padding: 10px 8%;
  background-color: #fbfbfb;
}

.breadcrumb {
  padding: 10px 90px;
  font-size: 14px;
}

.breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  justify-content: left;
}

.breadcrumb a {
  color: black;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  margin: 0 8px;
  color: #999;
}

.breadcrumb .current {
  color: #333;
  font-weight: 500;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 0 10px 10px;
}

/* GALERÍA */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0 auto;
  position: relative;

}

.gallery .main-img {
  width: 450px;
  height: 450px;
  border-radius: 10px;
  background: #e0e0e0;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.thumbs {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  justify-content: center;
  /* centra los thumbs */
}

.thumbs img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  background: #e0e0e0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.thumbs img:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

/* INFO */
.product-info {
  position: relative;
}

.top-actions {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  gap: 20px;
}

.top-actions img {
  width: 26px;
  opacity: 0.6;
}

.brand {
  font-size: 16px;
  color: #777;
}

h1 {
  margin: 5px 0px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0px;
}

.number-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffb400;
  color: #fff;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

.number-rating img {
  width: 14px;
  height: 14px;
}

.reviews {
  font-size: 13px;
  color: #666;
}

.rating-value {
  color: #fff;
  font-size: 12px;
}

.price {
  font-size: 40px;
  font-weight: 700;
  margin: 10px 0px;
}

.price .centavos {
  font-size: 18px;
  vertical-align: top;
}

.p-old-price-antes{
  font-size: 25px;
  color: #888;
}

.p-old-price {
  font-size: 25px;
  color: #888;
  text-decoration: line-through;
}

.descuento {
  top: 15px;      
  right: 15px;    
  background: #ff0000;
  color: #fff;
  font-size: 20px;
  padding: 4px 15px;
  border-radius: 20px;
  font-weight: 600;
  z-index: 2;     
}

.description {
  margin-bottom: 5px;
}

.desc-title {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 20px;
}

.desc-title img {
  width: 20px;
}

.description p {
  font-size: 16px;
  line-height: 1.6;
}

.more {
  font-size: 15px;
  color: #777;
  text-decoration: none;
}

.delivery {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0;
  font-size: 16px;
}

.delivery img {
  width: 25px;
}

/* COMPRA */
.buy {
  display: flex;
  align-items: center;
  gap: 20px;
}

.qty-input {
  width: 90px;
  height: 35px;
  border-radius: 22px;
  border: 1px solid #ccc;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

/* hover */
.qty-input:hover {
  border-color: #999;
}

.add-cart {
  background: #ff6a00;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
}

/* EXTRA */
.divider {
  height: 1px;
  background: #000000;
  margin: 30px 0;
}

.extra-info {
  display: flex;
  gap: 40px;
  font-size: 15px;
  color: #666;
}

.extra-info div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.extra-info img {
  width: 30px;
}

.tab-content .content,
.tab-content .reviews-wrapper {
  display: none;
}

.content.active,
.reviews-wrapper.active {
  display: block;
}

.product-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: nowrap;
  /* 👈 clave */
}

.tab {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #777;
  padding-bottom: 6px;
  font-weight: 500;
}

.tab.active {
  color: #ff6a00;
  border-bottom: 2px solid #ff6a00;
}

.tab-content {
  display: flex;
  justify-content: center;
}

.content {
  display: none;
  width: 100%;
}

.content.active {
  display: block;
}

.details-box {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  max-width: 1100px;
  margin: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #ddd;
}

.row:last-child {
  border-bottom: none;
}

.item {
  display: grid;
  grid-template-columns: 160px 1fr; /* columna fija para strong, resto flexible */
  gap: 20px;
  padding: 18px 0;
  align-items: start; /* alinea arriba del todo */
}

.item strong {
  font-weight: 600;
}

.item p {
  margin: 0;
  color: #444;
}

.reviews-wrapper {
  max-width: 1100px;
  margin: auto;
  text-align: center;
  justify-content: center;
}

.reviews-summary,
.details-box {
  margin-top: 25px;
}

.reviews-summary h2 {
  font-size: 60px;
  color: #ffb703;
  margin: 0;
}

.reviews-summary {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    max-width: 320px;
    margin: 25px auto 0;
}

.reviews-score {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.reviews-rating {
    position: relative;
    display: inline-block;
    font-size: 22px;
    line-height: 1;
    margin-bottom: 12px;
}

.reviews-stars-bg {
    color: #ddd;
}

.reviews-stars-fill {
    color: #f5a623;
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
}

.reviews-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

.comment-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}


.reviews-summary p {
  margin: 10px 0 20px;
  justify-content: center;
}

.comment-btn {
  background: #ff6a00;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  cursor: pointer;
}

.reviews-list {
  margin-top: 40px;
  text-align: left;
}

.review {
  display: flex;
  justify-content: space-between;
  padding: 30px 0;
  border-bottom: 1px solid #ddd;
}

.review-user {
  display: flex;
  gap: 20px;
  max-width: 65%;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.review-user span {
  display: block;
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

.review-extra {
  text-align: right;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffb703;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
}

.rating-badge img {
  width: 14px;
}

.review-images {
  display: flex;
  gap: 5px;
  margin-top: 15px;
}

.review-images img {
  width: 75px;
  height: 75px;
  border-radius: 10px;
  object-fit: cover;
}

.img-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.img-modal.active {
    display: flex;
}

.modal-img-wrapper {
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    touch-action: pan-y;
}

#modalImg {
    max-width: 100%;
    max-height: 100%;
    transition: transform .25s ease;
    cursor: zoom-in;
}

#modalImg.zoom {
    transform: scale(1.8);
    cursor: zoom-out;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    color: #fff;
    font-size: 14px;
    opacity: .8;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    background: rgba(0,0,0,.4);
    border: none;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 50%;
    z-index: 10000;
    transition: background .2s ease;
}

.nav-arrow:hover {
    background: rgba(0,0,0,.7);
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}


.load-more {
  margin: 40px auto 0;
  display: block;
  background: #ff6a00;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  cursor: pointer;
}

/* PRODUCTOS SIMILARES */
.ps-section {
  padding: 40px 0;
}

.ps-title {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
}

.ps-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 10px 20px;
}

.ps-carousel::-webkit-scrollbar {
  height: 8px;
}

.ps-carousel::-webkit-scrollbar-thumb {
  border-radius: 10px;
}

.ps-card {
  width: 275px;
  min-height: 400px;      /* 👈 altura mínima, no forzada */
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  text-decoration: none;
    color: inherit;
    display: block;
}

.ps-card:hover {
  transform: scale(1.04);
  cursor: pointer;
}

.ps-image {
  width: 225px; 
  height: 225px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: block;
}

.ps-category {
  font-size: 13px;
  color: #777;
  margin-bottom: 6px;
}

.ps-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;

  white-space: normal;      /* permite saltos de línea */
  word-wrap: break-word;    /* corta palabras largas */
  overflow-wrap: break-word;
  text-align: center;       /* opcional */
}
.ps-rating {
  position: relative;
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  margin-bottom: 2px;
}

.ps-stars-bg {
  color: #ddd;
}

.ps-stars-fill {
  color: #f5a623;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
}

.ps-price-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ps-price {
  font-size: 20px;
  font-weight: 700;
  color: #000;
}

.ps-old-price-antes{
  font-size: 13px;
  color: #888;
}

.ps-old-price {
  font-size: 13px;
  color: #888;
  text-decoration: line-through;
}

.ps-discount {
  position: absolute;
  top: 15px;      
  right: 15px;    
  background: #ff0000;
  color: #fff;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  z-index: 2;     
}

.ps-slider-wrapper {
  position: relative;
  max-width: 1100px;
  margin: auto;
}

.ps-carousel {
  display: flex;
  gap: 24px;
  overflow: hidden; /* 👈 se quita el scroll */
}

.ps-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 20px;
  z-index: 10;
}

.ps-arrow-left {
  left: -20px;
}

.ps-arrow-right {
  right: -20px;
}

.ps-arrow:hover {
  background: #ff6a00;
  color: #fff;
}

/* ===== MODAL COMENTARIOS ===== */
.review-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.review-modal.active {
  display: flex;
}

.review-modal-box {
  background: #fff;
  width: 95%;
  max-width: 420px;
  border-radius: 16px;
  padding: 25px;
  position: relative;
  text-align: center;
  animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.review-modal-box h3 {
  margin-bottom: 15px;
}

.close-review-modal {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

/* ESTRELLAS */
.stars-input {
  font-size: 30px;
  color: #ddd;
  cursor: pointer;
}

.stars-input span.active {
  color: #ffb703;
}

.stars-text {
  font-size: 14px;
  color: #666;
  margin: 6px 0 15px;
}

/* TEXTAREA */
.review-textarea {
  width: 100%;
  min-height: 100px;
  border-radius: 12px;
  border: 1px solid #ccc;
  padding: 12px;
  resize: none;
  font-size: 14px;
  margin-bottom: 15px;
}

/* UPLOAD */
.upload-section {
  text-align: center;
  margin-bottom: 15px;
}

.upload-btn {
  all: unset;               /* 🔥 elimina estilos nativos del button */
  display: inline-block;
  background: #f1f1f1;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}


.preview-images {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.preview-images img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

/* BOTÓN */
.submit-review {
  background: #ff6a00;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
}

.preview-wrapper {
  position: relative;
}

.preview-wrapper img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.remove-img {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #ff3b3b;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.upload-btn.disabled {
  background: #ddd;
  color: #777;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .product-tabs {
    gap: 15px;
    flex-wrap: wrap;
  }
  
  .row {
  border-bottom: 0px solid #ddd;
    }

  .tab {
    white-space: nowrap;
    /* evita que el texto rompa */
    font-size: 15px;
  }

  .comment-btn,
  .load-more {
    padding: 10px 20px;
    font-size: 13px;
  }
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 22px;
  overflow: hidden;
  height: 35px;
}

.qty-btn {
  width: 35px;
  height: 100%;
  border: none;
  background: #f5f5f5;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #e0e0e0;
}

.qty-input {
  width: 50px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  background-color: #fbfbfb;
}

/* Quita flechas del input number */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-input {
  -moz-appearance: textfield;
}


/* ===== TABLETS / FOLD / HUB ===== */
@media (max-width: 1200px) and (min-width: 769px) {

  .container-detallesproducto {
    padding: 10px 4%;
  }

  .breadcrumb {
    padding: 15px 0;
    text-align: center;
  }

  .product-layout {
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    padding: 0 10px 20px;
  }

  /* GALERÍA */
  .gallery .main-img {
    width: 100%;
    max-width: 380px;
    height: auto;
  }

  .thumbs img {
    width: 80px;
    height: 80px;
  }

  /* INFO */
  h1 {
    font-size: 26px;
  }

  .price {
    font-size: 34px;
  }

  .description p {
    font-size: 15px;
  }

  .extra-info {
    gap: 25px;
    flex-wrap: wrap;
  }

  /* REVIEWS */
  .review {
    gap: 20px;
  }

  .review-user {
    max-width: 100%;
  }

  .review-images img {
    width: 65px;
    height: 65px;
  }

}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 10px 0;
    font-size: 12px;
    text-align: center;
  }
  
  .row {
  border-bottom: 0px solid #ddd;
    }

  .product-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 5px 10px;
  }

  .product-info {
    margin-top: 15px;
  }

  .gallery .main-img {
    width: 100%;
    width: 260px;
    height: auto;
  }

  .thumbs img {
    width: 60px;
    height: 60px;
  }

  .top-actions {
    position: absolute;
    right: 5px;
    z-index: 5;
    border-radius: 20px;
    gap: 14px;
  }

  .top-actions img {
    width: 22px;
    opacity: 0.7;
  }

  .brand {
    font-size: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .price {
    font-size: 28px;
  }

  .price span {
    font-size: 14px;
  }

  .description p {
    font-size: 14px;
  }

  .delivery {
    font-size: 14px;
  }

  .qty-input {
    width: 70px;
    height: 32px;
  }

  .add-cart {
    padding: 10px 20px;
    font-size: 13px;
  }

  .extra-info {
    flex-direction: column;
    gap: 15px;
  }

  .details-box {
    padding: 18px;
  }

  .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0;
  }

  .item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 6px 0;
  }

  .item strong {
    min-width: unset;
    font-size: 14px;
    color: #222;
  }

  .item p {
    font-size: 14px;
    line-height: 1.5;
  }

  .review {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    grid-template-areas:
      "avatar name stars"
      "avatar date  date"
      "avatar imgs  imgs"
      "avatar text  text";
    gap: 6px 5px;
  }

  .avatar {
    grid-area: avatar;
    height: 50px;
    width: 50px;
  }

  .review-user>div>strong {
    grid-area: name;
    font-size: 15px;
  }

  .review-user span {
    grid-area: date;
    font-size: 13px;
  }

  .review-user p {
    grid-area: text;
  }

  .rating-badge {
    grid-area: stars;
    justify-self: start;
    margin-top: 2px;
  }

  .review-images {
    grid-area: imgs;
    margin-top: -5px;
    justify-self: start;
  }

  .review-user,
  .review-extra {
    display: contents;
  }

  .rating-badge {
    grid-area: stars;
    align-self: center;
    justify-self: start;
    padding: 2px 8px;
    height: auto;
    white-space: nowrap;
  }
  
  /* Sección */
  .ps-section {
    padding: 20px 0;
  }

  .ps-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  /* Carrusel */
  .ps-carousel {
    gap: 12px;
    padding: 8px 8px 14px;
    overflow-x: auto;     /* scroll natural en móvil */
  }

  /* Card */
  .ps-card {
    width: 200px;
    min-height: 300px;
    padding: 12px;
    border-radius: 14px;
  }

  /* Imagen */
  .ps-image {
    width: 160px;
    height: 160px;
    margin-bottom: 8px;
  }

  /* Texto */
  .ps-category {
    font-size: 11px;
  }

  .ps-name {
    font-size: 14px;
    line-height: 1.2;
  }

  .ps-rating {
    font-size: 14px;
  }

  .ps-price {
    font-size: 16px;
  }

  .ps-old-price,
  .ps-old-price-antes {
    font-size: 11px;
  }

  /* Badge descuento */
  .ps-discount {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 3px 8px;
  }

  /* Flechas fuera en móvil */
  .ps-arrow {
    display: none;
  }
}