/* Estilos para la página individual de producto */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap");

:root {
  --dl-primary: #27ae60;
  --dl-primary-dark: #219653;
  --dl-secondary: #ff6b35;
  --dl-text-dark: #2c3e50;
  --dl-text-light: #ffffff;
  --dl-bg-light: #f9f9f9;
  --dl-border-color: #e8f5e9;
  --dl-shadow: 0 5px 15px rgba(39, 174, 96, 0.1);
  --dl-hover-green: #1e8449;
}

.single-product-container {
  padding: 30px 0;
  background-color: #ffffff;
  min-height: 100vh;
  font-family: "Montserrat", sans-serif !important;
}

.single-product-breadcrumb {
  display: flex;
  justify-content: left;
  align-items: left;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--dl-shadow);
  font-size: 15px;
  font-weight: 500;
  color: var(--dl-text-dark);
}

.single-product-breadcrumb a {
  text-decoration: none;
  color: var(--dl-primary);
  transition: color 0.3s ease;
}

.single-product-breadcrumb a:hover {
  color: var(--dl-primary-dark);
}

.single-product-breadcrumb span {
  color: #888;
  font-size: 14px;
}

.single-product-breadcrumb .active {
  font-weight: 600;
  color: var(--dl-text-dark);
}

.single-product-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dl-text-dark);
  margin-bottom: 30px;
  text-align: center;
}

/* Contenido principal */
.single-product-content {
  margin-bottom: 40px;
}

/* Imágenes del producto */
.product-images {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--dl-shadow);
  margin-bottom: 30px;
  border: 1px solid var(--dl-border-color);
}

.main-product-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.1);
}

.main-product-image:hover {
  transform: scale(1.02);
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
  box-shadow: var(--dl-shadow);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--dl-primary);
  opacity: 1;
}

/* Información del producto */
.product-info-summary {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--dl-shadow);
  border: 1px solid var(--dl-border-color);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--dl-border-color);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.star-rating {
  color: #ffc107;
}

.review-count {
  font-size: 0.9rem;
  color: #6c757d;
}

.product-sku,
.product-availability {
  font-size: 0.9rem;
  color: #6c757d;
}

.stock {
  font-weight: 600;
}

.stock.in-stock {
  color: var(--dl-primary);
}

.stock.out-of-stock {
  color: #dc3545;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dl-primary);
  margin-bottom: 20px;
}

.product-price del {
  font-size: 1.2rem;
  color: #6c757d;
  margin-right: 10px;
}

.product-price ins {
  text-decoration: none;
}

.product-description {
  margin-bottom: 25px;
  line-height: 1.6;
  color: var(--dl-text-dark);
}

/* Formulario de añadir al carrito - MEJORADO */
.product-add-to-cart {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--dl-border-color);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--dl-border-color);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--dl-shadow);
}

.quantity-input {
  width: 60px;
  height: 48px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  background: var(--dl-bg-light);
}

.quantity-button {
  width: 40px;
  height: 48px;
  border: none;
  background: var(--dl-bg-light);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  color: var(--dl-primary);
}

.quantity-button:hover {
  background: var(--dl-border-color);
}

.quantity-button.minus {
  border-right: 1px solid var(--dl-border-color);
}

.quantity-button.plus {
  border-left: 1px solid var(--dl-border-color);
}

.single_add_to_cart_button {
  background-color: var(--dl-primary);
  color: var(--dl-text-light);
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.single_add_to_cart_button:hover {
  background-color: var(--dl-hover-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(39, 174, 96, 0.3);
}

.out-of-stock {
  color: #dc3545;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Meta detalles */
.product-meta-details {
  margin-bottom: 25px;
  font-size: 0.9rem;
  color: #6c757d;
}

.product-meta-details span {
  display: block;
  margin-bottom: 8px;
}

.product-meta-details a {
  color: var(--dl-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-meta-details a:hover {
  color: var(--dl-primary-dark);
  text-decoration: underline;
}

/* Compartir producto */
.product-share {
  padding-top: 15px;
  border-top: 1px solid var(--dl-border-color);
}

.product-share h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--dl-text-dark);
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-buttons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--dl-shadow);
}

.share-buttons a:hover {
  transform: translateY(-3px);
}

.share-facebook {
  background-color: #3b5998;
}
.share-twitter {
  background-color: #1da1f2;
}
.share-pinterest {
  background-color: #bd081c;
}
.share-linkedin {
  background-color: #0077b5;
}
.share-whatsapp {
  background-color: #25d366;
}

/* Tabs de información adicional */
.product-additional-info {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--dl-shadow);
  margin-bottom: 40px;
  border: 1px solid var(--dl-border-color);
}

.woocommerce-tabs ul.tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  border-bottom: 2px solid var(--dl-border-color);
}

