/* =====================================================
   FINALIZAR COMPRA: CAJAS DE ENVÍO PRO (MÁS ALTAS)
   ===================================================== */

/* 1. Estirar la tabla al máximo posible */
.woocommerce-checkout-review-order-table {
    width: 100% !important;
}

/* 2. Ajustar el contenedor de las opciones */
#shipping_method {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* 3. Diseño de cada caja individual */
#shipping_method li {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px !important; /* Espacio entre cajas */
    padding: 15px 20px !important; /* MÁS ALTO: Aumentamos el padding arriba/abajo */
    transition: all 0.3s ease;
    display: block !important;
    width: 100% !important;
}

/* Efecto al pasar el mouse o estar seleccionado */
#shipping_method li:hover {
    border-color: #18494d;
    background-color: #f0fdf4;
}

/* 4. Alineación interna del Logo, Precio y Fecha */
#shipping_method li label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    cursor: pointer;
    font-weight: 600;
    color: #18494d;
}

/* 5. Hacer que el input (el circulito) no estorbe el diseño */
#shipping_method li input[type="radio"] {
    margin-right: 15px !important;
}

/* 6. Estilo para la fecha (que se vea clarita al lado derecho) */
#shipping_method li label small, 
#shipping_method li label .sh-shipping-date {
    font-weight: normal;
    color: #64748b;
    font-style: italic;
}


/* =====================================================
   ALINEACIÓN FINAL DIRECCIÓN DE ENVÍO - MORALEJA
   ===================================================== */

/* 1. Limpieza de elementos que no queremos */
.woocommerce-order-received h1.entry-title,
.woocommerce-order-received ul.woocommerce-order-overview,
.woocommerce-order-received h2#payment_details,
.woocommerce-order-received .shop_table.order_details:not(.woocommerce-table--order-details),
.woocommerce-order-received .woocommerce-message,
.woocommerce-order-received .woocommerce-column--billing-address {
    display: none !important;
}

/* 2. Asegurar que Detalles del Pedido se vea bien */
.woocommerce-order-received section.woocommerce-order-details {
    display: block !important;
    margin-bottom: 30px;
}

/* 3. ALINEACIÓN DE LA DIRECCIÓN DE ENVÍO */
.woocommerce-order-received .woocommerce-customer-details {
    /* Quitamos el centrado y lo alineamos al contenedor de arriba */
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-order-received .woocommerce-column--shipping-address {
    width: 100% !important;
    float: none !important;
    /* Este margen empuja la dirección para que calce con el cuadro de arriba */
    /* Si ves que falta un pelín, cambia el 15px por 20px */
    padding-left: 15px !important; 
    text-align: left !important;
}

.woocommerce-order-received .woocommerce-column--shipping-address .woocommerce-column__title {
    text-align: left !important;
    font-size: 22px;
    color: #18494d;
    margin-bottom: 10px;
}

.woocommerce-order-received address {
    text-align: left !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    line-height: 1.6;
}

/* Ocultar la palabra opcional en campos que sabemos que son vitales */
#billing_address_1_field .optional, 
#billing_address_number_field .optional, 
#billing_state_field .optional {
    display: none !important;
}

/* Asegurar que el asterisco rojo sea visible */
#billing_address_1_field label .required, 
#billing_address_number_field label .required, 
#billing_state_field label .required {
    color: #e2401c !important;
    visibility: visible !important;
    display: inline-block !important;
}
/* Eliminar el bloque de "Enviar a una dirección diferente" de raíz */
#ship-to-different-address, 
.ship-to-different-address, 
.woocommerce-shipping-fields {
    display: none !important;
}

/* Espaciado para la nueva sección 3 */
#seccion-facturacion-moraleja {
    margin-top: 40px;
    border-top: 2px dashed #eee;
    padding-top: 30px;
}












/* 1. LIMPIEZA: Ocultar el título nativo "Detalles de facturación" */
.woocommerce-billing-fields > h3, 
.woocommerce-checkout h3#billing_headings {
    display: none !important;
}

/* 2. TÍTULO SECCIÓN 1: DATOS PERSONALES (Sobre el campo Nombre) */
#billing_first_name_field::before {
    content: "1. DATOS PERSONALES";
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #03363d;
    margin-bottom: 15px;
    width: 100%;
}

/* 3. TÍTULO SECCIÓN 2: (Eliminado de aquí, se movió al PHP de arriba) */

/* 4. TÍTULO DINÁMICO: DATOS DE DESPACHO (Sobre la Calle, solo si NO es retiro) */
body:not(.modo-retiro-total) #billing_address_1_field::before {
    content: "DATOS DE DESPACHO";
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #03363d;
    margin-top: 10px;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    width: 100%;
}

