/*
Theme Name: TPVbox Theme
Theme URI: https://tpvbox.com/
Author: Klaropos Tech, SL
Author URI: https://tpvbox.com/
Description: Tema de alto rendimiento B2B optimizado para ecommerce de hardware TPV, terminales táctiles, impresoras térmicas y lectores, libre de bloatware y con soporte HPOS nativo.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hipertpv
*/

:root {
    /* Sistema de diseño de variables CSS (aprobado en fase de prototipos) */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-muted: #f1f5f9;
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #eeebff;
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Global & Tipografía */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-weight: 700;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Clases de Contenedor */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}



/* ==========================================================================
   6. DISEÑO DE CARRITO, CHECKOUT Y MI CUENTA B2B
   ========================================================================== */

/* 6.1. Barra de Pasos de Compra (Checkout Steps) */
.checkout-steps-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.checkout-steps-bar .step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.checkout-steps-bar .step span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-muted);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--border-color);
}

.checkout-steps-bar .step.active {
    color: var(--accent);
}

.checkout-steps-bar .step.active span {
    background-color: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.checkout-steps-bar .step.checked {
    color: var(--success);
}

.checkout-steps-bar .step.checked span {
    background-color: var(--success-light);
    color: var(--success);
    border-color: var(--success);
}

.checkout-steps-bar .step-line {
    flex-grow: 1;
    height: 2px;
    background-color: var(--border-color);
    margin: 0 16px;
}

.checkout-steps-bar .step-line.active {
    background-color: var(--accent);
}

/* 6.2. Carrito de la Compra B2B (Presupuestador) */
.cart-b2b-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-top: 24px;
}

@media (max-width: 991px) {
    .cart-b2b-wrapper {
        grid-template-columns: 1fr;
    }
}

.cart-main-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Tabla del Carrito Estilizada */
table.shop_table.cart {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table.shop_table.cart th {
    background-color: var(--bg-muted);
    color: var(--primary);
    font-weight: 700;
    padding: 16px 20px;
    font-family: 'Outfit';
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

table.shop_table.cart td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

table.shop_table.cart tr:last-child td {
    border-bottom: none;
}

.cart_item .product-remove a.remove {
    font-size: 24px;
    color: #ef4444;
    font-weight: 400;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.cart_item .product-remove a.remove:hover {
    background-color: rgba(239, 68, 68, 0.08);
}

.cart_item .product-thumbnail img {
    max-width: 60px;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.cart_item .product-name a {
    font-weight: 700;
    color: var(--primary);
    font-family: 'Outfit';
    font-size: 15px;
}

.cart_item .product-price, .cart_item .product-subtotal {
    font-weight: 600;
    color: var(--text-main);
    font-size: 14.5px;
}

.cart_item .product-subtotal {
    color: var(--accent);
    font-weight: 700;
}

/* Controles de Cantidad WooCommerce */
.cart_item .quantity input.qty {
    width: 60px;
    height: 38px;
    padding: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Cupón y Botón de Actualizar */
.actions {
    background-color: var(--bg-muted);
}

.actions .coupon {
    float: left;
    display: flex;
    gap: 10px;
}

.actions .coupon input.input-text {
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}

.actions button.button {
    height: 42px;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    font-family: 'Outfit';
    padding: 0 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.actions button.button:hover {
    background-color: var(--primary-light);
}

.actions button.update-cart-btn {
    float: right;
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.actions button.update-cart-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* Buscador de SKU Express */
.quick-sku-add-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.quick-sku-add-panel h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 8px;
}

.quick-sku-add-panel p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.sku-search-group {
    display: flex;
    gap: 16px;
}

.sku-search-group input[type="text"] {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
}

.sku-search-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

.sku-search-group input[type="number"] {
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.btn-sku-add {
    background-color: var(--accent) !important;
    color: white !important;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 24px;
    cursor: pointer;
    font-family: 'Outfit';
    font-size: 14px;
    transition: var(--transition);
}

.btn-sku-add:hover {
    background-color: var(--accent-hover) !important;
}

/* Sugerencias de búsqueda por SKU */
.sku-suggestions-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    z-index: 50;
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
}

.sku-suggestion-row {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    border-bottom: 1px solid var(--bg-muted);
    transition: var(--transition);
}

.sku-suggestion-row:last-child {
    border-bottom: none;
}

.sku-suggestion-row:hover {
    background-color: var(--bg-muted);
}

.sku-suggestion-row strong {
    color: var(--accent);
}

.sku-suggestion-row .sug-price {
    float: right;
    font-weight: 700;
    color: var(--primary);
}

/* Sidebar Totales & Renting */
.cart-collaterals-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cart-totals-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.cart-totals-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

/* Botón de Impresión PDF */
.quote-actions-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-print-quote {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-weight: 700;
    font-family: 'Outfit';
    font-size: 13.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.15);
}

.btn-print-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.25);
}

.btn-print-quote svg {
    width: 18px;
    height: 18px;
}

.quote-notice {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}

/* Widget GRENKE */
.grenke-cart-widget {
    background-color: #0f172a;
    background: radial-gradient(circle at 100% 0%, #1e1b4b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.grenke-badge-top {
    position: absolute;
    top: 14px;
    right: -25px;
    background-color: var(--success);
    color: white;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 25px;
    transform: rotate(45deg);
}

.grenke-title-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 12px;
}

.grenke-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: white;
}

.grenke-text {
    font-size: 13px;
    color: #a5b4fc;
}

.grenke-cart-widget h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 8px;
}

.grenke-cart-widget p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 18px;
}

