/* ============================================================
   A STORE — WooCommerce Product Page CSS
   Archivo: astore-product-page.css
   Pegar en: Apariencia → Personalizar → CSS Adicional
   (Complementa astore-custom.css)
   Versión 1.0 · Julio 2026
   ============================================================ */

/* ── LAYOUT PRINCIPAL DEL PRODUCTO ──────────────────────── */
.woocommerce div.product {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 48px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

@media (max-width: 768px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px;
  }
}

/* ── GALERÍA DE IMÁGENES ─────────────────────────────────── */
.woocommerce div.product div.images {
  position: sticky;
  top: 100px;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
  border-radius: 16px;
  overflow: hidden;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image:hover img {
  transform: scale(1.03);
}

/* Thumbnails */
.woocommerce div.product div.images .flex-control-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.woocommerce div.product div.images .flex-control-thumbs li.flex-active,
.woocommerce div.product div.images .flex-control-thumbs li:hover {
  border-color: var(--astore-cyan);
}

/* ── INFO DEL PRODUCTO (columna derecha) ─────────────────── */
.woocommerce div.product div.summary {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid #e8e8e4;
  position: sticky;
  top: 100px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

@media (max-width: 768px) {
  .woocommerce div.product div.summary {
    position: static;
    padding: 20px;
    border-radius: 16px;
  }
}

/* Badge BESTSELLER */
.astore-product-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #000;
  background: var(--astore-amber);
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* Título del producto */
.woocommerce div.product .product_title {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: clamp(20px, 2.5vw, 28px) !important;
  font-weight: 700 !important;
  color: #111 !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px !important;
}

/* Rating de estrellas */
.woocommerce div.product .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.woocommerce div.product .star-rating {
  color: var(--astore-amber) !important;
  font-size: 14px;
}

.woocommerce div.product .woocommerce-review-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--astore-muted);
  text-decoration: none;
}

/* ── PRECIO ──────────────────────────────────────────────── */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px !important;
}

/* Precio de venta (grande) */
.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
  font-family: 'DM Mono', monospace !important;
  font-size: 36px !important;
  font-weight: 500;
  color: var(--astore-amber) !important;
  text-decoration: none !important;
}

/* Precio original tachado */
.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  font-family: 'DM Mono', monospace !important;
  font-size: 16px !important;
  color: var(--astore-muted) !important;
  opacity: 0.7;
}

/* Badge de ahorro */
.astore-savings-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 140, 0, 0.12);
  color: var(--astore-amber);
  border: 1px solid rgba(255, 140, 0, 0.3);
  padding: 4px 10px;
  border-radius: 100px;
  margin-top: 4px;
  display: block;
}

/* ── GARANTÍAS ───────────────────────────────────────────── */
.astore-garantias-product {
  background: #f0fdf4;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.astore-garantia-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #166534;
}

.astore-garantia-row + .astore-garantia-row {
  border-top: 1px solid rgba(34, 197, 94, 0.15);
}

/* ── CANTIDAD ────────────────────────────────────────────── */
.woocommerce div.product form.cart .quantity {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 16px;
}

.woocommerce div.product form.cart .quantity .qty {
  width: 60px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  border: none;
  padding: 10px;
}

/* ── BOTONES DE COMPRA ───────────────────────────────────── */
.woocommerce div.product form.cart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Botón WhatsApp — PRIMARIO */
.astore-btn-whatsapp-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--astore-success);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.astore-btn-whatsapp-product:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(34, 197, 94, 0.5);
}

.astore-btn-whatsapp-product:active {
  transform: scale(0.98);
}

/* Botón carrito — SECUNDARIO */
.woocommerce div.product form.cart .single_add_to_cart_button {
  background: transparent !important;
  color: var(--astore-cyan) !important;
  border: 1.5px solid var(--astore-cyan) !important;
  font-size: 15px !important;
  padding: 14px 24px !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  transition: background 0.2s, color 0.2s !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: var(--astore-cyan-dim) !important;
}

/* Seguridad */
.astore-secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--astore-muted);
  margin-top: 4px;
}

/* ── TABS DE DESCRIPCIÓN ─────────────────────────────────── */
.woocommerce div.product .woocommerce-tabs {
  margin-top: 64px;
  grid-column: 1 / -1;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8e4;
  padding: 0;
  margin-bottom: 32px;
  list-style: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--astore-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  color: var(--astore-cyan);
  border-bottom-color: var(--astore-cyan);
}

/* ── RESEÑAS ─────────────────────────────────────────────── */
#reviews .comment {
  background: var(--astore-off-white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e8e8e4;
}

#reviews .star-rating {
  color: var(--astore-amber);
  margin-bottom: 8px;
}

#reviews .woocommerce-review__author {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--astore-muted);
}

/* ── MOBILE: STICKY BOTTOM BAR EN PRODUCTO ───────────────── */
.astore-sticky-buy {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(16px);
  padding: 12px 16px;
  z-index: 9980;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .astore-sticky-buy { display: flex; }
}

.astore-sticky-buy-price {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  color: var(--astore-amber);
  flex: 1;
}

.astore-sticky-buy-btn {
  background: var(--astore-success);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