/* 5. TÍTULO SECCIÓN 3: FACTURACIÓN (Si usas el plugin de RUT) */
.rut_fields::before, .invoice-details-title::before {
    content: "3. DATOS DE FACTURACIÓN";
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #03363d;
    margin-top: 30px;
    margin-bottom: 15px;
    width: 100%;
}

/* Ocultar el campo de País/Región en el Checkout */
#billing_country_field {
    display: none !important;
}

/* Ajustar el margen del campo email para que los botones de entrega suban bien */
#billing_email_field {
    margin-bottom: 25px !important;
}






/* Ocultar título en la página de Recursos Docentes */
body.page-id-15970 .entry-header {
    display: none !important;
}

/* Ocultar Retiro de la lista de couriers si NO estamos en modo retiro */
body:not(.modo-retiro-total) #shipping_method li:has(input[value*="local_pickup"]) {
    display: none !important;
}

/* 1. Traducir Your order a Tu pedido (Forma limpia) */
#order_review_heading {
    font-size: 0 !important; /* Escondemos el original */
}
#order_review_heading::before {
    content: 'Tu pedido';
    font-size: 30px !important; /* Ajusta al tamaño que quieras */
    visibility: visible;
    color: #03363d;
    font-weight: bold;
}

/* 2. Traducir Producto y Subtotal sin márgenes extra */
.shop_table thead th.product-name {
    font-size: 0 !important;
    text-align: left !important;
    padding-left: 0 !important; /* Quitamos margen izquierdo */
}
.shop_table thead th.product-name::before {
    content: 'Producto';
    font-size: 16px !important; /* Tamaño estándar de tu tabla */
    visibility: visible;
    color: #666; /* Color gris suave para encabezados */
}

.shop_table thead th.product-total {
    font-size: 0 !important;
    text-align: right !important;
    padding-right: 0 !important;
}
.shop_table thead th.product-total::before {
    content: 'Subtotal';
    font-size: 14px !important;
    visibility: visible;
    color: #666;
}

/* 3. Asegurar que la columna de productos no tenga padding innecesario */
.woocommerce-checkout-review-order-table th, 
.woocommerce-checkout-review-order-table td {
    padding-left: 0 !important;
}

/* Elimina el segundo bloque de cupón (el de abajo) */
.woocommerce-checkout-review-order-table .checkout_coupon,
.woocommerce-checkout #order_review .checkout_coupon {
    display: none !important;
}
/* Elimina por completo la franja azul informativa del cupón */
.woocommerce-info, 
.woocommerce-form-coupon-toggle {
    display: none !important;
}

/* Asegura que el formulario del cupón se mantenga visible si lo necesitas */
.checkout_coupon.woocommerce-form-coupon {
    display: block !important;
}

/* Orden de campos estilo Limpio */
.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4%;
}
#billing_first_name_field, #billing_last_name_field { width: 48% !important; }
#billing_phone_field, #billing_email_field { width: 48% !important; }
#billing_country_field, #billing_state_field { width: 48% !important; }
#billing_city_field, #billing_address_1_field { width: 100% !important; }

.woocommerce-checkout label {
    font-weight: 700 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block;
}

.woocommerce-checkout input.input-text {
    padding: 12px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
}





/* =========================================
   14. FORZAR 4 COLUMNAS SOLO EN PÁGINAS DE CATEGORÍAS
   ========================================= */

@media (min-width: 1025px) {
    /* Limitado a body.tax-product_cat para no afectar el Home */
    body.tax-product_cat .woocommerce ul.products,
    body.tax-product_cat .bookory-product-loop ul.products {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 30px !important; 
    }
    
    body.tax-product_cat .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        clear: none !important; 
    }
}

/* Ajuste intermedio para Tablets (3 columnas) en categorías */
@media (min-width: 769px) and (max-width: 1024px) {
    body.tax-product_cat .woocommerce ul.products,
    body.tax-product_cat .bookory-product-loop ul.products {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
    body.tax-product_cat .woocommerce ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
    }
}
















/* =========================================
   1. BOTONES: AGREGAR AL CARRITO (MÓVIL Y ESCRITORIO)
   ========================================= */

/* A. ESCRITORIO: Botón + Centrado y Verde */
.woocommerce ul.products li.product .product-caption,
.woocommerce ul.products li.product .product-details {
    display: flex !important;
    flex-direction: column !important;
    align-items: left !important;
    text-align: left !important;
}

.woocommerce ul.products li.product .button.add_to_cart_button {
    display: inline-block !important;
    background-color: #03363D !important;
    color: #ffffff !important;
    border: 1px solid #03363D !important;
    border-radius: 50px !important;
    padding: 6px 20px !important;
    font-size: 14px !important;
    margin-top: 10px !important;
    line-height: 1.5 !important;
    width: auto !important;
    transition: all 0.3s ease;
    visibility: visible !important; 
    opacity: 1 !important; 
    position: relative !important; 
    z-index: 99 !important; 
    pointer-events: auto !important;
}