.grenke-rates-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rate-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-preview-item span {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
}

.rate-preview-item strong {
    color: var(--success);
    font-size: 14px;
    font-family: 'Outfit';
}

.grenke-perks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* 6.3. Checkout B2B */
.checkout-b2b-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    margin-top: 24px;
}

@media (max-width: 991px) {
    .checkout-b2b-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-details-column {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.checkout-sidebar-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review-heading {
    font-size: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 0px;
}

/* Alerta de Exención de IVA */
.tax-exemption-alert {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease;
    margin-bottom: 10px;
}

.tax-exemption-alert .alert-icon {
    width: 20px;
    height: 20px;
    background-color: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.tax-exemption-alert .alert-content {
    font-size: 12px;
    line-height: 1.4;
    color: var(--success-dark);
}

.tax-exemption-alert .alert-content strong {
    display: block;
    font-family: 'Outfit';
    margin-bottom: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ficha de Pedido en Revisión */
.woocommerce-checkout-review-order {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Estilos de inputs de checkout estándar de WooCommerce */
.woocommerce-checkout .form-row {
    margin-bottom: 20px;
}

.woocommerce-checkout label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
    margin-bottom: 6px;
}

.woocommerce-checkout input.input-text, .woocommerce-checkout select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    transition: var(--transition);
}

.woocommerce-checkout input.input-text:focus, .woocommerce-checkout select:focus {
    outline: none;
    border-color: var(--accent);
}

.woocommerce-checkout select {
    background: white;
}

/* 6.4. Mi Cuenta B2B Portal (Layout Robusto de 2 Columnas) */
.woocommerce-account .woocommerce {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
    clear: both !important;
}

.logged-in .woocommerce:has(.woocommerce-MyAccount-navigation),
.woocommerce-account.logged-in .woocommerce {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 32px !important;
}

.woocommerce-MyAccount-navigation,
.b2b-account-navigation {
    flex: 0 0 280px !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
    float: none !important;
    box-sizing: border-box !important;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 18px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.woocommerce-MyAccount-content {
    flex: 1 1 auto !important;
    width: calc(100% - 312px) !important;
    min-width: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.b2b-dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
}

@media (max-width: 900px) {
    .logged-in .woocommerce:has(.woocommerce-MyAccount-navigation),
    .woocommerce-account.logged-in .woocommerce {
        flex-direction: column !important;
    }
    .woocommerce-MyAccount-navigation,
    .b2b-account-navigation,
    .woocommerce-MyAccount-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    .b2b-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* (Estilos de Mi Cuenta B2B unificados al final del archivo) */

/* ==========================================================================
   7. REGLAS DE IMPRESIÓN EXCLUSIVAS PARA PDF / PRESUPUESTO COMERCIAL B2B
   ========================================================================== */
@media print {
    /* Ocultar elementos interactivos en papel */
    .site-header, 
    .site-footer, 
    .checkout-steps-bar, 
    .quick-sku-add-panel, 
    .quote-notice, 
    .actions, 
    .product-remove, 
    .cart-collaterals-sidebar,
    .btn-print-quote,
    .update-cart-btn,
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info,
    .company-badge-card {
        display: none !important;
    }

    /* Reset para imprimir ancho total */
    body {
        background-color: white !important;
        color: #000000 !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 11pt !important;
        background: none !important;
    }

    .container, .cart-b2b-wrapper, .cart-main-content, .woocommerce, .woocommerce-cart-form {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    /* Mostrar la cabecera imprimible */
    .print-only-quote-header {
        display: block !important;
        width: 100% !important;
    }

    /* Formato de tabla de presupuesto */
    table.shop_table.cart {
        border: 1px solid #94a3b8 !important;
        border-radius: 0px !important;
        box-shadow: none !important;
        width: 100% !important;
        margin-top: 20px !important;
        border-collapse: collapse !important;
    }

    table.shop_table.cart th {
        background-color: #f1f5f9 !important;
        color: #000000 !important;
        border-bottom: 2px solid #475569 !important;
        font-size: 10pt !important;
        padding: 10px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    table.shop_table.cart td {
        border-bottom: 1px solid #cbd5e1 !important;
        padding: 12px 10px !important;
        font-size: 10pt !important;
    }

    /* Ocultar miniaturas en papel */
    .product-thumbnail {
        display: none !important;
    }

    .cart_item .product-name a {
        color: #000000 !important;
        text-decoration: none !important;
        font-size: 11pt !important;
        font-weight: 700 !important;
    }

    .product-quantity input.qty {
        border: none !important;
        background: transparent !important;
        font-size: 10pt !important;
        text-align: left !important;
        width: auto !important;
    }

    .product-price, .product-subtotal {
        color: #000000 !important;
        font-weight: bold !important;
    }

    /* Totales del presupuesto */
    .cart-totals-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-top: 30px !important;
        page-break-inside: avoid;
    }

    .cart-totals-card h2 {
        font-size: 13pt !important;
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 6px !important;
        font-family: 'Outfit', sans-serif !important;
    }

    .cart-totals-card table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .cart-totals-card table th, .cart-totals-card table td {
        padding: 8px 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 10pt !important;
    }

    /* Firma y Conformidad */
    body::after {
        content: "\n\n\n\n\n_____________________________________\nFirma del Cliente y Sello de la Empresa\nAceptación de Oferta Técnica B2B";
        white-space: pre-wrap;
        display: block;
        margin-top: 60px;
        text-align: right;
        font-size: 10pt;
        color: #475569;
        page-break-inside: avoid;
        font-family: 'Inter', sans-serif;
    }
}

/* ==========================================================================
   BARRA SUPER-TOP (Promo y Utilidades B2B)
   ========================================================================== */
.super-top-bar {
    background-color: var(--primary); /* #0f172a, slate navy */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 0;
    color: #cbd5e1; /* slate-300 */
    font-size: 12px;
    font-weight: 500;
}

.super-top-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.super-top-left, .super-top-center, .super-top-right {
    display: flex;
    align-items: center;
}

.super-top-badge-sla {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success); /* #10b981 */
    font-weight: 600;
}

.super-top-badge-sla svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.super-top-promo {
    color: #f8fafc; /* white/slate-50 */
}

.super-top-promo strong {
    color: var(--warning); /* gold/amber */
}

.super-top-phone {
    white-space: nowrap;
}

.super-top-phone a {
    color: white;
    font-weight: 700;
    margin-left: 4px;
    transition: var(--transition);
}

.super-top-phone a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Responsividad para la Barra Super-Top */
@media (max-width: 991px) {
    .super-top-wrapper {
        justify-content: center;
        gap: 16px;
    }
    .super-top-left, .super-top-right {
        display: none !important; /* Ocultar en tablets y móviles para dar espacio al banner */
    }
}

/* ==========================================================================
   CART DRAWER LATERAL (Panel Lateral de Cesta B2B)
   ========================================================================== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px; /* Ancho del drawer + margen de seguridad */
    width: 400px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.1);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(-420px);
}

@media (max-width: 480px) {
    .cart-drawer {
        width: 100vw;
        right: -100vw;
    }
    .cart-drawer.active {
        transform: translateX(-100vw);
    }
}

.cart-drawer-body {
    background-color: var(--bg-card);
    overflow-y: auto;
}

/* Scrollbar estilizada para el listado de productos */
.cart-drawer-items::-webkit-scrollbar {
    width: 5px;
}
.cart-drawer-items::-webkit-scrollbar-track {
    background: transparent;
}
.cart-drawer-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.cart-drawer-items::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Efectos y micro-animaciones para el listado del panel */
.cart-drawer-item {
    transition: background-color 0.2s ease;
}
.cart-drawer-item:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

.cart-drawer-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.cart-drawer-item-title a {
    text-decoration: none;
    transition: color 0.2s;
}
.cart-drawer-item-title a:hover {
    color: var(--accent) !important;
}

.cart-drawer-item-remove {
    transition: transform 0.2s ease, color 0.2s ease !important;
}
.cart-drawer-item-remove:hover {
    transform: scale(1.2);
    color: #dc2626 !important;
}

.drawer-qty-btn {
    transition: background-color 0.2s, color 0.2s;
}
.drawer-qty-btn:hover {
    background-color: rgba(79, 70, 229, 0.08) !important;
    color: var(--accent) !important;
}

.cart-drawer-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: var(--transition);
}

.cart-drawer-actions .btn-view-order {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.cart-drawer-actions .btn-view-order:hover {
    background-color: var(--bg-muted);
    border-color: var(--text-muted);
    color: var(--primary) !important;
}

.cart-drawer-actions .btn-print-quote {
    color: white !important;
    border: none;
    cursor: pointer;
}
.cart-drawer-actions .btn-print-quote:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35) !important;
}

/* Estilos para el Grupo de Acciones B2B en Cabecera (Usabilidad) */
.site-header .header-actions-group {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

.site-header .header-nav-link {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    font-family: 'Outfit', sans-serif !important;
    text-decoration: none !important;
    transition: var(--transition) !important;
}

.site-header .header-nav-link:hover {
    color: var(--accent) !important;
}

.site-header .header-badge-sla {
    background-color: var(--success-light) !important;
    color: var(--success-dark) !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.site-header .header-phone-compact {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.site-header .header-phone-compact span {
    color: var(--accent) !important;
    font-weight: 700 !important;
}

.site-header .header-icon-link {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    color: var(--text-main) !important;
    background-color: var(--bg-muted) !important;
    border: 1px solid var(--border-color) !important;
    transition: var(--transition) !important;
    text-decoration: none !important;
}

.site-header .header-icon-link:hover {
    background-color: var(--accent-light) !important;
    color: var(--accent) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
}

.site-header .header-icon-link svg {
    width: 20px !important;
    height: 20px !important;
}

.site-header .header-cart-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background-color: var(--accent) !important;
    color: white !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 50px !important;
    line-height: 1 !important;
    border: 2px solid var(--bg-card) !important;
    display: inline-block !important;
}

@media (max-width: 991px) {
    .site-header .header-wrapper {
        flex-wrap: wrap !important;
        gap: 16px !important;
        justify-content: space-between !important;
    }
    .site-header .header-actions-group {
        order: 2 !important;
    }
}

@media (max-width: 768px) {
    .site-header .header-phone-compact,
    .site-header .header-badge-sla {
        display: none !important;
    }
}


/* Estilos para el Buscador Global en el Header */
.site-header .header-search-wrapper {
    position: relative !important;
    max-width: 480px !important;
    width: 100% !important;
    display: block !important;
}

.site-header .header-search-wrapper form {
    display: flex !important;
    align-items: center !important;
    background-color: var(--bg-muted) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 50px !important;
    padding: 2px 14px !important;
    transition: var(--transition) !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
}

.site-header .header-search-wrapper form:focus-within {
    border-color: var(--accent) !important;
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

.site-header .header-search-wrapper input.search-field {
    border: none !important;
    background: transparent !important;
    height: 34px !important;
    padding: 0 !important;
    font-size: 13px !important;
    width: 100% !important;
    color: var(--text-main) !important;
    font-family: inherit !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.site-header .header-search-wrapper input.search-field:focus {
    outline: none !important;
}

.site-header .header-search-wrapper button.search-submit {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    transition: var(--transition) !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
}

.site-header .header-search-wrapper button.search-submit:hover {
    color: var(--accent) !important;
}

.site-header .header-search-wrapper button.search-submit svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
}

/* Sugerencias de Búsqueda Global */
.header-search-dropdown {
    position: absolute !important;
    top: 45px !important;
    left: 0 !important;
    right: 0 !important;
    background-color: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-lg) !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    z-index: 999 !important;
    padding: 4px 0 !important;
}

.header-search-row {
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    border-bottom: 1px solid var(--bg-muted) !important;
    transition: var(--transition) !important;
    text-align: left !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.header-search-row:last-child {
    border-bottom: none !important;
}

.header-search-row:hover {
    background-color: var(--accent-light) !important;
    color: var(--accent) !important;
}

.header-search-row strong {
    color: var(--primary) !important;
}

.header-sug-price {
    font-weight: 700 !important;
    color: var(--success) !important;
}

@media (max-width: 991px) {
    .site-header .header-search-wrapper {
        max-width: 100% !important;
        order: 4 !important;
        margin-top: 8px !important;
    }
}







/* Header & Menú de Navegación */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   LOGOTIPO TIPOGRÁFICO MINIMALISTA DUOTONO (tpvbox.com)
   ========================================================================== */
.logo-brand-tpvbox, .logo-area {
    display: inline-flex;
    align-items: baseline;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    letter-spacing: -0.04em;
    user-select: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-brand-tpvbox:hover, .logo-area:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.logo-brand-tpvbox .logo-text-tpv {
    color: var(--primary, #0f172a);
    font-weight: 900;
    letter-spacing: -0.045em;
}

.logo-brand-tpvbox .logo-text-box {
    color: var(--accent, #4f46e5);
    font-weight: 900;
    letter-spacing: -0.045em;
}

.logo-brand-tpvbox .logo-text-domain {
    font-size: 0.58em;
    font-weight: 700;
    color: #64748b;
    letter-spacing: -0.02em;
    margin-left: 2px;
}

/* Versión Dark para Pie de Página / Fondos Oscuros */
.logo-brand-tpvbox--dark .logo-text-tpv {
    color: #ffffff !important;
}

.logo-brand-tpvbox--dark .logo-text-box {
    color: #818cf8 !important;
}

.logo-brand-tpvbox--dark .logo-text-domain {
    color: #94a3b8 !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-badge-sla {
    background-color: var(--success-light);
    color: var(--success-dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-badge-sla svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.contact-phone {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.contact-phone span {
    color: var(--accent);
    font-weight: 700;
}

/* Footer & Tarjeta de Confianza B2B */
.site-footer {
    background-color: var(--primary);
    color: white;
    padding: 48px 0 24px;
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 32px;
    margin-bottom: 24px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 13.5px;
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.4);
}

.footer-bottom-links a:hover {
    color: white;
}

/* ==========================================================================
   5. DISEÑO DE LA PORTADA (HOME PAGE) PREMIUM B2B
   ========================================================================== */

/* 5.1. Sección Hero */
.hero-section {
    padding: 60px 0;
    background-color: var(--primary);
    background: radial-gradient(circle at 80% 20%, #1e1b4b 0%, var(--primary) 100%);
    color: white;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.hero-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background-color: rgba(79, 70, 229, 0.15);
    padding: 6px 12px;
    border-radius: 50px;
    align-self: flex-start;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.hero-content h1 {
    color: white;
    font-size: 40px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-lead {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.hero-guarantees {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 10px 0;
}

.hero-guarantees li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.g-icon {
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-guarantees strong {
    display: block;
    font-size: 14px;
    color: white;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 2px;
}

.hero-guarantees span {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

/* 5.2. Hero Visual */
.hero-visual-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.hero-glowing-back {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--accent) 0%, rgba(79, 70, 229, 0) 70%);
    opacity: 0.35;
    filter: blur(40px);
    z-index: 1;
}

.tpv-visual-stack {
    position: relative;
    width: 300px;
    height: 250px;
    z-index: 2;
}

.visual-screen-back {
    width: 200px;
    height: 130px;
    background-color: #1e293b;
    border: 6px solid #475569;
    border-radius: 8px;
    position: absolute;
    top: 15px;
    left: 20px;
    opacity: 0.4;
    transform: rotateY(-25deg) rotateX(15deg);
    z-index: 1;
}

.visual-base {
    width: 140px;
    height: 90px;
    background-color: #334155;
    position: absolute;
    bottom: 20px;
    left: 80px;
    z-index: 2;
    border-radius: 6px;
    transform: rotateX(25deg);
    border-bottom: 4px solid #1e293b;
}

.visual-screen-front {
    width: 240px;
    height: 150px;
    background: linear-gradient(135deg, var(--accent) 0%, #312e81 100%);
    border: 6px solid #334155;
    border-radius: 8px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 8px;
}

.screen-brand {
    font-family: 'Outfit';
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.05em;
}

.screen-price {
    font-size: 12px;
    background-color: var(--success);
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 600;
}

.floating-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
}

.badge-1 { top: -10px; right: -10px; border-color: rgba(16, 185, 129, 0.3); }
.badge-2 { bottom: 60px; left: -30px; }
.badge-3 { bottom: -20px; right: 40px; }

/* 5.3. Categorías Grid */
.categories-section {
    padding: 80px 0;
    background-color: var(--bg-body);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.cat-icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-icon-wrapper svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.category-card h3 {
    font-size: 18px;
    color: var(--primary);
}

.category-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

.cat-pricing {
    font-size: 12.5px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.cat-pricing strong {
    color: var(--primary);
}

.cat-action {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

/* 5.4. Familias Destacadas */
.featured-section {
    padding: 80px 0;
    background-color: white;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.families-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.family-home-card {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.family-home-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.family-home-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 40px;
    z-index: 10;
}

.family-home-visual {
    height: 200px;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tpv-mini-visual {
    width: 140px;
    height: 110px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.family-home-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.family-home-info h3 {
    font-size: 19px;
}

.family-home-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    flex-grow: 1;
}

.family-home-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background-color: white;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.price-type {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-type span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.price-type strong {
    font-size: 16px;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

.price-type small {
    font-weight: normal;
    font-size: 10px;
    color: var(--text-muted);
}

.success-highlight strong {
    color: var(--success);
}

.btn-family-link {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 13.5px;
}

.btn-family-link:hover {
    background-color: var(--primary-light);
    color: white;
}

/* 5.5. Calculadora de Renting en Portada */
.renting-calculator-section {
    padding: 80px 0;
    background-color: var(--primary);
    background: radial-gradient(circle at 10% 80%, #0f172a 0%, #1e1b4b 100%);
    color: white;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.calc-info-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.15);
    padding: 6px 12px;
    border-radius: 50px;
    align-self: flex-start;
}

.calc-info-col h2 {
    color: white;
    font-size: 36px;
}

.calc-info-col p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
}

.calc-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.calc-feat-item {
    border-left: 3px solid var(--success);
    padding-left: 16px;
}

.calc-feat-item strong {
    display: block;
    font-size: 14.5px;
    color: white;
    font-family: 'Outfit';
    margin-bottom: 4px;
}

.calc-feat-item span {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.calc-widget-card {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    color: var(--text-main);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.widget-header h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.widget-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.widget-slider-group {
    margin: 24px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-labels span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.slider-labels strong {
    font-size: 22px;
    color: var(--primary);
    font-family: 'Outfit';
    font-weight: 800;
}

.home-calc-range {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    outline: none;
    border-radius: 10px;
    -webkit-appearance: none;
}

.home-calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

.slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.widget-tabs-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.month-tab-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    padding: 10px;
    font-family: 'Inter';
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.month-tab-btn.active {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.widget-result-box {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    margin-bottom: 24px;
}

.widget-result-box span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--success-dark);
}

.widget-result-box h2 {
    color: var(--success);
    font-size: 28px;
    margin-top: 4px;
    font-family: 'Outfit';
    font-weight: 800;
}

.widget-result-box h2 span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: none;
}

.widget-scoring-simulation {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.widget-scoring-simulation h4 {
    font-size: 13.5px;
    margin-bottom: 4px;
}

.btn-scoring-home {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit';
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    width: 100%;
}

.btn-scoring-home:hover {
    background-color: var(--accent-hover);
}

/* 5.6. FAQ Accordion en Home */
.home-faq-section {
    padding: 80px 0;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.faq-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-body);
}

.faq-accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    cursor: pointer;
    text-align: left;
}

.faq-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.faq-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    background-color: white;
}

.faq-accordion-panel p {
    padding: 20px;
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
}

/* Responsividad para móviles */
@media (max-width: 900px) {
    .hero-grid, .calculator-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-visual-wrapper {
        min-height: 300px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   6. PESTAÑAS DE LA GAMA DE PRODUCTOS (HUB)
   ========================================================================== */

/* Contenedor y Pestañas */
.tab-content-bottom {
    display: none;
    animation: fadeInTab 0.25s ease-in-out;
}

.tab-content-bottom.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-btn-bottom.active {
    color: var(--accent) !important;
    background-color: white !important;
}

.tab-btn-bottom.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
}

/* Pestaña de Accesorios */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 24px;
}

.accessory-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: white;
    transition: var(--transition);
}

.accessory-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.accessory-visual {
    width: 100%;
    height: 100px;
    background-color: var(--bg-body);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.accessory-visual svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.accessory-card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary);
    line-height: 1.3;
}

.accessory-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
    flex-grow: 1;
}

.accessory-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}

.accessory-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    font-family: 'Outfit';
}

.btn-add-accessory {
    background-color: var(--accent-light);
    color: var(--accent);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-add-accessory:hover {
    background-color: var(--accent);
    color: white;
}

/* Pestaña de Descargas */
.download-item-card:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--shadow-md);
    background-color: white !important;
}

/* Pestaña de Opiniones */
.reviews-summary-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.reviews-score-box {
    text-align: center;
    border-right: 1px solid var(--border-color);
    padding-right: 40px;
}

.reviews-score-large {
    font-size: 48px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.reviews-stars {
    color: var(--warning);
    font-size: 18px;
    margin: 8px 0;
}

.reviews-count-label {
    font-size: 12px;
    color: var(--text-muted);
}

.reviews-sector-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.reviews-sector-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    padding: 8px 14px;
    font-family: 'Inter';
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
}

.reviews-sector-btn.active, .reviews-sector-btn:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.reviews-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-row-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    background-color: white;
    transition: var(--transition);
}

.review-row-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

.review-header-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.review-author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

.badge-sector-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 40px;
    background-color: var(--bg-muted);
    color: var(--text-muted);
}

.badge-sector-tag.hosteleria {
    background-color: var(--accent-light);
    color: var(--accent);
}

.review-stars-individual {
    color: var(--warning);
    font-size: 13px;
    margin-bottom: 8px;
}

.review-text-content {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.5;
    font-style: italic;
}

/* ==========================================================================
   OFF-CANVAS CATEGORY DRAWER (Menú Hamburguesa Lateral B2B)
   ========================================================================== */
.category-drawer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}
.category-drawer-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.category-drawer-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.cat-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cat-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cat-drawer {
    position: fixed;
    top: 0;
    left: -380px;
    width: 360px;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.15);
    z-index: 1002;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.cat-drawer.active {
    transform: translateX(380px);
}

.cat-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary);
    color: white;
}

.cat-drawer-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px;
    border-radius: 6px;
}

.drawer-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.drawer-tab-btn:hover {
    color: #ffffff;
}

.drawer-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cat-drawer-close {
    border: none;
    background: transparent;
    color: white;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: transform 0.2s;
}
.cat-drawer-close:hover {
    transform: rotate(90deg);
}

.cat-drawer-content {
    padding: 20px 0;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cat-drawer-section-title {
    padding: 0 24px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.cat-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.cat-drawer-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}
.cat-drawer-item a:hover, .cat-drawer-item.active a {
    background-color: var(--bg-muted);
    color: var(--accent);
    border-left-color: var(--accent);
    padding-left: 28px;
}
.cat-drawer-badge {
    background: rgba(79, 70, 229, 0.08);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Category SEO Page Styles */
.category-seo-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 32px;
    position: relative;
}
.category-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.category-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.category-breadcrumbs a:hover {
    color: var(--accent);
}
.category-seo-hero h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 10px;
    line-height: 1.2;
}
.category-seo-lead {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 900px;
    margin: 0;
}
.category-seo-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.cat-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary);
}

.category-seo-guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-top: 48px;
}
.category-seo-guide-section h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 16px;
}
.category-seo-guide-section p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.category-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.category-guide-card {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
}
.category-guide-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--primary);
}
.category-guide-card p {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- BUSCADOR ENRIQUECIDO B2B EN VIVO (LIVE SEARCH) --- */
.header-search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 580px;
}
.header-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.04);
    z-index: 1000;
    max-height: 520px;
    overflow-y: auto;
    display: none;
    animation: searchFadeIn 0.15s ease-out;
}
@keyframes searchFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-section-header {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}
.search-section-header:first-child {
    border-top: none;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.search-tax-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
}
.search-tax-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
.search-tax-pill:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}
.search-tax-type {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
}
.search-tax-count {
    color: var(--text-muted);
    font-size: 11px;
}

