/* ==========================================================================
 * YADEA MÉXICO - WOOCOMMERCE CUSTOM STYLES (yadea-woo.css)
 * 
 * Estilos corporativos Premium "Click & Collect" (Estilo Vietnam)
 * Paleta: #ff5000 (Naranja Corporativo), #f8f9fa (Fondo Gris Claro), #ffffff (Blanco)
 * ========================================================================== */

/* =========================================================
   1. TIENDA (CATÁLOGO Y TARJETAS DE PRODUCTO)
   ========================================================= */
.yadea-shop-banner__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
}

.yadea-shop-banner__title {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4rem);
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0px 4px 15px rgba(0,0,0,0.9);
    margin: 0;
    line-height: 1.2;
}
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    text-align: center;
    border: 1px solid transparent !important;
}
body.woocommerce-shop ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
    transform: translateY(-5px);
}

/* Imágenes grandes en el catálogo */
body.woocommerce-shop ul.products li.product img,
body.post-type-archive-product ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    margin-bottom: 20px !important;
}

/* Tipografía de la Tarjeta */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin-bottom: 8px !important;
}

body.woocommerce-shop ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #ff5000 !important;
    margin-bottom: 15px !important;
}

/* Botón corporativo en tarjeta */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button {
    background-color: #ff5000 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 14px 20px !important;
    border-radius: 8px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: background-color 0.3s ease !important;
}
body.woocommerce-shop ul.products li.product .button:hover,
body.post-type-archive-product ul.products li.product .button:hover {
    background-color: #e04600 !important;
}


/* =========================================================
   2. CARRITO DE COMPRAS PREMIUM (CLEAN UI)
   ========================================================= */
/* Ocultar título gigante y edit link en el carrito */
body.woocommerce-cart header.entry-header {
    display: none !important;
}
body.woocommerce-cart .post-edit-link {
    display: none !important;
}

body.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 50px !important;
    max-width: 1200px !important;
    margin: 40px auto 80px auto !important;
    align-items: flex-start !important;
    padding: 0 20px !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.woocommerce-cart .woocommerce-notices-wrapper {
    width: 100% !important;
}

body.woocommerce-cart .woocommerce-cart-form {
    flex: 1 1 55% !important;
    min-width: 300px !important;
}

/* Transformar la tabla en tarjetas */
body.woocommerce-cart table.shop_table {
    display: block !important;
    border: none !important;
    width: 100% !important;
}
body.woocommerce-cart table.shop_table thead {
    display: none !important;
}
body.woocommerce-cart table.shop_table tbody {
    display: block !important;
    width: 100% !important;
}
body.woocommerce-cart table.shop_table tr.cart_item {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 30px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03) !important;
    border: 1px solid #f0f0f0 !important;
    position: relative !important;
    gap: 25px !important;
}
body.woocommerce-cart table.shop_table td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Imagen del producto */
/* ==========================================
   YADEA - IMAGEN COMPLETA EN CARRITO
   ========================================== */

    /* Contenedor de imagen */
    body.woocommerce-cart table.shop_table td.product-thumbnail {
        flex: 0 0 180px !important;
        width: 180px !important;
        max-width: 180px !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    
    /* Enlace de la imagen */
    body.woocommerce-cart table.shop_table td.product-thumbnail a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 150px !important;
        overflow: hidden !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
    }
    
    /* Imagen completa sin deformación */
    body.woocommerce-cart table.shop_table td.product-thumbnail img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
    
        object-fit: contain !important;
        object-position: center center !important;
    
        padding: 5px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    
        border-radius: 8px !important;
        background: transparent !important;
        mix-blend-mode: normal !important;
    }
    
    /* Ajuste para dispositivos móviles */
    @media screen and (max-width: 768px) {
    
        body.woocommerce-cart table.shop_table td.product-thumbnail {
            flex: 0 0 140px !important;
            width: 140px !important;
            max-width: 140px !important;
            margin: 0 auto !important;
        }
    
        body.woocommerce-cart table.shop_table td.product-thumbnail a {
            height: 120px !important;
        }
    }


/* Nombre del producto */
body.woocommerce-cart table.shop_table td.product-name {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
body.woocommerce-cart table.shop_table td.product-name a {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #111 !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}
body.woocommerce-cart table.shop_table td.product-name dl.variation {
    margin-top: 6px !important;
    font-size: 0.9rem !important;
    color: #777 !important;
}
body.woocommerce-cart table.shop_table td.product-name dl.variation p {
    margin: 0 !important;
}

/* Precio unitario y Cantidad ocultos para Click&Collect (1 solo item usualmente) */
body.woocommerce-cart table.shop_table td.product-price,
body.woocommerce-cart table.shop_table td.product-quantity {
    display: none !important;
}

/* Subtotal */
body.woocommerce-cart table.shop_table td.product-subtotal {
    flex: 0 0 auto !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #111 !important;
    padding-right: 40px !important; /* Espacio para la X */
}

/* Botón Eliminar (X superior derecha) */
body.woocommerce-cart table.shop_table td.product-remove {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
}
body.woocommerce-cart table.shop_table a.remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}
body.woocommerce-cart table.shop_table a.remove:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
}

