/* ==========================================================================
   1. TARJETAS DE PRODUCTOS EN HILERA (FLEX/GRID ADAPTATIVO)
   ========================================================================== */
.products-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    justify-content: center;
}

.card-gold {
    background-color: var(--card-bg);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-gold:hover {
    transform: translateY(-5px);
    border-color: var(--gold-primary);
}

.img-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 10px 0 5px 0;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin: 0;
}

/* ==========================================
   ACORDEÓN DE PREGUNTAS FRECUENTES (FAQ - CON JS)
   ========================================== */
.faq-accordion {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: #111111;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--gold-primary, #d4af37);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--gold-light, #d4af37);
}

.faq-icon {
    font-size: 1.4rem;
    color: var(--gold-primary, #d4af37);
    transition: transform 0.3s ease;
    line-height: 1;
}

/* Respuesta oculta por defecto */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.3s ease;
    background-color: #0a0a0a;
    padding: 0 20px;
}

/* Texto más claro y legible */
.faq-answer p {
    color: #e0e0e0 !important; /* Blanco suave con alto contraste */
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Estado Activo cuando se abre por JS */
.faq-item.active .faq-answer {
    overflow: visible !important; /* Permite mostrar el texto completo sin recortes */
    padding: 1px 20px 20px 20px;
}

.faq-item.active .faq-answer p {
    padding-bottom: 5px; /* Margen de seguridad para que la última línea no toque el borde */
}

.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Convierte el + en una X */
}

/* logos de redes sociales */

/* Centrado del contenedor de redes */
.social-icons-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px auto;
    width: 100%;
}

/* Centrado perfecto dentro del botón circular */
.social-icon-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 55px;
    background-color: #111111;
    border: 1px solid #d4af37;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Asegurar que el SVG interior no tenga bordes o desalineaciones */
.social-icon-btn svg {
    display: block;
    margin: auto;
}

/* Efecto Hover */
.social-icon-btn:hover {
    transform: translateY(-4px);
    border-color: #f3e5ab;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

/* ==========================================
   comentarios de la comunidad
   ========================================== */

/* --- WIDGET DE CALIFICACIONES PARA SOPORTE.PHP --- */
.reviews-summary-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    color: #333;
}

.rating-overview {
    text-align: center;
}

.avatars-group {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.avatars-group img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -10px;
    object-fit: cover;
}

.avatars-group img:first-child {
    margin-left: 0;
}

.overview-stars {
    color: #ffc107;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.overview-score {
    font-size: 0.95rem;
    font-weight: bold;
    color: #222;
}

.overview-subtext {
    font-size: 0.85rem;
    color: #666;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 260px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars-label {
    color: #ffc107;
    font-size: 0.85rem;
    width: 65px;
    text-align: right;
}

.star-off {
    color: #ddd;
}

.progress-bg {
    flex: 1;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ffc107;
    border-radius: 10px;
}

.count-label {
    font-size: 0.8rem;
    color: #666;
    width: 35px;
}

.customer-photos-gallery {
    display: flex;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.customer-photos-gallery img {
    width: 75px;
    height: 75px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ==========================================
   PÁGINAS LEGALES E INFORMACIÓN (enlaces.php)
   ========================================== */
.legal-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.legal-card {
    background-color: #111111;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.legal-card h1 {
    color: var(--gold-primary, #d4af37);
    font-size: 1.6rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
}

.legal-card p {
    color: #e0e0e0;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* ==========================================
   VISTA DETALLE DE PRODUCTO (producto.php)
   ========================================== */
.product-detail-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 70vh;
}

.product-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: #111111;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.main-img-box {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #222;
}

.main-img-box img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.product-title-detail {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.product-price-detail {
    color: var(--gold-primary, #d4af37);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 25px;
}

/* Selector de Tallas */
.size-selector-box {
    margin-bottom: 25px;
}

.size-selector-box label {
    display: block;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.size-options {
    display: flex;
    gap: 10px;
}

.btn-size {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-size.active,
.btn-size:hover {
    border-color: var(--gold-primary, #d4af37);
    color: var(--gold-primary, #d4af37);
}

/* Descripción */
.product-description-box {
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-bottom: 30px;
}

.product-description-box h3 {
    color: #ddd;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.product-description-box p {
    color: #888;
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn-add-cart-detail {
    width: 100% !important;
    padding: 15px !important;
    font-size: 1rem !important;
}

/* Adaptación a Móviles */
@media (max-width: 768px) {
    .product-detail-card {
        grid-template-columns: 1fr; /* Una columna en celulares */
        gap: 20px;
        padding: 20px;
    }
}

/* Miniaturas de la Galería */
.thumbnails-row {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #222;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.thumb-img:hover {
    opacity: 1;
    border-color: rgba(212, 175, 55, 0.5);
}

.thumb-img.active {
    opacity: 1;
    border-color: var(--gold-primary, #d4af37);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}


/* ==========================================
   AJUSTE DE FONDO OSCURO PARA VITRINAS Y DETALLE
   ========================================== */
.img-wrapper,
.main-img-box {
    background-color: #000000 !important; /* Fondo negro sólido detras del marco */
    border: 1px solid rgba(212, 175, 55, 0.3) !important; /* Borde dorado sutil */
    border-radius: 8px;
    overflow: hidden;
}

/* Para asegurar que las prendas no se desborden y queden centradas */
.img-wrapper img,
.main-img-box img {
    background: transparent !important;
    object-fit: contain;
}


/* ==========================================
   FORZADO DE FONDO NEGRO PARA VITRINAS
   ========================================== */
.img-wrapper,
.main-img-box,
.card-gold .img-wrapper,
.product-detail-card .main-img-box {
    background-color: #000000 !important;
    background-image: none !important;
}

.img-wrapper img,
.main-img-box img {
    background-color: transparent !important;
    background: transparent !important;
}


/* FORZAR FONDO NEGRO EN DETALLE DE PRODUCTO */
.main-img-box {
    background-color: #000000 !important;
    background-image: none !important;
}

.main-img-box img {
    background: transparent !important;
}

/* Plantilla de marco como imagen de fondo */
.main-img-box {
    background-color: #000000 !important;
    background-image: url('../img/fondo_card_best.png') !important; /* Dirección correcta desde CSS */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 12px;
    padding: 15px; /* Crea espacio entre la prenda y el marco */
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-img-box img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    background: transparent !important;
}