/* ====================================================
   PÁGINA DE PRODUCTO: MONDELINN WHITE PREMIUM
==================================================== */

:root {
    --mondelinn-purple: #667eea;
    --mondelinn-purple-glow: rgba(102, 126, 234, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.92); /* Blanco translúcido limpio */
    --glass-border: rgba(102, 126, 234, 0.25); /* Borde sutil morado */
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(102, 126, 234, 0.1);
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

.mondelinn-single-product-layout {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    min-height: 70vh;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Contenedor Principal Glassmorphism --- */
.mondelinn-glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.mondelinn-back-link a {
    color: var(--mondelinn-purple);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
    transition: transform 0.3s ease;
}
.mondelinn-back-link a:hover {
    transform: translateX(-5px);
}

/* --- Grid Principal --- */
.mondelinn-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* --- GALERÍA DE IMÁGENES --- */
.mondelinn-product-gallery .main-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.03);
    object-fit: cover;
    transition: transform 0.3s ease;
}
.mondelinn-product-gallery .main-image img:hover {
    transform: scale(1.02);
}

.product-thumbnails {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.product-thumbnails::-webkit-scrollbar { height: 6px; }
.product-thumbnails::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 10px; }

.product-thumbnails img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
    object-fit: cover;
}
.product-thumbnails img:hover, .product-thumbnails img.active {
    border-color: var(--mondelinn-purple);
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--mondelinn-purple-glow);
}

/* --- DETALLES DEL PRODUCTO --- */
.product-title {
    color: var(--text-dark);
    font-size: 36px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.2;
}

.product-price {
    font-size: 28px;
    color: var(--mondelinn-purple);
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-price del {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 500;
}
.product-price ins {
    text-decoration: none;
}

.product-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 16px;
}

.mondelinn-divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 30px 0;
}

/* --- VARIACIONES (Tallas, Colores) --- */
.variations_form {
    margin-bottom: 25px;
}
.variations td {
    padding-bottom: 15px;
    vertical-align: middle;
}
.variations label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 15px;
}
.variations select {
    width: 100%;
    max-width: 250px;
    height: 45px;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background-color: #ffffff;
    color: var(--text-dark);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
.variations select:focus {
    border-color: var(--mondelinn-purple);
    box-shadow: 0 0 0 3px var(--mondelinn-purple-glow);
}
.reset_variations {
    color: #e53e3e;
    font-size: 13px;
    margin-left: 10px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.reset_variations:hover {
    color: #c53030;
}

/* --- FORMULARIO AÑADIR AL CARRITO Y BOTONES --- */
.product-add-to-cart form.cart {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* 1. MAGIA: Ocultar TODO lo que el tema ponga, excepto el número y nuestros botones */
.product-add-to-cart div.quantity > *:not(input.qty):not(.mondelinn-qty-btn) {
    display: none !important;
}

/* 2. ESTILO DE LA CAJA COMPLETA DE CANTIDAD [ - 1 + ] */
.product-add-to-cart div.quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    height: 52px !important;
    width: 120px !important; 
    padding: 0 5px !important;
    margin: 0 !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-add-to-cart div.quantity:hover {
    border-color: var(--mondelinn-purple) !important;
    box-shadow: 0 4px 12px var(--mondelinn-purple-glow) !important;
}

/* 3. ESTILO DE NUESTROS BOTONES PROPIOS + Y - */
.mondelinn-qty-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 40px !important;
    background: transparent !important;
    color: var(--mondelinn-purple) !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: background 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mondelinn-qty-btn:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

/* 4. ESTILO DEL NÚMERO CENTRAL */
.product-add-to-cart input.qty {
    width: 40px !important;
    height: 40px !important;
    border: none !important; 
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield; 
}

.product-add-to-cart input.qty:focus {
    outline: none !important;
    border: none !important; 
    box-shadow: none !important;
}

.product-add-to-cart input.qty::-webkit-outer-spin-button,
.product-add-to-cart input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- BOTONES DE COMPRA --- */
/* Botón: Añadir al carrito */
.product-add-to-cart button.single_add_to_cart_button {
    background: var(--mondelinn-purple) !important;
    color: #ffffff !important;
    padding: 0 20px !important;
    height: 52px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1; 
    min-width: 140px;
}
.product-add-to-cart button.single_add_to_cart_button:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px var(--mondelinn-purple-glow) !important;
}

/* Botón: Comprar Ahora */
.btn-comprar-ahora {
    flex: 1;
    min-width: 140px;
    background: #ffffff !important;
    color: var(--mondelinn-purple) !important;
    padding: 0 20px !important;
    height: 52px !important;
    border: 1px solid var(--mondelinn-purple) !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-comprar-ahora:hover {
    background: var(--mondelinn-purple) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px var(--mondelinn-purple-glow) !important;
}

/* --- METADATOS (Categorías, SKU) --- */
.product-meta {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.product-meta p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 8px 0;
}
.product-meta a {
    color: var(--mondelinn-purple);
    text-decoration: none;
    font-weight: 500;
}
.product-meta a:hover {
    text-decoration: underline;
}

/* ====================================================
   PESTAÑAS INFERIORES (Descripción y Valoraciones)
==================================================== */
.mondelinn-product-tabs {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    gap: 30px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 0;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--mondelinn-purple);
    transition: width 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: var(--mondelinn-purple);
}

.woocommerce-tabs ul.tabs li.active a::after,
.woocommerce-tabs ul.tabs li a:hover::after {
    width: 100%;
}

.woocommerce-Tabs-panel {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 15px;
    animation: fadeIn 0.4s ease;
}

.woocommerce-Tabs-panel h2 {
    color: var(--text-dark);
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

/* --- REVIEWS (Valoraciones) --- */
#reviews .commentlist {
    list-style: none;
    padding: 0;
}
#reviews .commentlist li {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
#reviews img.avatar {
    border-radius: 50%;
    float: left;
    margin-right: 15px;
    width: 50px;
    height: 50px;
}
#reviews .meta {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 5px;
}
#reviews .star-rating {
    color: #ecc94b;
    font-size: 14px;
}
#reviews .description {
    clear: both;
    margin-top: 15px;
}

/* Formulario de Review */
#review_form_wrapper {
    margin-top: 40px;
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
#review_form_wrapper input[type="text"],
#review_form_wrapper input[type="email"],
#review_form_wrapper textarea {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    margin-bottom: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: var(--text-dark);
}
#review_form_wrapper input:focus,
#review_form_wrapper textarea:focus {
    outline: none;
    border-color: var(--mondelinn-purple);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--mondelinn-purple-glow);
}
#review_form_wrapper .submit {
    background: var(--mondelinn-purple);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
#review_form_wrapper .submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px var(--mondelinn-purple-glow);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .mondelinn-product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-title { font-size: 28px; }
    .product-price { font-size: 24px; }
    .mondelinn-glass-container { padding: 25px; }
    .woocommerce-tabs ul.tabs { flex-direction: column; gap: 10px; border-bottom: none; }
    .woocommerce-tabs ul.tabs li a { padding: 10px 15px; background: #ffffff; border-radius: 8px; border: 1px solid var(--glass-border); }
    .woocommerce-tabs ul.tabs li.active a { background: rgba(102, 126, 234, 0.05); border-color: var(--mondelinn-purple); }
    .woocommerce-tabs ul.tabs li a::after { display: none; }
    
    .product-add-to-cart form.cart {
        flex-direction: column;
        align-items: stretch;
    }
    .product-add-to-cart div.quantity {
        width: 100% !important;
        max-width: 150px;
        margin: 0 auto 15px auto !important;
    }
}