/* Acciones del carrito (Cupones) */
body.woocommerce-cart table.shop_table tr.actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 10px !important;
}
body.woocommerce-cart .coupon {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    width: 100% !important;
}
body.woocommerce-cart .coupon input.input-text {
    padding: 14px 20px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    width: 250px !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    background: #fff !important;
}
body.woocommerce-cart .coupon input.input-text:focus {
    border-color: #ff5000 !important;
    outline: none !important;
}
body.woocommerce-cart .coupon button.button,
body.woocommerce-cart button[name="update_cart"] {
    background: #f8f9fa !important;
    color: #333 !important;
    border-radius: 8px !important;
    padding: 14px 28px !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
}
body.woocommerce-cart .coupon button.button:hover,
body.woocommerce-cart button[name="update_cart"]:hover {
    background: #e2e8f0 !important;
    color: #111 !important;
}
body.woocommerce-cart button[name="update_cart"] {
    margin-left: auto !important;
}

/* Panel Lateral (Totales) */
body.woocommerce-cart .cart-collaterals {
    flex: 1 1 35% !important;
    min-width: 320px !important;
    position: sticky !important;
    top: 40px !important;
    margin-top: 0 !important;
}
body.woocommerce-cart .cart_totals {
    background: #f8f9fa !important;
    border-radius: 16px !important;
    padding: 40px !important;
    width: 100% !important;
    max-width: 100% !important;
    color: #111 !important;
    box-shadow: 0 4px 25px rgba(0,0,0,0.03) !important;
    border: 1px solid #eaeaea !important;
}
body.woocommerce-cart .cart_totals h2 {
    color: #111 !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid #eaeaea !important;
    padding-bottom: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
body.woocommerce-cart .cart_totals table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 35px !important;
}
body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals td {
    padding: 18px 0 !important;
    border-bottom: 1px solid #eaeaea !important;
    background: transparent !important;
}
body.woocommerce-cart .cart_totals th {
    text-align: left !important;
    color: #555 !important;
    font-weight: 600 !important;
    border: none !important;
    font-size: 1rem !important;
}
body.woocommerce-cart .cart_totals td {
    text-align: right !important;
    color: #111 !important;
    font-weight: 700 !important;
    border: none !important;
    font-size: 1.1rem !important;
}
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
    border-bottom: none !important;
    padding-top: 25px !important;
}
body.woocommerce-cart .cart_totals .order-total th {
    font-size: 1.3rem !important;
    color: #111 !important;
    font-weight: 800 !important;
}
body.woocommerce-cart .cart_totals .order-total td {
    font-size: 1.5rem !important;
    color: #ff5000 !important;
    font-weight: 800 !important;
}

/* Botón Checkout */
body.woocommerce-cart .checkout-button {
    background: #ff5000 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    width: 100% !important;
    border-radius: 8px !important;
    text-align: center !important;
    padding: 18px !important;
    border: none !important;
    display: block !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: transform 0.2s ease, background 0.3s ease !important;
}
body.woocommerce-cart .checkout-button:hover {
    background: #e04600 !important;
    transform: translateY(-2px) !important;
}

/* =========================================================
   2.1 CARRITO VACÍO (EMPTY CART)
   ========================================================= */
body.woocommerce-cart .cart-empty {
    text-align: center !important;
    background: #ffffff !important;
    padding: 60px 20px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06) !important;
    margin: 40px auto !important;
    max-width: 800px !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #111 !important;
    border: 1px solid #f0f0f0 !important;
}
body.woocommerce-cart .cart-empty::before {
    display: none !important; /* Ocultar icono gigante nativo */
}
body.woocommerce-cart .return-to-shop {
    text-align: center !important;
    margin-top: 20px !important;
}
body.woocommerce-cart .return-to-shop .button {
    background-color: #ff5000 !important;
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 15px 40px !important;
    border-radius: 8px !important;
    display: inline-block !important;
    transition: background-color 0.3s ease !important;
}
body.woocommerce-cart .return-to-shop .button:hover {
    background-color: #e04600 !important;
}

/* Ocultar elementos huérfanos que molestan */
body.woocommerce-cart .cross-sells {
    display: none !important;
}

/* =========================================================
   3. CHECKOUT - FORMULARIO DE RESERVA ESTILO VIETNAM
   ========================================================= */
body.woocommerce-checkout .woocommerce {
    max-width: 1200px !important;
    margin: 40px auto !important;
    padding: 0 5% !important;
}

/* Layout a 2 Columnas */
body.woocommerce-checkout form.checkout {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
    align-items: flex-start !important;
}

/* 60% Formulario Cliente */
body.woocommerce-checkout #customer_details {
    width: calc(60% - 20px) !important;
    flex-shrink: 0 !important;
}
/* 40% Resumen Pedido */
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
    width: calc(40% - 20px) !important;
    flex-shrink: 0 !important;
}

