/*
Theme Name: Divi Child
Version: 3.0 (Checkout & Buttons Fix)
*/

/* =========================================
   1. TIENDA / CATÁLOGO DE PRODUCTOS
   ========================================= */

/* Tarjeta */
.et_pb_module.et_pb_shop .woocommerce ul.products li.product,
.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 0 0 15px 0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    text-align: left;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

.woocommerce ul.products li.product a img {
    margin-bottom: 15px !important;
    width: 100%;
    border-bottom: 1px solid #f5f5f5;
}

/* Badge Instalación */
.emesol-badge-container {
    padding: 0 15px;
    margin-bottom: 8px;
    text-align: left;
}
.instalacion-badge {
    display: inline-block;
    background-color: #fff8e1;
    color: #b68a00;
    border: 1px solid #f0b917;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

/* Título y Precio */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 0 15px;
    font-size: 16px;
    font-weight: 700;
    color: #003366;
    line-height: 1.3;
    margin-bottom: 5px;
    min-height: 42px;
}

.woocommerce ul.products li.product .price {
    padding: 0 15px;
    color: #222;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    display: block;
}

/* --- ESTILO TESLA: BOTONES DE TIENDA REFINADOS --- */

/* Contenedor para dar aire */
.emesol-shop-buttons {
    display: flex;
    gap: 10px;
    padding: 0 20px 25px 20px; /* Más espacio abajo */
    align-items: center;
    margin-top: 15px; /* Separar del precio */
}

/* Botón 1: Añadir (Sólido, pequeño y elegante) */
.emesol-shop-buttons .add_to_cart_button,
.emesol-shop-buttons .product_type_variable {
    flex: 1; /* Ocupa espacio proporcional */
    background-color: #003366 !important; /* Azul Emesol */
    color: #fff !important;
    border: 1px solid #003366 !important;
    padding: 8px 0 !important;
    border-radius: 30px !important; /* Borde Pastilla (Tesla style) */
    font-size: 11px !important; /* Texto pequeño y fino */
    font-weight: 600 !important;
    letter-spacing: 1px; /* Aire entre letras */
    text-transform: uppercase;
    text-align: center;
    margin: 0 !important;
    display: block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.15); /* Sombra suave */
    min-height: auto !important;
}

.emesol-shop-buttons .add_to_cart_button:hover,
.emesol-shop-buttons .product_type_variable:hover {
    background-color: #002244 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 51, 102, 0.25);
}

/* Botón 2: Ver Detalles (Ghost Button - Transparente) */
.emesol-btn-view {
    flex: 1;
    background-color: transparent;
    color: #666; /* Gris oscuro para no competir con el azul */
    border: 1px solid #ddd; /* Borde gris muy suave */
    padding: 8px 0;
    border-radius: 30px; /* Borde Pastilla */
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.emesol-btn-view:hover {
    border-color: #003366;
    color: #003366;
    background-color: #fff;
}

/* Ajuste del precio para que respire */
.woocommerce ul.products li.product .price {
    margin-bottom: 5px !important; /* Reducimos margen para acercarlo al título, alejando botones */
    color: #111 !important;
    font-weight: 700 !important;
    font-size: 20px !important; /* Precio un poco más grande */
}

/* =========================================
   2. PÁGINA DE PRODUCTO (INTERNA)
   ========================================= */
.product_title {
    font-size: 34px !important;
    color: #003366;
    font-weight: 800 !important;
    letter-spacing: -1px;
}
.woocommerce div.product p.price, 
.woocommerce div.product span.price {
    font-size: 28px !important;
    color: #333 !important;
    font-weight: 600 !important;
}

/* Variaciones */
.variations_form {
    margin-top: 20px;
}
.variations label {
    color: #003366;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
}
.variations select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
}

/* Trust Badges */
.emesol-trust-badges {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.badge-item {
    font-size: 14px;
    color: #003366;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.badge-item::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #e6ffed;
    color: #28a745;
    border-radius: 50%;
    font-size: 12px;
    margin-right: 10px;
    font-weight: 900;
}

/* Botón Single */
.single_add_to_cart_button {
    background-color: #003366 !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    padding: 15px 30px !important;
    border-radius: 6px !important;
}

/* Tabs */
.woocommerce-tabs ul.tabs {
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 0 !important;
    background: transparent !important;
}
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
}
.woocommerce-tabs ul.tabs li a {
    color: #888 !important;
    font-weight: 600 !important;
}
.woocommerce-tabs ul.tabs li.active a {
    color: #003366 !important;
    border-bottom: 3px solid #f0b917 !important;
}
.woocommerce-tabs .panel {
    border: none !important;
    box-shadow: none !important;
}

/* Productos Relacionados */
.related.products {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 50px;
}
.related.products h2 {
    color: #003366;
}