.search-product-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.15s ease;
}
.search-product-row:hover, .search-product-row.selected {
    background: #f1f5f9;
}
.search-prod-thumb {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.search-prod-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.search-prod-placeholder {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
}
.search-prod-info {
    flex-grow: 1;
    min-width: 0;
}
.search-prod-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 2px;
}
.search-brand-tag {
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.search-sku-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
}
.search-prod-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-prod-pricing {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.search-prod-price {
    font-size: 14.5px;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}
.search-prod-regular {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}
.search-stock-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--success);
}

.search-view-all-btn {
    display: block;
    padding: 12px 16px;
    text-align: center;
    background: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    transition: background 0.15s ease;
}
.search-view-all-btn:hover {
    background: #f8fafc;
    text-decoration: underline;
}
.search-no-results {
    padding: 24px 16px;
    text-align: center;
}
.search-no-results p {
    margin: 0 0 4px;
    font-size: 13.5px;
    color: var(--primary);
}

/* Indicadores de Stock y Disponibilidad B2B */
.card-stock-indicator {
    transition: all 0.2s ease;
    user-select: none;
    letter-spacing: 0.02em;
}
.card-stock-indicator.stock-instock {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.card-stock-indicator.stock-outofstock {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.search-stock-tag.out-of-stock {
    color: #dc2626;
}

/* ==========================================================================
   Filtros Laterales Colapsables (Acordeón B2B)
   ========================================================================== */
.filter-section.filter-accordion {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
}
.filter-section.filter-accordion:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.filter-accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    user-select: none;
    color: var(--primary);
    transition: color 0.15s ease;
}
.filter-accordion-header:hover {
    color: var(--accent);
}
.filter-accordion-header .filter-header-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.filter-accordion-header .filter-title {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: inherit;
    font-family: 'Outfit', sans-serif;
}
.filter-selected-badge {
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.3;
}
.filter-accordion-header .filter-chevron {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.filter-section.filter-accordion.is-collapsed .filter-chevron {
    transform: rotate(-90deg);
}
.filter-section.filter-accordion.is-open .filter-chevron {
    transform: rotate(0deg);
}
.filter-accordion-content {
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
}
.filter-section.filter-accordion.is-collapsed .filter-accordion-content {
    max-height: 0 !important;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}
.filter-section.filter-accordion.is-open .filter-accordion-content {
    max-height: 600px;
    opacity: 1;
    margin-top: 10px;
    pointer-events: auto;
}

/* ==========================================================================
   Barra Lateral de Filtros con Scroll Independiente y Sticky Viewport
   ========================================================================== */
.filters-sidebar {
    position: sticky !important;
    top: 90px !important;
    max-height: calc(100vh - 110px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    padding: 22px 18px 24px 20px !important;
    border-radius: var(--radius-lg) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

/* Scrollbar estilizada para Chrome, Edge, Safari */
.filters-sidebar::-webkit-scrollbar {
    width: 5px;
}
.filters-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.filters-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}
.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent);
}

/* Cabecera del Sidebar siempre fija arriba */
.filters-sidebar .sidebar-header,
.filters-sidebar .filter-header {
    position: sticky;
    top: -22px;
    background-color: var(--bg-card);
    z-index: 15;
    padding-top: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Opciones de filtro facetadas / concatenadas */
.filter-checkbox-item.filter-disabled {
    opacity: 0.32;
    pointer-events: none;
    cursor: not-allowed;
}
.filter-checkbox-item.filter-disabled input {
    cursor: not-allowed;
}
.filter-checkbox-item.filter-disabled .count {
    color: #cbd5e1;
}
.filter-section.filter-accordion.section-empty {
    opacity: 0.45;
}
li.filter-item-hidden {
    display: none !important;
}

/* ==========================================================================
   Estilos de Portada Clásica B2B
   ========================================================================== */
.home-cat-tile {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.home-cat-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent) !important;
}
.home-cat-tile:hover img {
    transform: scale(1.06);
}

.brand-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.brand-item-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent) !important;
    background-color: #f8fafc !important;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    background-color: var(--accent-hover, #4338ca) !important;
}