.woocommerce ul.products li.product .button.add_to_cart_button::before {
    content: '+';
    font-weight: bold;
    margin-right: 6px;
    font-size: 15px;
}

.woocommerce ul.products li.product .button.add_to_cart_button:hover {
    background-color: #ffffff !important;
    color: #03363D !important;
    border: 1px solid #03363D !important;
}

/* B. MÓVIL: Ajustes del botón (Más corto y sin cortes) */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .button.add_to_cart_button {
        width: 100% !important; 
        margin: 10px auto !important; 
        padding: 10px 4px !important; /* AUMENTADO el padding superior/inferior para hacerlo más "gordito" */
        font-size: 13px !important; /* AUMENTADO de 11px a 13px */
        white-space: normal !important; 
        line-height: 1.2 !important;
        text-align: center !important;
        min-height: 44px !important; /* AUMENTADO para mejor área táctil */
        display: flex !important;
        justify-content: center !important; 
        align-items: center !important;
    }
    
    .woocommerce ul.products li.product .button.add_to_cart_button * {
        color: #ffffff !important;
        font-size: 13px !important; /* AUMENTADO de 11px a 13px */
    }
}

/* C. OCULTAR BOTONES NO DESEADOS (Manteniendo el "Leer más" oculto) */

/* 1. Ocultamos el "Leer más" y cualquier botón que no sea de compra directa */
.woocommerce ul.products li.product .button:not(.add_to_cart_button),
.woocommerce ul.products li.product.outofstock .button {
    display: none !important;
}

/* 2. Ocultamos botones duplicados que flotan sobre la imagen */
.woocommerce ul.products li.product .product-transition .button.add_to_cart_button,
.woocommerce ul.products li.product .product-image .button.add_to_cart_button {
    display: none !important;
}

/* 3. FORZAMOS el botón real de compra en el caption (Grid y Lista) */
.woocommerce ul.products li.product .product-caption .add_to_cart_button,
.woocommerce ul.products li.product .product-details .add_to_cart_button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================
   2. PRECIOS: ORDEN, COLORES Y MÓVIL
   ========================================= */

.price, .woocommerce-Price-amount {
    display: flex !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
}

/* Precio Nuevo (Rojo y Primero) */
.price ins,
.price > .woocommerce-Price-amount:last-child { 
    order: -1 !important;
    margin-right: 10px !important;
    text-decoration: none !important;
    color: #ff677e !important;
    font-weight: 800 !important;
}

body.single-product .price ins,
body.single-product .price > .woocommerce-Price-amount bdi {
    font-size: 32px !important;
}

/* Precio Antiguo (Gris y Segundo) */
.price del {
    order: 2 !important;
    color: #999999 !important;
    font-size: 0.9em !important;
    font-weight: normal !important;
    text-decoration: line-through !important;
    opacity: 1 !important;
    margin-left: 0 !important;
}

/* Alineación de precios en listados Grid */
.woocommerce ul.products li.product .price {
    margin-top: auto !important;
    padding-top: 10px !important;
    align-self: center !important;
    text-align: center !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    /* Ordenar precios uno arriba del otro en móvil */
    .woocommerce ul.products li.product .price {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        min-height: 55px !important; 
        margin-bottom: 10px !important;
    }

    .woocommerce ul.products li.product .price ins {
        margin-right: 0 !important; 
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
    }

    .woocommerce ul.products li.product .price del {
        margin-left: 0 !important;
        line-height: 1.1 !important;
    }
}


/* =========================================
   3. ETIQUETAS Y CÍRCULOS DE DESCUENTO
   ========================================= */

/* A) Círculos Pequeños (Catálogo) */
.woocommerce ul.products li.product .onsale,
.bookory-product-loop .onsale,
span.onsale,
.related.products .onsale { 
    top: auto !important;
    right: auto !important;
    bottom: -10px !important;
    left: 7px !important;
    position: absolute !important;
    background-color: #ff677e !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    line-height: 45px !important;
    font-size: 14px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    margin: 0 !important;
}

/* B) Círculo Gigante (Ficha de Producto) */
.single-product .product .images .onsale {
    width: 70px !important;
    height: 70px !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    line-height: 100px !important;
    top: -20px !important;
    left: -20px !important;
    bottom: auto !important;
    right: auto !important;
}

/* C) Ocultar Etiquetas sobrantes */
span.inventory_status,
p.stock.out-of-stock,
.single-product .product-image-wrapper .advanced-woo-labels,
.single-product .woocommerce-product-gallery .advanced-woo-labels,
.single-product .images .advanced-woo-labels {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


/* =========================================
   4. CARRITO Y CHECKOUT
   ========================================= */

/* Mejoras Columnas Carrito */
.cart_totals th { width: 30% !important; white-space: nowrap !important; }
.cart_totals td { width: 70% !important; }
tr.custom-savings-row td { padding-top: 10px !important; padding-bottom: 10px !important; }

/* Ocultar Envíos en Carrito */
.woocommerce-cart .cart_totals .shipping,
.woocommerce-cart .cart_totals .shipping-calculator-button,
.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
    display: none !important;
}

