/*
|--------------------------------------------------------------------------
| GLOBAL – Ajustes generales del tema hijo
|--------------------------------------------------------------------------
| Mantiene compatibilidad con WooCommerce y Elementor.
| Todo está agrupado y sin reglas duplicadas.
*/

/* =========================
   POPUP (Overlay + Modal)
========================= */
.gbss-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.7);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gbss-modal {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.gbss-popup-inner h2 {
    margin-bottom: 15px;
    font-size: 28px;
}

.gbss-popup-image img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.gbss-popup-desc {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.gbss-popup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* MOBILE POPUP */
@media (max-width: 768px) {
    .gbss-modal { padding: 24px; }
    .gbss-popup-inner h2 { font-size: 24px; }
    .gbss-popup-buttons { flex-direction: column; }
}
@media (max-width: 480px) {
    .gbss-modal { padding: 20px; }
    .gbss-popup-inner h2 { font-size: 20px; text-align: center; }
}

/*
|--------------------------------------------------------------------------
| WOOCOMMERCE – Precios globales
|--------------------------------------------------------------------------
*/

.woocommerce-Price-amount bdi,
.price,
.amount,
ins .woocommerce-Price-amount bdi,
del .woocommerce-Price-amount bdi {
    color: #000 !important;
}
del .woocommerce-Price-amount bdi { opacity: .7; }

/*
|--------------------------------------------------------------------------
| PRODUCT GRID – Tarjetas
|--------------------------------------------------------------------------
*/

.gbss-product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 35px;
    padding: 20px;
}

.gbss-product-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: .3s ease;
}
.gbss-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

/*
|--------------------------------------------------------------------------
| FLIP CARD SYSTEM
|--------------------------------------------------------------------------
*/

.flip-card {
    width: 100%;
    height: 420px;
    position: relative;
    perspective: 1200px;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    transition: transform .8s ease;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Caras */
.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
}


/* Cara delantera (imagen full cover pero mostrando el texto inferior) */
.flip-card-front {
    padding: 0 !important;
}

.gbss-front-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: top center !important;
}


/* Cara trasera */
.flip-card-back {
    background: #fff;
    padding: 20px;
    transform: rotateY(180deg);
    border: 1px solid #ccc;
}

.gbss-back-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scroll bonito */
.gbss-back-content::-webkit-scrollbar { width: 6px; }
.gbss-back-content::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}

/* MOBILE — Flip desactivado */
@media (max-width: 768px) {
    .flip-card { height: 500px; }
    .flip-card-inner { transform: none !important; }
    .flip-card-back { position: relative; transform: none !important; }
    .flip-card-front { display: none; }
}

/*
|--------------------------------------------------------------------------
| TITULOS
|--------------------------------------------------------------------------
*/

.gbss-front-title,
.gbss-back-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 15px 0;
    color: #333;
}

/*
|--------------------------------------------------------------------------
| SELECTS DE VARIACIONES (Horas + Level)
|--------------------------------------------------------------------------
*/

.gbss-variation-selects {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gbss-variation-selects label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gbss-variation-selects select {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: .2s ease;
}
.gbss-variation-selects select:hover {
    background: #f1f5f9;
}
.gbss-variation-selects select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}

/*
|--------------------------------------------------------------------------
| PRECIO
|--------------------------------------------------------------------------
*/

.gbss-product-price {
    margin-top: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/*
|--------------------------------------------------------------------------
| BOTONES
|--------------------------------------------------------------------------
*/

.gbss-product-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.gbss-btn {
    padding: 10px 18px;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: .2s ease;
}
.gbss-btn:hover {
    background: #facc15;
    color: #1e293b;
}

.gbss-btn.secondary {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
}
.gbss-btn.secondary:hover {
    background: #333 !important;
}

/*
|--------------------------------------------------------------------------
| NEUTRALIZAR FLEX EN CONTENEDORES ESPECÍFICOS DE ELEMENTOR
| (evita romper headers)
|--------------------------------------------------------------------------
*/

.e-con.e-flex > .e-con-inner {
    align-items: initial !important; /* NO usar 'normal' */
}
/* ===============================
   TXT DE SELECTS EN COLOR NEGRO
================================*/

.gbss-variation-selects select {
    color: #000 !important; /* Texto real */
}

/* Placeholder de selects (Chrome, Safari, Edge) */
.gbss-variation-selects select option[value=""] {
    color: #666 !important; /* Negro suave para placeholder */
}

/* Firefox placeholder */
.gbss-variation-selects select:invalid {
    color: #666 !important;
}

.woocommerce-mini-cart__empty-message {
    color: #ffffff !important;
    text-align: center;
    font-weight: 600;
}

/* =======================================
   Estilos personalizados para el carrito
========================================*/

.woocommerce-mini-cart {
    padding: 20px;
}

.woocommerce-mini-cart-item {
    border-bottom: 1px solid #eee;
}
.cart {
    width: 100% !important;
}
.elementor-menu-cart__products {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Espacio a la izquierda para separar del scroll */
    padding-right: 8px;

    /* Opcional: un pequeño padding lateral */
    padding-left: 4px;
}

/* ============ Botones mini carrito ========================*/
.elementor-menu-cart__footer-buttons .elementor-button--view-cart {
    background-color: #0A2B47 !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
}

/* ===== Scroll minimalista ===== */
.elementor-menu-cart__products::-webkit-scrollbar {
    width: 8px; /* ancho del scrollbar */
}

.elementor-menu-cart__products::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05); 
    border-radius: 10px;
}

.elementor-menu-cart__products::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25); 
    border-radius: 10px;
}

.elementor-menu-cart__products::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}
#gbss-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all .35s ease;
    z-index: 999999;
}

#gbss-toast.show {
    opacity: 1;
    transform: translateY(0);
}


/* ================ Single products =======================*/
.single-product {
    background: #ffffff !important;
}

/* === CONTENEDOR DEL FORMULARIO === */
.gbss-custom-form-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #D3D5D9;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* === TÍTULO === */
.gbss-custom-form-wrapper h2 {
    text-align: center;
    font-size: 28px;
    color: #0A2B47;
    margin-bottom: 30px;
}

/* === CONTENEDOR DE CADA FILA === */
.gbss-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

/* === LABEL A LA IZQUIERDA === */
.gbss-field label {
    width: 30%;
    font-weight: 600;
    font-size: 16px;
    color: #113E66;
    margin-right: 20px;
    text-align: right;
}

/* === CAMPOS A LA DERECHA === */
.gbss-field input,
.gbss-field textarea {
    width: 65%;
    padding: 14px;
    border: 1px solid #D3D5D9;
    border-radius: 8px;
    background: #F8F9FA;
    font-size: 16px;
}

/* === HOVER / FOCUS === */
.gbss-field input:focus,
.gbss-field textarea:focus {
    border-color: #0A2B47;
    box-shadow: 0 0 0 2px rgba(10,43,71,0.15);
}

/* === CAMPO DE TEXTO LARGO === */
.gbss-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* === RESPONSIVE: MÓVILES === */
@media (max-width: 768px) {
    .gbss-field {
        flex-direction: column;
        align-items: flex-start;
    }

    .gbss-field label {
        width: 100%;
        text-align: left;
        margin-bottom: 6px;
    }

    .gbss-field input,
    .gbss-field textarea {
        width: 100%;
    }
}