.btn-hero-secondary:hover {
    background-color: rgba(255, 255, 255, 0.16) !important;
}

@media (max-width: 991px) {
    .hero-split-grid {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }
    .renting-split-grid {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }
}

/* ==========================================================================
   PORTAL DE CLIENTE B2B & MI CUENTA (MY-ACCOUNT)
   ========================================================================== */

/* Barra Lateral de Navegación */
.b2b-account-navigation {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
    width: 100%;
    box-sizing: border-box;
}

.b2b-portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.portal-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent) 0%, #312e81 100%);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
    flex-shrink: 0;
}

.portal-meta h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.portal-meta span {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.b2b-account-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b2b-account-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.b2b-account-navigation ul li a .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
}

.b2b-account-navigation ul li a .nav-icon svg {
    width: 18px;
    height: 18px;
}

.b2b-account-navigation ul li:hover a {
    background-color: var(--bg-muted);
    color: var(--accent);
}

.b2b-account-navigation ul li:hover a .nav-icon {
    color: var(--accent);
}

.b2b-account-navigation ul li.is-active a {
    background: linear-gradient(135deg, var(--accent) 0%, #312e81 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.b2b-account-navigation ul li.is-active a .nav-icon {
    color: #ffffff;
}

/* Área Principal del Contenido de Mi Cuenta */
.woocommerce-MyAccount-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: var(--shadow-sm);
    min-height: 500px;
    width: 100%;
    box-sizing: border-box;
}

