/**
 * Bersoft VASQUEZ Header - Estilos Frontend v1.3.0
 */
#bvh-drawer-overlay:not(.is-open),#bvh-drawer:not(.is-open) { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
.bvh-header-wrap { width: 100%; font-family: var(--bs-font-body, system-ui, -apple-system, sans-serif); color: var(--bs-color-text, #4B5563); box-shadow: 0 2px 8px rgba(0,0,0,0.04); position: relative; z-index: 990; background: var(--bs-color-background, #ffffff); }
.bvh-header-wrap *, .bvh-header-wrap *::before, .bvh-header-wrap *::after { box-sizing: border-box; }
.bvh-container { width: 100%; max-width: var(--bs-container-max, 1280px); margin: 0 auto; padding: 0 16px; }

/* 1. Topbar */
.bvh-topbar { background: var(--bs-color-surface, #F8FAFC); border-bottom: 1px solid var(--bs-color-border, #E2E8F0); font-size: 12px; }
.bvh-topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.bvh-rotator { font-weight: var(--bs-btn-font-weight, 600); color: var(--bs-color-heading, #172126); height: 18px; position: relative; overflow: hidden; flex: 1; max-width: 480px; }
.bvh-rotator-item { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.4s ease; white-space: nowrap; }
.bvh-rotator-item.is-active { opacity: 1; position: relative; }
.bvh-top-links { display: flex; gap: 16px; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bvh-top-links a { color: var(--bs-color-text-secondary, #64748B); text-decoration: none; transition: color 0.15s ease; }
.bvh-top-links a:hover { color: var(--bs-color-primary, #0F4C5C); }

/* 2. Middle Bar & Buscador Rediseñado */
.bvh-midbar { padding: 14px 0; background: var(--bs-color-background, #ffffff); }
.bvh-midbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bvh-logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 1; min-width: 0; }
.bvh-logo img { max-height: 52px; width: auto; object-fit: contain; display: block; max-width: 100%; }
.bvh-logo-text { font-family: var(--bs-font-heading, system-ui, sans-serif); font-size: 18px; font-weight: var(--bs-h1-font-weight, 700); color: var(--bs-color-heading, #0F2A44); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.bvh-mob-ham-btn { display: none; background: transparent !important; border: none !important; color: var(--bs-color-heading, #0F2A44) !important; padding: 0 !important; margin: 0 !important; cursor: pointer; border-radius: 30px !important; width: 42px !important; height: 42px !important; min-width: 42px !important; flex: 0 0 42px !important; flex-shrink: 0 !important; align-items: center; justify-content: center; }
.bvh-mob-ham-btn svg { width: 24px !important; height: 24px !important; stroke: currentColor !important; display: block; }

/* Buscador Contiguo */
.bvh-search-wrap { flex: 1; max-width: 580px; position: relative; }
.bvh-search-form { display: flex; align-items: center; gap: 8px; width: 100%; position: relative; background: transparent !important; border: none !important; padding: 0 !important; }
.bvh-search-input { flex: 1; height: 42px; background: var(--bs-color-surface, #F8FAFC); border: 1.5px solid var(--bs-color-border, #E2E8F0) !important; border-radius: 30px !important; padding: 0 18px; font-size: 13.5px; color: var(--bs-color-heading, #172126); outline: none !important; transition: border-color 0.2s ease, background-color 0.2s ease; }
.bvh-search-input:focus { border-color: var(--bs-color-accent, #F2A900) !important; background: #ffffff; }
.bvh-search-btn { height: 42px; padding: 0 22px !important; border-radius: 30px !important; background: var(--bs-color-accent, #F2A900) !important; color: var(--bs-color-heading, #0F2A44) !important; border: none !important; font-weight: var(--bs-btn-font-weight, 700) !important; font-size: 13px !important; cursor: pointer; transition: background-color 0.15s ease, transform 0.15s ease; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bvh-search-btn:hover { background: #e59d00 !important; }

/* Resultados AJAX */
.bvh-ajax-results { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; background: #ffffff; border: 1px solid var(--bs-color-border, #E2E8F0); border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 380px; overflow-y: auto; z-index: 1000; }
.bvh-ajax-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--bs-color-surface, #F1F5F9); text-decoration: none !important; color: inherit; transition: background 0.15s ease; }
.bvh-ajax-item:hover { background: var(--bs-color-surface, #F8FAFC); }
.bvh-ajax-img { width: 44px; height: 44px; object-fit: contain; border-radius: 4px; border: 1px solid var(--bs-color-border, #E2E8F0); background: #ffffff; flex-shrink: 0; }
.bvh-ajax-info { display: flex; flex-direction: column; gap: 2px; }
.bvh-ajax-title { font-size: 13px; font-weight: var(--bs-btn-font-weight, 600); color: var(--bs-color-heading, #172126); line-height: 1.3; }
.bvh-ajax-sku { font-size: 11px; color: var(--bs-color-text-secondary, #64748B); }
.bvh-ajax-all { display: block; padding: 11px; text-align: center; font-size: 12.5px; font-weight: var(--bs-btn-font-weight, 600); color: var(--bs-color-primary, #0F4C5C); background: var(--bs-color-surface, #F8FAFC); text-decoration: none; border-top: 1px solid var(--bs-color-border, #E2E8F0); }
.bvh-ajax-no-results, .bvh-ajax-searching { padding: 14px; text-align: center; font-size: 13px; color: var(--bs-color-text-secondary, #64748B); }

/* Botón WhatsApp Fiel a la Ficha Aprobada */
.bvh-actions { display: flex; align-items: center; flex-shrink: 0; }
.bvh-wa-btn, .bvh-btn-whatsapp { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 10px !important; height: 42px !important; padding: 0 20px !important; width: fit-content !important; background-color: var(--bs-color-accent, #F2A900) !important; color: var(--bs-color-heading, #0F2A44) !important; font-family: var(--bs-font-heading, system-ui, sans-serif) !important; font-size: 13.5px !important; font-weight: var(--bs-btn-font-weight, 700) !important; text-decoration: none !important; border-radius: 30px !important; border: none !important; box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important; cursor: pointer !important; transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important; }
.bvh-wa-btn:hover, .bvh-btn-whatsapp:hover { background-color: #e59d00 !important; color: var(--bs-color-heading, #0F2A44) !important; transform: translateY(-1px) !important; }
.bvh-wa-btn:active, .bvh-btn-whatsapp:active { transform: scale(0.98) !important; }
.bvh-wa-icon { width: 20px !important; height: 20px !important; color: var(--bs-color-heading, #0F2A44) !important; fill: currentColor !important; flex-shrink: 0; }

/* 3. Bottom Bar */
.bvh-botbar { background: var(--bs-color-heading, #172126); height: 46px; }
.bvh-botbar-inner { display: flex; align-items: center; height: 100%; gap: 16px; }
.bvh-all-cats-btn { height: 34px; padding: 0 18px; border-radius: 30px !important; background: var(--bs-color-accent, #F2A900) !important; color: var(--bs-color-heading, #0F2A44) !important; border: none !important; font-size: 13px; font-weight: var(--bs-btn-font-weight, 600); letter-spacing: 0.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s ease; flex-shrink: 0; }
.bvh-all-cats-btn:hover { background: #e59d00 !important; }

.bvh-main-nav { flex: 1; height: 100%; }
.bvh-nav-list { display: flex; align-items: center; gap: 20px; height: 100%; list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bvh-nav-item { position: relative; height: 100%; display: flex; align-items: center; }
.bvh-nav-link { color: #ffffff; text-decoration: none; font-size: 13px; font-weight: var(--bs-btn-font-weight, 600); text-transform: uppercase; letter-spacing: 0.3px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; transition: color 0.15s ease; }
.bvh-nav-item:hover > .bvh-nav-link { color: var(--bs-color-accent, #F2A900); }
.bvh-nav-pdf { margin-left: auto; }
.bvh-nav-pdf .bvh-nav-link { color: var(--bs-color-accent, #F2A900); }

/* Dropdowns Nav */
.bvh-nav-dropdown { position: absolute; top: 100%; left: 0; min-width: 200px; background: #ffffff; border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(0,0,0,0.12); border: 1px solid var(--bs-color-border, #E2E8F0); display: none; z-index: 1000; padding: 6px 0; }
.bvh-nav-item:hover > .bvh-nav-dropdown, .bvh-nav-item:focus-within > .bvh-nav-dropdown { display: block; }
.bvh-nav-item:nth-last-child(1) .bvh-nav-dropdown, .bvh-nav-item:nth-last-child(2) .bvh-nav-dropdown { left: auto; right: 0; }
.bvh-nav-dropdown a { display: block; padding: 8px 16px; font-size: 13px; color: var(--bs-color-text, #4B5563); text-decoration: none; transition: background 0.15s, color 0.15s; }
.bvh-nav-dropdown a:hover { background: var(--bs-color-surface, #F8FAFC); color: var(--bs-color-primary, #0F4C5C); }

/* 4. Drawer Lateral Simplificado */
.bvh-drawer-overlay { position: fixed; inset: 0; background: rgba(15, 42, 68, 0.55); z-index: 9998; opacity: 0; transition: opacity 0.25s ease; }
.bvh-drawer-overlay.is-open { opacity: 1; }
.bvh-drawer { position: fixed; top: 0; left: 0; width: 320px; max-width: 88vw; height: 100%; background: #ffffff; z-index: 9999; transform: translateX(-100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; box-shadow: 4px 0 20px rgba(0,0,0,0.15); }
.bvh-drawer.is-open { transform: translateX(0); }
.bvh-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--bs-color-heading, #172126); color: #ffffff; }
.bvh-drawer-title { margin: 0; font-size: 16px; font-weight: var(--bs-h1-font-weight, 700); }
.bvh-drawer-close { background: transparent !important; border: none !important; color: #ffffff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 30px !important; }
.bvh-drawer-body { flex: 1; overflow-y: auto; padding: 12px 0 20px; display: flex; flex-direction: column; }

/* Árbol de Categorías en Drawer */
.bvh-drawer-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bvh-drawer-sub { padding-left: 14px !important; display: none; background: var(--bs-color-surface, #F8FAFC); }
.bvh-drawer-sub.is-open { display: block; }
.bvh-drawer-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--bs-color-surface, #F1F5F9); }
.bvh-drawer-cat-link { flex: 1; padding: 11px 16px; font-size: 13.5px; font-weight: 500; color: var(--bs-color-heading, #172126); text-decoration: none; }
.bvh-drawer-cat-link:hover { color: var(--bs-color-primary, #0F4C5C); }
.bvh-drawer-toggle { background: transparent !important; border: none !important; box-shadow: none !important; width: 44px; height: 44px; min-width: 44px; min-height: 44px; flex-shrink: 0; padding: 0 !important; margin: 0 !important; cursor: pointer; display: inline-flex !important; align-items: center; justify-content: center; color: var(--bs-color-heading, #0F2A44) !important; border-radius: 30px !important; outline: none; transition: background-color 0.15s ease; }
.bvh-drawer-toggle:hover { background: rgba(0, 0, 0, 0.05) !important; }
.bvh-drawer-toggle:focus-visible { outline: 2px solid var(--bs-color-primary, #0F4C5C) !important; outline-offset: -2px; }
.bvh-drawer-toggle-symbol { font-size: 20px; font-weight: 700; line-height: 1; display: inline-block; color: currentColor !important; user-select: none; }

/* Marcas Verticales en Drawer */
.bvh-drawer-section-title { padding: 18px 16px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--bs-color-text-secondary, #64748B); }
.bvh-drawer-brands-vlist { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.bvh-drawer-brand-item { border-bottom: 1px solid var(--bs-color-surface, #F1F5F9); }
.bvh-drawer-brand-vlink { display: block; padding: 10px 16px; font-size: 13.5px; font-weight: 500; color: var(--bs-color-heading, #172126); text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease; }
.bvh-drawer-brand-vlink:hover { color: var(--bs-color-primary, #0F4C5C); background: var(--bs-color-surface, #F8FAFC); }

/* Pie del Drawer con WhatsApp */
.bvh-drawer-wa-wrap { padding: 16px; margin-top: auto; border-top: 1px solid var(--bs-color-border, #E2E8F0); display: flex; justify-content: center; }

/* Responsive */
.bvh-mob-search-row { display: none; padding: 0 0 12px; background: var(--bs-color-background, #ffffff); }
body.bvh-scroll-locked { overflow: hidden !important; }

@media (max-width: 991px) {
    .bvh-topbar, .bvh-botbar, .bvh-search-desktop, .bvh-wa-text { display: none !important; }
    .bvh-mob-ham-btn { display: flex; }
    .bvh-mob-search-row { display: block; }
    .bvh-midbar { padding: 8px 0; }
    .bvh-wa-btn { padding: 0 !important; width: 42px !important; height: 42px !important; }
}