.woocommerce-tabs ul.tabs li {
  margin-right: 5px;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 20px;
  background: var(--dl-bg-light);
  color: var(--dl-text-dark);
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
  background: var(--dl-primary);
  color: var(--dl-text-light);
}

.woocommerce-Tabs-panel {
  padding: 20px 0;
}

.woocommerce-Tabs-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--dl-text-dark);
}

/* Productos relacionados */
.related-products {
  margin-top: 30px;
}

.related-products h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--dl-text-dark);
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.related-products h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--dl-primary);
  border-radius: 2px;
}

/* Tarjeta de producto (para productos relacionados) */
.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--dl-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dl-border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sale-badge,
.outofstock-badge {
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sale-badge {
  background: var(--dl-secondary);
  color: white;
}

.outofstock-badge {
  background: #6c757d;
  color: white;
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-actions {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  transition: bottom 0.3s ease;
}

.product-card:hover .product-actions {
  bottom: 0;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--dl-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--dl-shadow);
  text-decoration: none;
}

.action-btn:hover {
  background: var(--dl-primary);
  color: white;
  transform: translateY(-3px);
}

.product-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dl-text-dark);
}

.product-title a {
  color: var(--dl-text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.product-title a:hover {
  color: var(--dl-primary);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dl-primary);
  margin-top: auto;
}

/* Lightbox para imágenes */
.product-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
  justify-content: center;
  align-items: center;
}

.product-lightbox.show {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  margin: auto;
  display: block;
  animation: zoomIn 0.3s;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10000;
}

.close-lightbox:hover {
  color: #bbb;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .single-product-title {
    font-size: 1.8rem;
  }

  .product-meta {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .single-product-container {
    padding: 15px 0;
  }

  .single-product-title {
    font-size: 1.6rem;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .woocommerce-tabs ul.tabs {
    flex-direction: column;
  }

  .woocommerce-tabs ul.tabs li {
    margin-right: 0;
    margin-bottom: 5px;
  }

  .woocommerce-tabs ul.tabs li a {
    border-radius: 8px;
  }

  .product-add-to-cart {
    flex-direction: column;
    align-items: stretch;
  }

  .quantity {
    align-self: center;
  }
}

@media (max-width: 576px) {
  .product-thumbnails {
    justify-content: center;
  }

  .single_add_to_cart_button {
    width: 100%;
  }

  .share-buttons {
    justify-content: center;
  }

  .close-lightbox {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 85%;
  }
}

/* Estilos para el lightbox mejorado */
.lightbox-content-container {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}

.lightbox-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.lightbox-thumbnail:hover,
.lightbox-thumbnail.active {
  border-color: var(--dl-primary);
  opacity: 1;
  transform: scale(1.1);
}

/* Asegurar que la imagen del lightbox se vea bien */
.lightbox-content {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive para el lightbox */
@media (max-width: 768px) {
  .lightbox-thumbnails {
    gap: 5px;
  }

  .lightbox-thumbnail {
    width: 40px;
    height: 40px;
  }

  .lightbox-content {
    max-height: 60vh;
  }
}

/* Estilos para las pestañas sin scroll */
.woocommerce-Tabs-panel {
  display: none;
  padding: 20px 0;
  animation: fadeIn 0.3s ease;
}

.woocommerce-Tabs-panel:first-of-type {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
