/* ========================================
   PÁGINA DE PRODUCTO INDIVIDUAL
   Archivo: product-page.css
   Compatible con single-product.php
======================================== */

/* Variables de color (matching con el diseño) */
:root {
  --product-bg: #FFF9F3;
  --product-primary: #E8B4D9;
  --product-secondary: #92A4D4;
  --product-text: #333333;
  --product-text-light: #666666;
  --product-border: #e6e6e6;
  --product-success: #7FB069;
  --product-white: #ffffff;
}

/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */
.product-page-wrapper {
  background: var(--product-bg);
  min-height: 100vh;
  padding: 40px 0;
}

.container-product {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}



/* ========================================
   BREADCRUMBS
======================================== */
.product-breadcrumbs {
  margin-bottom: 30px;
}

.woocommerce-breadcrumb {
  font-size: 14px;
  color: var(--product-text-light);
}

.woocommerce-breadcrumb a {
  color: var(--product-text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.woocommerce-breadcrumb a:hover {
  color: var(--product-primary);
}

/* ========================================
   LAYOUT PRINCIPAL (2 COLUMNAS)
======================================== */
.product-main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
  background: var(--product-white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* ========================================
   GALERÍA DE IMÁGENES (Izquierda)
======================================== */
.product-gallery-column {
  position: relative;
}

.woocommerce-product-gallery {
  position: relative;
}

.woocommerce-product-gallery__wrapper {
  margin: 0;
}

.woocommerce-product-gallery__image {
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Thumbnails */
.flex-control-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding: 0;
  list-style: none;
}

.flex-control-thumbs li {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.flex-control-thumbs li:hover,
.flex-control-thumbs li.flex-active {
  border-color: var(--product-primary);
}

.flex-control-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   INFORMACIÓN DEL PRODUCTO (Derecha)
======================================== */
.product-info-column {
  display: flex;
  flex-direction: column;
}

.product-summary-wrapper {
  flex: 1;
}

/* Título */
.product-title-custom {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  line-height: 1.2;
  color: var(--product-text);
  margin: 0 0 20px 0;
  font-weight: 500;
}

/* Stock status */
.product-stock-status {
  margin-bottom: 15px;
}

.in-stock-badge {
  display: inline-block;
  background: var(--product-success);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.out-stock-badge {
  display: inline-block;
  background: #e74c3c;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Precio */
.product-price-wrapper {
  margin-bottom: 20px;
}

.product-price-wrapper .price {
  font-size: 32px;
  font-weight: 600;
  color: var(--product-text);
}

.product-price-wrapper .price del {
  font-size: 24px;
  color: var(--product-text-light);
  margin-right: 10px;
}

.product-price-wrapper .price ins {
  text-decoration: none;
  color: var(--product-primary);
}

.low-stock-badge{
  display:inline-block;
  background:#f39c12;
  color:#fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
/*-------------------------------------------------*/
/* Ajustes para el Modal Quick View */
.quick-view-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100000;
    display: none; align-items: center; justify-content: center;
}

.quick-view-overlay {
    position: absolute; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}

.quick-view-content {
    position: relative;
    background: #fff;
    width: 90%; max-width: 850px;
    border-radius: 4px; overflow: hidden;
    z-index: 10;
}

.qv-container { display: grid; grid-template-columns: 1fr 1fr; }

.qv-image-side img { width: 100%; height: 100%; object-fit: cover; }

.qv-details-side { padding: 40px; }

.qv-product-title { font-size: 26px; font-weight: 700; margin-bottom: 5px; color: #000; }
.qv-sku { font-size: 12px; color: #999; margin-bottom: 25px; }

.qv-label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; }

.qv-size-selector {
    display: inline-block; padding: 8px 20px;
    border: 1.5px solid #000; font-weight: 600; margin-bottom: 20px;
}

.qv-price-display { font-size: 22px; font-weight: 600; margin-bottom: 20px; }

.qv-trust-badge { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; }

.qv-info-text { font-size: 12px; color: #666; margin-bottom: 20px; }
.qv-info-text a { text-decoration: underline; color: #000; }

.qv-actions { display: flex; flex-direction: column; gap: 10px; }

.qv-btn-cart {
    border: 1.5px solid #000; text-align: center; padding: 12px;
    font-weight: 700; text-decoration: none; color: #000;
}

.qv-btn-buy {
    background: #000; color: #fff; text-align: center; padding: 12px;
    font-weight: 700; text-decoration: none;
}

.quick-view-close {
    position: absolute; top: 15px; right: 15px;
    background: #000; color: #fff; border-radius: 50%;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 12; border: none;
}
/*-------------------------------------------------*/

/* Rating */
.product-rating-wrapper {
  margin-bottom: 20px;
}

.woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-rating {
  color: #ffc107;
}

/* Descripción corta */
.product-short-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--product-text-light);
  margin-bottom: 30px;
}

.product-short-description p {
  margin-bottom: 15px;
}

/* ========================================
   FORMULARIO AÑADIR AL CARRITO
======================================== */
.product-add-to-cart-wrapper {
  margin-bottom: 30px;
}

.cart {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

/* Selector de cantidad */
.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--product-border);
  border-radius: 6px;
  overflow: hidden;
}

.quantity input[type="number"] {
  width: 60px;
  height: 48px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  -moz-appearance: textfield;
}

.quantity input[type="number"]::-webkit-outer-spin-button,
.quantity input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Botón Añadir al carrito */
.single_add_to_cart_button {
  flex: 1;
  background: linear-gradient(135deg, var(--product-primary) 0%, var(--product-secondary) 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 180, 217, 0.4);
}

.single_add_to_cart_button:active {
  transform: translateY(0);
}

.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
}

/* ========================================
   META INFORMACIÓN (SKU, Categorías)
======================================== */
.product-meta-info {
  padding-top: 20px;
  border-top: 1px solid var(--product-border);
  font-size: 14px;
  color: var(--product-text-light);
}

.product-meta-info > div {
  margin-bottom: 8px;
}

.product-meta-info strong {
  color: var(--product-text);
  font-weight: 600;
}

.product-meta-info a {
  color: var(--product-primary);
  text-decoration: none;
}

.product-meta-info a:hover {
  text-decoration: underline;
}

/* ========================================
   TABS (Descripción, Info adicional, Reseñas)
======================================== */
.product-tabs-section {
  background: var(--product-white);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 60px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.woocommerce-tabs {
  margin: 0;
}

.woocommerce-tabs .tabs {
  display: flex;
  gap: 30px;
  border-bottom: 2px solid var(--product-border);
  margin-bottom: 30px;
  padding: 0;
  list-style: none;
}

.woocommerce-tabs .tabs li {
  position: relative;
}

.woocommerce-tabs .tabs li a {
  display: block;
  padding: 15px 0;
  color: var(--product-text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
}

.woocommerce-tabs .tabs li.active a,
.woocommerce-tabs .tabs li a:hover {
  color: var(--product-primary);
}

.woocommerce-tabs .tabs li.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--product-primary);
}

.woocommerce-tabs .panel {
  padding: 20px 0;
}

.woocommerce-tabs .panel h2 {
  display: none; /* Ocultar títulos redundantes */
}

/* ========================================
   PRODUCTOS RELACIONADOS
======================================== */
.related.products {
  background: var(--product-white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.related.products h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--product-text);
  margin-bottom: 30px;
  text-align: center;
}

.related.products ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.related.products .product {
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.related.products .product:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related.products .product img {
  width: 100%;
  height: auto;
  display: block;
}

.related.products .product .woocommerce-loop-product__title {
  font-size: 16px;
  margin: 15px;
  color: var(--product-text);
}

.related.products .product .price {
  font-size: 18px;
  font-weight: 600;
  color: var(--product-primary);
  margin: 0 15px 15px;
}

/* ========================================
   STICKY CART MÓVIL
======================================== */
.sticky-add-to-cart-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none;
}

.sticky-add-to-cart-mobile.show {
  transform: translateY(0);
}

.sticky-cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.sticky-cart-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.sticky-product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--product-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--product-primary);
}

.sticky-cart-button {
  background: var(--product-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}

.sticky-cart-button:hover {
  background: var(--product-secondary);
}

.archive-products-wrapper{
  background: #FFF9F3;
  padding: 40px 0;
  min-height: 80vh;
}

.container-archive-products{
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.archive-header{
  text-align: center;
  margin-bottom: 25px;
}

.page-title-archive{
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  margin: 0 0 10px;
}

.category-description{
  max-width: 900px;
  margin: 0 auto;
  color: #666;
}

.archive-controls{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 20px;
  margin: 25px 0;
  flex-wrap: wrap;
}

.products-grid-archive{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 25px;
}

.product-card-archive{
  background: #fff;
  border-radius: 14px;
  overflow:hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card-archive:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
}

.product-image-wrapper-archive{
  position: relative;
  background: #f7f7f7;
}

.product-image-wrapper-archive img{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display:block;
}

.sale-badge-archive,
.out-stock-badge-archive{
  position:absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color:#fff;
}

.sale-badge-archive{ background: #E8B4D9; }
.out-stock-badge-archive{ background: #e74c3c; left:auto; right:12px; }

.quick-view-btn{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(6px);
  cursor:pointer;
}

.product-info-archive{
  padding: 14px 14px 18px;
}

.product-title-archive{
  font-size: 16px;
  margin: 0 0 8px;
  font-family: 'Inter', sans-serif;
}

.product-price-archive{
  font-weight: 700;
  color:#333;
  margin: 10px 0 12px;
}

.product-actions-archive .button{
  width: 100%;
  border-radius: 10px !important;
  border: 0 !important;
  padding: 12px 14px !important;
  background: #E8B4D9 !important;
  color:#fff !important;
  font-weight: 700 !important;
  text-align:center;
}

.product-actions-archive .button:hover{
  opacity: .9;
}


/* ========================================
   RESPONSIVE
======================================== */

/* Tablets */
@media (max-width: 1024px) {
  .product-main-content {
    gap: 40px;
    padding: 30px;
  }

  .product-title-custom {
    font-size: 28px;
  }

  .product-price-wrapper .price {
    font-size: 26px;
  }
}

/* Móviles */
@media (max-width: 768px) {



  .product-page-wrapper {
    padding: 20px 0 80px;
  }

  .archive-controls{ justify-content: center; }
  .page-title-archive{ font-size: 28px; }
  .product-image-wrapper-archive img{ height: 210px; }

  .container-product {
    padding: 0 15px;
  }

  /* Layout de 1 columna en móvil */
  .product-main-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
  }

  .product-title-custom {
    font-size: 24px;
  }

  .product-price-wrapper .price {
    font-size: 24px;
  }

  /* Thumbnails más pequeños */
  .flex-control-thumbs li {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
  }

  /* Cart responsive */
  .cart {
    flex-direction: column;
    align-items: stretch;
  }

  .quantity {
    justify-content: center;
  }

  .single_add_to_cart_button {
    width: 100%;
  }

  /* Tabs responsive */
  .woocommerce-tabs .tabs {
    gap: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .woocommerce-tabs .tabs li a {
    font-size: 14px;
    white-space: nowrap;
  }

  .product-tabs-section,
  .related.products {
    padding: 25px 20px;
  }

  /* Productos relacionados */
  .related.products ul.products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  /* Mostrar sticky cart */
  .sticky-add-to-cart-mobile {
    display: block;
  }
}

/* Extra small móvil */
@media (max-width: 480px) {
  .product-title-custom {
    font-size: 20px;
  }

  .product-price-wrapper .price {
    font-size: 22px;
  }

  .single_add_to_cart_button {
    font-size: 14px;
    padding: 14px 30px;
  }

  .related.products h2 {
    font-size: 22px;
  }
}