/* Tarjeta Gris para el Resumen (Efecto Ticket) */
body.woocommerce-checkout #order_review {
    background-color: #f8f9fa !important;
    border: 1px solid #eaeaea !important;
    border-radius: 16px !important;
    padding: 30px !important;
}
body.woocommerce-checkout #order_review_heading {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
}

/* Titulos de secciones corporativos */
body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-additional-fields h3 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #111 !important;
    border-bottom: 2px solid #eaeaea !important;
    padding-bottom: 15px !important;
    margin-bottom: 25px !important;
}

/* Estilos de Inputs Corporativos Premium */
body.woocommerce-checkout form.checkout .form-row {
    padding: 0 !important;
    margin-bottom: 20px !important;
}
body.woocommerce-checkout form.checkout label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin-bottom: 8px !important;
    display: block !important;
}
/* Ocultar asteriscos rojos innecesarios de WooCommerce */
body.woocommerce-checkout form.checkout label .required {
    color: #ff5000 !important;
    text-decoration: none !important;
    border: none !important;
}

body.woocommerce-checkout form.checkout input[type="text"],
body.woocommerce-checkout form.checkout input[type="email"],
body.woocommerce-checkout form.checkout input[type="tel"],
body.woocommerce-checkout form.checkout textarea,
body.woocommerce-checkout form.checkout select {
    width: 100% !important;
    padding: 15px 18px !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: #333 !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    box-sizing: border-box !important;
}
body.woocommerce-checkout form.checkout textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

/* Foco: Naranja sin outline */
body.woocommerce-checkout form.checkout input:focus,
body.woocommerce-checkout form.checkout textarea:focus,
body.woocommerce-checkout form.checkout select:focus {
    border-color: #ff5000 !important;
    outline: none !important;
    box-shadow: 0 0 0 1px #ff5000 !important;
}

/* Ajustar inputs a dos columnas dentro de Facturación */
body.woocommerce-checkout form.checkout .form-row-first {
    width: 48% !important;
    float: left !important;
}
body.woocommerce-checkout form.checkout .form-row-last {
    width: 48% !important;
    float: right !important;
}
body.woocommerce-checkout form.checkout .form-row-wide {
    width: 100% !important;
    clear: both !important;
}

/* Resumen del pedido en el Ticket */
body.woocommerce-checkout table.shop_table {
    border: none !important;
    width: 100% !important;
}
body.woocommerce-checkout table.shop_table th {
    border: none !important;
    border-bottom: 1px solid #dcdcdc !important;
    padding: 12px 0 !important;
    background: transparent !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    color: #555 !important;
}
body.woocommerce-checkout table.shop_table td {
    border: none !important;
    border-bottom: 1px solid #eaeaea !important;
    padding: 15px 0 !important;
    background: transparent !important;
}

/* Ocultar métodos de pago (Si es Click & Collect, normalmente se paga en tienda) */
body.woocommerce-checkout #payment {
    background: transparent !important;
    border-radius: 0 !important;
}
body.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #eaeaea !important;
    padding: 0 0 20px 0 !important;
}

/* Botón Finalizar Reserva */
body.woocommerce-checkout #place_order {
    background-color: #ff5000 !important;
    color: #ffffff !important;
    width: 100% !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 22px !important;
    border-radius: 8px !important;
    border: none !important;
    margin-top: 20px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}
body.woocommerce-checkout #place_order:hover {
    background-color: #e04600 !important;
}

/* =========================================================
   4. DISEÑO RESPONSIVO (MOBILE FIRST / BREAKPOINTS)
   ========================================================= */
@media (max-width: 768px) {
    /* Tienda */
    .yadea-cat-block__grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Carrito */
    body.woocommerce-cart .woocommerce {
        padding: 20px !important;
        margin: 20px 15px !important;
    }
    body.woocommerce-cart table.shop_table th {
        display: none !important; /* Ocultar cabeceras en móviles */
    }
    body.woocommerce-cart table.shop_table td {
        display: block !important;
        text-align: center !important;
        padding: 10px !important;
    }
    
    /* Checkout: Pasar a 1 Columna */
    body.woocommerce-checkout form.checkout {
        flex-direction: column !important;
        gap: 30px !important;
    }
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review_heading,
    body.woocommerce-checkout #order_review {
        width: 100% !important;
    }
    
    /* Inputs a 100% */
    body.woocommerce-checkout form.checkout .form-row-first,
    body.woocommerce-checkout form.checkout .form-row-last {
        width: 100% !important;
        float: none !important;
    }
    
    body.woocommerce-checkout #order_review {
        padding: 20px !important;
    }
}

@media screen and (max-width: 768px) {

    body.woocommerce-cart table.shop_table td.product-thumbnail {
        flex: 0 0 140px !important;
        width: 140px !important;
        max-width: 140px !important;
        margin: 0 auto !important;
    }

    body.woocommerce-cart table.shop_table td.product-thumbnail img {
        width: 100% !important;
        height: 120px !important;
        object-fit: contain !important;
        padding: 5px !important;
    }

}