/* Dashboard Welcome */
.b2b-dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.welcome-meta h2 {
    margin: 0 0 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.welcome-meta p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

.company-badge-card {
    background: var(--bg-muted);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
}

.company-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.company-val {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
}

.company-cif {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Grid de Tarjetas del Dashboard */
.b2b-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.b2b-dashboard-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.b2b-dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.b2b-dashboard-card .card-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.card-link-all {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.b2b-orders-mini-list, .b2b-renting-mini-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2b-order-row, .b2b-renting-row {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.order-id strong {
    display: block;
    color: var(--primary);
}

.order-id span {
    font-size: 11px;
    color: var(--text-muted);
}

.order-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-completed { background: #ecfdf5; color: #047857; }
.status-processing { background: #eff6ff; color: #1d4ed8; }
.status-on-hold, .status-pending { background: #fffbeb; color: #b45309; }

.btn-view-order {
    padding: 4px 10px;
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.btn-start-shopping {
    display: inline-block;
    padding: 10px 18px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
}

/* Tablas Estándar de WooCommerce en Mi Cuenta */
.woocommerce-orders-table, .woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13.5px;
}

.woocommerce-orders-table th, .woocommerce-table th {
    background: var(--bg-muted);
    padding: 12px 16px;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-orders-table td, .woocommerce-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.woocommerce-Button.button, .woocommerce-button.button {
    padding: 9px 16px;
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.woocommerce-Button.button:hover, .woocommerce-button.button:hover {
    background: var(--accent);
}

/* Formularios de Edición de Dirección y Perfil */
.woocommerce-address-fields, .woocommerce-EditAccountForm {
    max-width: 680px;
}

.woocommerce-form-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.woocommerce-form-row label {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.woocommerce-form-row input.input-text {
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.woocommerce-form-row input.input-text:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

@media (max-width: 900px) {
    .hipertpv-b2b-myaccount-grid {
        grid-template-columns: 1fr;
    }
    .hipertpv-myaccount-sidebar {
        position: static;
    }
}

/* ==========================================================================
   CHECKOUT B2B & PASARELAS DE PAGO (ALINEACIÓN PERFECTA RADIO + TEXTO + LOGOS)
   ========================================================================== */
.woocommerce-checkout #payment,
#payment.woocommerce-checkout-payment {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.woocommerce-checkout #payment ul.payment_methods,
.woocommerce-checkout #payment ul.wc_payment_methods,
#payment ul.wc_payment_methods {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.woocommerce-checkout #payment ul.payment_methods li,
.woocommerce-checkout #payment ul.wc_payment_methods li,
#payment ul.wc_payment_methods li.wc_payment_method {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    list-style: none !important;
    position: relative !important;
}

.woocommerce-checkout #payment ul.payment_methods li:hover,
#payment ul.wc_payment_methods li.wc_payment_method:hover {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
}

.woocommerce-checkout #payment ul.payment_methods li:has(input[type="radio"]:checked),
#payment ul.wc_payment_methods li.wc_payment_method:has(input[type="radio"]:checked) {
    background: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 1px #4f46e5, 0 4px 12px rgba(79, 70, 229, 0.08) !important;
}

.woocommerce-checkout #payment ul.payment_methods li > input[type="radio"],
#payment ul.wc_payment_methods li.wc_payment_method > input[type="radio"] {
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    accent-color: #4f46e5 !important;
    cursor: pointer !important;
    display: inline-block !important;
    float: none !important;
    vertical-align: middle !important;
}

.woocommerce-checkout #payment ul.payment_methods li > label,
#payment ul.wc_payment_methods li.wc_payment_method > label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex: 1 1 auto !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    float: none !important;
}

.payment-method-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.payment-method-icon,
.payment-gateway-badges {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-left: auto !important;
}

.payment-method-icon img,
.payment-gateway-badges img {
    height: 18px !important;
    max-height: 22px !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.woocommerce-checkout #payment ul.payment_methods li div.payment_box,
#payment ul.wc_payment_methods li.wc_payment_method div.payment_box {
    width: 100% !important;
    flex-basis: 100% !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 16px 0 6px 0 !important;
    margin: 14px 0 0 0 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    float: none !important;
}

.woocommerce-checkout #payment ul.payment_methods li div.payment_box::before,
#payment ul.wc_payment_methods li.wc_payment_method div.payment_box::before {
    display: none !important;
}

#payment .place-order {
    padding: 18px 0 0 0 !important;
    margin: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
}

#payment #place_order {
    background-color: var(--accent, #4f46e5) !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    padding: 14px 28px !important;
    border-radius: 6px !important;
    width: 100% !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

#payment #place_order:hover {
    background-color: var(--accent-hover, #4338ca) !important;
    transform: translateY(-1px);
}