/* Colores Precio Carrito */
.precio-oferta-rojo .oferta .amount,
.precio-oferta-rojo .oferta bdi { color: #ff677e !important; }
.precio-oferta-rojo .original .amount,
.precio-oferta-rojo .original bdi { color: #999999 !important; font-weight: normal !important; }

/* Botón Seguir Comprando */
.woocommerce-cart .continue-shopping-btn {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: 15px !important;
    background-color: #ffffff !important;
    color: #03363D !important;
    border: 1px solid #03363D !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}
.woocommerce-cart .continue-shopping-btn:hover {
    background-color: #03363D !important;
    color: #ffffff !important;
    cursor: pointer;
}

/* =========================================
   5. CUPONES Y TABLA DE PEDIDOS
   ========================================= */

/* Cupón Arriba y Alineado */
.cart_totals table.shop_table tbody { display: flex; flex-direction: column; }
.cart_totals table.shop_table tr { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.cart_totals tr.custom-coupon-row { order: -1 !important; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eaeaea; width: 100%; }
.cart_totals tr.custom-coupon-row th { display: none !important; }
.cart_totals tr.custom-coupon-row td { width: 100% !important; display: block !important; padding: 20px 0 !important; text-align: center !important;}
.cart_totals tr.custom-coupon-row td .coupon-inner-wrapper { display: flex; gap: 10px; width: 100% !important; max-width: 100% !important; align-items: center; justify-content: center !important; margin: 0 !important; }
.cart_totals tr.custom-coupon-row td input.input-text { flex: 1; width: 100% !important; margin: 0 !important; }
.cart_totals tr.custom-coupon-row td button.button { flex-shrink: 0 !important; width: max-content !important; min-width: 120px !important; margin: 0 !important; height: 50px !important; width: auto !important; }
.custom-coupon-row input#coupon_code { width: 180px !important; margin: 0 !important; height: 40px !important; }

/* Ocultar cupones extra */
.woocommerce-cart form.woocommerce-cart-form .coupon,
.cart-collaterals > .coupon,
.woocommerce-cart .cart-collaterals .cart_totals + .coupon { display: none !important; }

/* Visibilidad Cupón Checkout */
.woocommerce-checkout .checkout_coupon,
.woocommerce-checkout .woocommerce-form-coupon-toggle { display: block !important; visibility: visible !important; }
.cupon-movido-wrapper { display: block !important; width: 100%; padding: 20px; background: #f9f9f9; border-top: 1px dashed #bbb; margin-top: 20px !important; }
.cart_totals .coupon { display: block !important; padding: 20px; background-color: #f9f9f9; border-radius: 8px; margin-top: 20px; }
.cart_totals .coupon input#coupon_code { width: 100% !important; margin-bottom: 10px; padding: 10px; }
.cart_totals .coupon button.button { width: 100% !important; display: block; }

/* Alineación Tabla Pedidos (Mi Cuenta) */
.woocommerce-account .woocommerce-orders-table th,
.woocommerce-account .woocommerce-orders-table td { vertical-align: middle !important; padding-top: 15px !important; padding-bottom: 15px !important; }
.woocommerce-account .woocommerce-orders-table th a,
.woocommerce-account .woocommerce-orders-table td a,
.woocommerce-account .woocommerce-orders-table td span,
.woocommerce-account .woocommerce-orders-table td time,
.woocommerce-account .woocommerce-orders-table td p { margin-bottom: 0 !important; margin-top: 0 !important; display: inline-block !important; line-height: 1.4 !important; vertical-align: middle !important; }
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-total { line-height: 1.2 !important; }
.woocommerce-account .woocommerce-orders-table td.woocommerce-orders-table__cell-order-total .amount { display: block !important; margin-bottom: 3px !important; }
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button { margin: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; vertical-align: middle !important; }


/* =========================================
   6. ÍNDICE DESPLEGABLE (ACORDEÓN)
   ========================================= */

.indice-desplegable { margin: 30px 0; border: 1px solid #eaeaea; border-radius: 8px; background-color: #fdfdfd; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.indice-boton { display: flex; justify-content: space-between; align-items: center; background-color: #03363D; color: #ffffff; padding: 16px 20px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; transition: background-color 0.3s; }
.indice-boton:hover { background-color: #022429; }
.indice-boton::-webkit-details-marker { display: none; }
.indice-icono { font-size: 12px; transition: transform 0.3s ease; }
.indice-desplegable[open] .indice-icono { transform: rotate(180deg); }
.indice-contenido { padding: 25px 20px; background-color: #ffffff; border-top: 1px solid #eaeaea; }
.indice-columnas { display: flex; flex-wrap: wrap; gap: 30px; }
.indice-col { flex: 1; min-width: 250px; }
.indice-col ul li { margin-bottom: 8px; }


/* =========================================
   7. FORMULARIOS Y ELEMENTOS VARIOS
   ========================================= */

.ml-form-horizontalRow button.primary { margin-bottom: -5px !important; height: 42px !important; display: inline-flex !important; align-items: center !important; }
.ml-form-horizontalRow input.form-control { height: 42px !important; margin-bottom: 0 !important; }
.ml-form-horizontalRow { display: flex !important; align-items: flex-end !important; gap: 10px !important; }

.wpcf7-form-control.wpcf7-select { border-radius: 50px !important; height: 55px !important; padding-left: 15px !important; padding-right: 15px !important; border: 1px solid #ccc !important; appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important; background-color: #ffffff !important; }
.wpcf7-form-control.wpcf7-select { background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') !important; background-repeat: no-repeat !important; background-position: right 15px top 50% !important; background-size: 12px auto !important; }


/* =========================================
   8. ESTRUCTURA Y VISUAL (ESTRELLAS, BORDES, ETC.)
   ========================================= */

/* Estrellas Amarillas y Alineadas */
.woocommerce .star-rating, .woocommerce .star-rating span { color: transparent !important; }
.woocommerce .star-rating::before, .woocommerce .star-rating span::before { color: #ffb400 !important; visibility: visible !important; }
.woocommerce .star-rating { overflow: hidden !important; font-family: 'star' !important; font-weight: 400 !important; font-style: normal !important; font-size: 1.2em !important; width: 5.4em !important; height: 1em !important; line-height: 1 !important; margin: 5px 0 !important; position: relative !important; }
.woocommerce .star-rating span { font-size: 1em !important; line-height: 1 !important; top: 0 !important; left: 0 !important; position: absolute !important; padding-top: 0 !important; }
.woocommerce .star-rating::before, .woocommerce .star-rating span::before { top: 0 !important; position: absolute !important; left: 0 !important; content: '\53\53\53\53\53'; }
p.stars a { color: #ffb400 !important; }
.count-review, .star-rating, .woocommerce-product-rating { display: none !important; }

/* Quitar Marco Negro Ficha Producto */
.woocommerce-product-gallery img, .woocommerce-product-gallery .flex-viewport, .woocommerce-product-gallery .woocommerce-product-gallery__image { border: none !important; box-shadow: none !important; }
.flex-control-thumbs img { border: none !important; box-shadow: none !important; }
.woocommerce div.product div.images { border: none !important; box-shadow: none !important; }

/* Separar texto línea vertical (Pestañas) */
@media (min-width: 768px) {
    .woocommerce div.product .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel { padding-left: 20px !important; }
}


/* =========================================
   9. VISTAS ESPECIALES Y REPARACIONES
   ========================================= */

/* Vista Rápida Blanca */
.woosq-popup .woosq-content, .woosq-popup .woosq-product, .woosq-popup .slick-list, .woosq-popup .slick-track { height: auto !important; min-height: 500px !important; }
.woosq-popup .woosq-product-image, .woosq-popup .woocommerce-product-gallery, .woosq-popup .slick-slide { background-color: #ffffff !important; padding: 0 !important; height: auto !important; display: flex !important; align-items: center !important; justify-content: center !important; border: none !important; }
.woosq-popup img.wp-post-image, .woosq-popup .woocommerce-product-gallery__image img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 80vh !important; object-fit: contain !important; margin: 0 auto !important; box-shadow: none !important; }
.woosq-popup .woosq-product-summary { align-self: center !important; }

/* Cross-Sells (Productos Relacionados) 4 Columnas */
.cart-collaterals .cross-sells ul.products, .cart-collaterals .cross-sells .slick-track { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 20px !important; width: 100% !important; transform: none !important; margin: 0 !important; }
.cart-collaterals .cross-sells ul.products li.product { width: 100% !important; max-width: 100% !important; margin-bottom: 0 !important; padding: 0 !important; flex: none !important; }
.cart-collaterals .cross-sells ul.products li.product img { width: 100% !important; height: auto !important; object-fit: cover !important; margin: 0 auto 10px auto !important; }
.cart-collaterals .cross-sells .slick-arrow, .cart-collaterals .cross-sells .slick-dots { display: none !important; }
@media (max-width: 768px) {
    .cart-collaterals .cross-sells ul.products, .cart-collaterals .cross-sells .slick-track { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
}

/* Fix Z-index y Clics (Ojos y Etiquetas) */
.awl-label-id-14403, .awl-label-id-14415, .awl-label-wrap, .awl-label-text, .advanced-woo-labels { pointer-events: none !important; }
.product-transition .group-action, .woosq-btn { pointer-events: auto !important; z-index: 999 !important; }


/* =========================================
   10. OCULTAR ELEMENTOS ESPECÍFICOS
   ========================================= */

/* Ocultar textitos molestos */
p.woocommerce-noreviews { display: none !important; }
.widget_product_categories .cat-item-15 { display: none !important; } /* Sin categoría */
.bookory-social-share { display: none !important; }

/* Ocultar Títulos Páginas */
.page-id-9081 .entry-title, .page-id-9081 .entry-header { display: none !important; } /* Tienda */
.page-id-14930 .entry-title, .page-id-14930 .page-header, .page-id-14930 h1.page-title { display: none !important; } /* Mira APP */
.page-id-6667 .entry-title, .page-id-6667 .page-header, .page-id-6667 h1.page-title { display: none !important; } /* Librerías */
.page-id-15138 .entry-header, .page-id-15138 .entry-title, .page-id-15138 h1.page-title { display: none !important; } /* Trabaja */

/* Limpieza Blog */
.bookory-meta-footer .categories-link { display: none !important; }
.elementor-widget-container .categories-link { display: none !important; }
.bookory-meta-footer { display: flex !important; width: 100% !important; justify-content: flex-end !important; }
.bookory-meta-footer .more-link-wrap { display: block !important; }

/* Ocultar Reseñas Ficha Producto */
#tab-description ol.commentlist, #tab-description .commentlist { display: none !important; }
#tab-description .woocommerce-Reviews-title { display: none !important; }
#tab-description .woocommerce-pagination { display: none !important; }
#tab-reviews #review_form_wrapper { display: none !important; }


/* =========================================
   11. AJUSTES MÓVILES GLOBALES Y ZENDESK
   ========================================= */

/* Ocultar Barra Inferior Elementor/Tema */
body .bookory-handheld-footer-bar, div.bookory-handheld-footer-bar, .handheld-footer-bar, #bookory-handheld-footer-bar { display: none !important; height: 0 !important; overflow: hidden !important; visibility: hidden !important; }
.elementor-element-5c1c1fa, .elementor-location-footer .elementor-section-wrap > .elementor-section.elementor-sticky--active { display: none !important; opacity: 0 !important; pointer-events: none !important; height: 0 !important; z-index: -1 !important; }
body { padding-bottom: 0 !important; margin-bottom: 0 !important; }

/* Ocultar Elementos Menú Escritorio */
@media (min-width: 1025px) {
    .solo-movil { display: none !important; }
    #menu-item-14503 { display: none !important; } /* Ocultar Zendesk en PC */
}

/* Ajustes Header Móvil */
@media (max-width: 768px) {
    .header-group-action .account-item, .header-group-action .my-account-icon, .header-group-action a[href*="my-account"] { display: none !important; }
    .header-group-action .wishlist-item, .header-group-action .wishlist-icon, .header-group-action a[href*="wishlist"] { display: none !important; }
    .header-group-action, .header-group-action .cart-item, .header-group-action .cart-contents { display: inline-flex !important; visibility: visible !important; opacity: 1 !important; }
}

/* Zendesk Móvil */
@media (max-width: 1024px) {
    .elementor-nav-menu--dropdown .elementor-item, .elementor-nav-menu--dropdown a { padding-left: 40px !important; padding-right: 40px !important; }
    .elementor-nav-menu--dropdown { padding: 20px 0 !important; }
    
    #menu-item-14503 { display: block !important; width: 100% !important; box-sizing: border-box !important; margin-top: 25px !important; margin-bottom: 25px !important; padding-left: 20px !important; padding-right: 20px !important; }
    #menu-item-14503 a { background-color: #03363D !important; color: #ffffff !important; width: 100% !important; display: flex !important; justify-content: center !important; align-items: center !important; padding: 15px 0 !important; font-weight: 700 !important; font-size: 16px !important; text-align: center !important; }
    #menu-item-14503 a:active { background-color: #044b55 !important; }
}


/* =========================================
   12. EXTRAS (WISHLIST, BANNER, FUENTES)
   ========================================= */

/* Fuente Global */
body, h1, h2, h3, h4, h5, h6, p, a, span, li, input, button, select, textarea { font-family: 'Source Sans 3', sans-serif !important; }
body, p, li, span, label, .woocommerce-product-details__short-description, .woocommerce-Tabs-panel--description, .product_meta, .elementor-widget-text-editor { line-height: 1.6 !important; }
p { margin-bottom: 15px !important; }
h1, h2, h3, h4, h5, h6 { margin-bottom: 15px !important; line-height: 1.3 !important; }
.elementor-icon-list-item, .elementor-icon-list-text, .menu-item a { line-height: 1.5 !important; }
.elementor-icon-list-item { padding-bottom: 10px !important; margin-bottom: 0 !important; }
.elementor-icon-list-text { display: inline-block !important; vertical-align: middle !important; padding-left: 0 !important; }

/* Banner Rojo Animado */
.banner-rojo-animado { position: relative; overflow: hidden; }
.banner-rojo-animado img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.banner-rojo-animado:hover img { transform: scale(1.03); }

/* Wishlist Botón */
.woosw-popup .stock, .woosw-list .stock { display: none !important; }
.woosw-popup .woosw-item .button, .woosw-list .woosw-item .button { background-color: #03363D !important; color: #ffffff !important; border-radius: 50px !important; border: none !important; font-size: 13px !important; font-weight: 600 !important; text-transform: none !important; height: 42px !important; width: auto !important; min-width: 150px !important; padding: 0 30px !important; margin: 10px auto 0 auto !important; white-space: nowrap !important; display: flex !important; justify-content: center !important; align-items: center !important; line-height: 1 !important; }
.woosw-popup .woosw-item .button:hover, .woosw-list .woosw-item .button:hover { background-color: #17494d !important; transform: translateY(-1px); text-decoration: none !important; }

/* Ocultar monto carrito cabecera */
.header-group-action .cart-item .amount, .header-group-action .cart-item .woocommerce-Price-amount, .header-group-action .cart-contents .woocommerce-Price-amount { display: none !important; }

/* Detalles IVA */
.order-total td { display: flex !important; flex-direction: column !important; align-items: flex-end !important; padding-top: 15px !important; }
.order-total .amount { font-size: 24px !important; font-weight: 700 !important; color: #03363D !important; line-height: 1 !important; }
.order-total .includes_tax { font-size: 13px !important; color: #888 !important; font-weight: 400 !important; margin-top: 8px !important; text-align: right !important; width: 100% !important; }
.order-total .includes_tax .amount { font-size: 13px !important; color: #888 !important; font-weight: inherit !important; display: inline !important; }

/* Etiquetas Inventario Ficha */
.single-product .inventory_status { font-size: 16px !important; font-weight: 700 !important; text-transform: uppercase !important; padding: 8px 16px !important; border-radius: 4px !important; display: inline-block !important; margin-bottom: 15px !important; line-height: 1 !important; }
.single-product .inventory_status.out-of-stock, .stock.out-of-stock { background-color: #ffeff0 !important; color: #d63638 !important; border: 1px solid #d63638 !important; }
.single-product .inventory_status.in-stock, .stock.in-stock { background-color: #e8f5e9 !important; color: #2e7d32 !important; border: 1px solid #2e7d32 !important; }
.single-product .entry-summary-top { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: space-between !important; align-items: center !important; width: 100% !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.single-product .entry-summary-top .product-nav, .single-product .entry-summary-top .pagination-prev, .single-product .entry-summary-top .pagination-next, .single-product .entry-summary-top a[rel="prev"], .single-product .entry-summary-top a[rel="next"] { order: 2 !important; margin-bottom: 0 !important; }
.advanced-woo-labels { width: 100% !important; flex: 0 0 100% !important; margin-top: 8px !important; order: 3 !important; display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
.awl-label-wrap, .single-product .inventory_status { margin-bottom: 8px !important; float: none !important; display: inline-block !important; }
.single-product .entry-summary-top .inventory_status { margin-bottom: 0 !important; }
body.single-product, body.single-product .site-content, body.single-product .product { background-color: #ffffff !important; background: #ffffff !important; }
.related.products h2 { margin-bottom: 35px !important; margin-top: 40px !important; font-size: 24px !important; }

/* =========================================
   13. ALINEACIÓN DE BOTONES Y PRECIOS JUNTOS (SOLO MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Convertir la tarjeta en columna */
    .woocommerce ul.products li.product {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important; 
    }

    /* 2. El área de texto ocupa el espacio sobrante para empujar todo hacia abajo */
    .woocommerce ul.products li.product .product-caption,
    .woocommerce ul.products li.product .product-details {
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
    }

    /* 3. Fijar la caja de precio al fondo con altura estricta */
    .woocommerce ul.products li.product .price {
        margin-top: auto !important; 
        min-height: 46px !important; /* Altura exacta para 2 precios pegaditos */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important; 
        margin-bottom: 8px !important;
    }
    
    /* 4. JUNTAR LOS PRECIOS (Rojo y Gris) */
    .woocommerce ul.products li.product .price ins,
    .woocommerce ul.products li.product .price > .woocommerce-Price-amount:last-child {
        margin-bottom: -3px !important; /* Margen negativo para acercar el rojo al gris de abajo */
        line-height: 1 !important;
    }
    
    .woocommerce ul.products li.product .price del {
        line-height: 1 !important;
        margin-top: 0 !important;
    }
}

/* 1. FULMINAR EL CARRUSEL ORIGINAL DE BOOKORY */
.woocommerce-cart .cross-sells {
    display: none !important;
}

/* 2. ESTILOS PARA NUESTRA NUEVA GRILLA PERFECTA DE 4 */
.mis-cross-sells-limpios {
    margin-top: 50px;
    width: 100%;
    max-width: 850px !important; 
    clear: both;
}

.mis-cross-sells-limpios h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #03363D !important;
    margin-bottom: 25px !important;
}

.mis-cross-sells-limpios ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.mis-cross-sells-limpios ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* En móviles baja a 2 columnas */
@media (max-width: 768px) {
    .mis-cross-sells-limpios ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}




/* =========================================
   DIRECCIONES: LA ILUSIÓN ÓPTICA (EL BOTÓN FINAL) 🪄
   ========================================= */

/* 1. La grilla (Esto ya no se toca, quedó perfecto) */
body .woocommerce-MyAccount-content .woocommerce-Addresses.col2-set {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; 
    gap: 40px !important; 
    width: 100% !important;
    align-items: start !important;
}

/* 2. Ancla en las columnas (.col-1 y .col-2) */
body .woocommerce-MyAccount-content .woocommerce-Addresses.col2-set .col-1,
body .woocommerce-MyAccount-content .woocommerce-Addresses.col2-set .col-2 {
    position: relative !important; 
    padding-bottom: 55px !important; /* Espacio para el botón */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* 3. Textos protegidos */
body .woocommerce-MyAccount-content .woocommerce-Addresses.col2-set address {
    width: 100% !important;
    word-break: normal !important;
    white-space: normal !important;
    line-height: 1.6 !important;
    display: block !important;
}

/* 4. Título en su lugar */
body .woocommerce-MyAccount-content .woocommerce-Address-title {
    display: block !important;
    margin-bottom: 15px !important;
    width: 100% !important;
}

body .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
    margin: 0 !important;
    float: none !important;
}

/* 5. EL BOTÓN (Escondiendo la basura fuera de la pantalla) */
body .woocommerce-MyAccount-content .woocommerce-Address-title a.edit {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    
    /* Caja rígida e inamovible */
    width: 105px !important;
    height: 38px !important;
    background-color: #03363D !important;
    border-radius: 50px !important;
    
    /* LA MAGIA: Empujamos el texto largo feo fuera del botón */
    text-indent: 500px !important; 
    white-space: nowrap !important;
    overflow: hidden !important; /* Corta y esconde el texto empujado */
    
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: background-color 0.3s ease !important;
}

body .woocommerce-MyAccount-content .woocommerce-Address-title a.edit:hover {
    background-color: #022429 !important;
}

/* 6. EL STICKER NUEVO (Se pone encima del botón vacío) */
body .woocommerce-MyAccount-content .woocommerce-Address-title a.edit::after {
    content: "\270E   Editar" !important; /* Ícono de lápiz + Editar */
    
    /* Lo pegamos exactamente cubriendo todo el botón */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* Cancelamos la patada para que este texto SÍ se quede al centro */
    text-indent: 0 !important; 
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    color: #ffffff !important;
    font-family: 'Source Sans 3', sans-serif, Arial !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* Limpiamos por si el tema quiere meter su propio ícono raro */
body .woocommerce-MyAccount-content .woocommerce-Address-title a.edit::before {
    display: none !important;
}

/* 7. Móvil */
@media (max-width: 768px) {
    body .woocommerce-MyAccount-content .woocommerce-Addresses.col2-set {
        grid-template-columns: 1fr !important; 
        gap: 30px !important;
    }
}

/* ELIMINA LA FILA COMPLETA DEL IVA EN CARRITO Y PAGO */
tr.tax-rate, 
.cart-tax-total,
.includes_tax {
    display: none !important;
}

/* POR SI ACASO APARECE EL TEXTO JUNTO AL TOTAL */
.amount + .woocommerce-price-suffix {
    display: none !important;
}
/* ELIMINAR TEXTO "INCLUDING TAXES" EN BLOQUES DE CHECKOUT 🎯 */
.wc-block-components-totals-footer-item-tax,
.wc-block-components-totals-item__tax-line,
p.wc-block-components-totals-footer-item-tax {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Marco sutil y color corporativo para el éxito del pedido */
.woocommerce-notice--success.woocommerce-thankyou-order-received {
    background-color: transparent !important;
    border: 1px solid #d1dce0 !important;
    color: #03363d !important;
    padding: 40px 20px !important;
    text-align: center !important;
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
    max-width: 800px;
    margin: 40px auto !important;
    border-radius: 4px !important;
}

/* Estilo para la primera línea del mensaje */
.woocommerce-notice--success.woocommerce-thankyou-order-received::first-line {
    font-weight: 700 !important;
    font-size: 1.4rem !important;
    color: #03363d !important;
}
