/**
 * Custom Header Styles - eSaico Theme
 * Versión simplificada y optimizada
 * @package eSaico
 * @version 2.0.0
 */

/* =================================================================
   RESET Y BASE
   ================================================================= */

.site-header {
    display: none;
}

.custom-header-wrapper * {
    box-sizing: border-box;
}

.custom-header-wrapper {
    position: relative;
    z-index: 9999;
}

/* =================================================================
   HEADER PRINCIPAL
   ================================================================= */

.custom-header-wrapper .ch-header {
    background: var(--ch-background);
    border-bottom: 1px solid var(--ch-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: var(--ch-transition);
    box-shadow: var(--ch-shadow);
}

.custom-header-wrapper .ch-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* =================================================================
   LOGO - SIEMPRE VISIBLE
   ================================================================= */

.custom-header-wrapper .ch-logo {
    display: flex !important;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ch-text);
    font-weight: 700;
    font-size: 24px;
    transition: var(--ch-transition);
    white-space: nowrap;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

.custom-header-wrapper .ch-logo:hover {
    color: var(--ch-primary);
}

.custom-header-wrapper .ch-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--ch-primary), var(--ch-secondary));
    border-radius: var(--ch-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    box-shadow: var(--ch-shadow);
}

.custom-header-wrapper .ch-logo-image {
    max-height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.custom-header-wrapper .ch-logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--ch-primary), var(--ch-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =================================================================
   BÚSQUEDA + MENÚ (CENTRO)
   ================================================================= */

.ch-search-menu-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    max-width: 600px;
}

.custom-header-wrapper .ch-search-container {
    max-width: 500px;
    width: 100%;
    position: relative;
}

.custom-header-wrapper .ch-search-form {
    position: relative;
    background: var(--ch-surface);
    border: 2px solid transparent;
    border-radius: 16px;
    transition: var(--ch-transition);
    overflow: hidden;
}

.custom-header-wrapper .ch-search-form.focused {
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 4px rgba(140, 82, 255, 0.1);
}

.custom-header-wrapper .ch-search-input {
    width: 100%;
    padding: 14px 56px 14px 20px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--ch-text);
    outline: none;
    font-family: inherit;
}

.custom-header-wrapper .ch-search-input::placeholder {
    color: var(--ch-text-light);
}

.ch-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--ch-primary);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ch-transition);
}

.ch-search-btn:hover {
    background: var(--ch-primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.ch-search-btn svg {
    width: 20px;
    height: 20px;
}

/* =================================================================
   MENÚ HAMBURGUESA
   ================================================================= */

.custom-header-wrapper .ch-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: var(--ch-radius);
    transition: var(--ch-transition);
    position: relative;
}

.custom-header-wrapper .ch-menu-toggle:hover {
    background: var(--ch-surface);
}

.custom-header-wrapper .ch-hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--ch-text);
    margin: 2px 0;
    transition: var(--ch-transition);
    border-radius: 2px;
}

.custom-header-wrapper .ch-menu-toggle.active .ch-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.custom-header-wrapper .ch-menu-toggle.active .ch-hamburger-line:nth-child(2) {
    opacity: 0;
}

.custom-header-wrapper .ch-menu-toggle.active .ch-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* =================================================================
   RESULTADOS DE BÚSQUEDA
   ================================================================= */

.ch-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ch-background);
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius);
    box-shadow: var(--ch-shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--ch-transition);
    margin-top: 8px;
}

.ch-search-results.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ch-search-result-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--ch-border);
    cursor: pointer;
    transition: var(--ch-transition);
    gap: 16px;
}

.ch-search-result-item:last-child {
    border-bottom: none;
}

.ch-search-result-item:hover {
    background: var(--ch-surface);
}

.ch-result-image {
    width: 60px;
    height: 60px;
    border-radius: var(--ch-radius);
    object-fit: cover;
    background: var(--ch-surface);
}

.ch-result-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ch-text);
}

.ch-result-price {
    color: var(--ch-primary);
    font-weight: 700;
    font-size: 16px;
}

/* =================================================================
   ACCIONES DEL HEADER (DERECHA)
   ================================================================= */

.ch-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.ch-action-btn {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: var(--ch-radius);
    color: var(--ch-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ch-transition);
    position: relative;
}

.ch-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--color-primary, #007cba);
    color: var(--esaico-text-white, white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary, #007cba);
    white-space: nowrap;
    height: 44px;
}

.ch-cta-btn:hover {
    background: var(--color-accent, #ff6b35);
    border-color: var(--color-accent, #ff6b35);
    color: var(--esaico-text-white, white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ch-action-btn:hover {
    background: var(--ch-surface);
    color: var(--ch-primary);
    transform: scale(1.05);
}

.ch-action-btn svg {
    width: 22px;
    height: 22px;
}

/* =================================================================
   BADGE DEL CARRITO
   ================================================================= */

.ch-cart-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--ch-secondary);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: chPulse 2s infinite;
    transition: all 0.3s ease;
}

@keyframes chPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =================================================================
   MENÚ DE USUARIO
   ================================================================= */

.ch-user-menu {
    position: relative;
}

.ch-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--ch-background);
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius);
    box-shadow: var(--ch-shadow-lg);
    min-width: 240px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--ch-transition);
}

.ch-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ch-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--ch-text);
    text-decoration: none;
    transition: var(--ch-transition);
    border-bottom: 1px solid var(--ch-border);
}

.ch-dropdown-item:last-child {
    border-bottom: none;
}

.ch-dropdown-item:hover {
    background: var(--ch-surface);
    color: var(--ch-primary);
}

.ch-user-info {
    padding: 16px;
    border-bottom: 1px solid var(--ch-border);
    background: var(--ch-surface);
}

.ch-user-info strong {
    display: block;
    color: var(--ch-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.ch-user-info small {
    color: var(--ch-text-muted);
    font-size: 12px;
}

/* =================================================================
   FORMULARIO DE LOGIN
   ================================================================= */

.ch-login-form {
    padding: 16px;
}

.ch-login-form h4 {
    margin: 0 0 12px 0;
    color: var(--ch-primary);
    font-size: 16px;
    font-weight: 600;
}

.ch-login-form input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius);
    font-size: 14px;
    transition: var(--ch-transition);
}

.ch-login-form input:focus {
    outline: none;
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 3px rgba(140, 82, 255, 0.1);
}

.ch-login-btn {
    width: 100%;
    padding: 10px;
    background: var(--ch-primary);
    color: white;
    border: none;
    border-radius: var(--ch-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--ch-transition);
    margin-bottom: 12px;
}

.ch-login-btn:hover {
    background: var(--ch-primary-dark);
    transform: translateY(-1px);
}

.ch-login-links {
    border-top: 1px solid var(--ch-border);
    padding-top: 8px;
}

.ch-login-links .ch-dropdown-item {
    padding: 8px 0;
    border-bottom: none;
    font-size: 13px;
}

/* =================================================================
   OVERLAYS
   ================================================================= */

.ch-menu-overlay,
.ch-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.ch-menu-overlay.show,
.ch-search-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =================================================================
   MENÚ LATERAL
   ================================================================= */

.ch-nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 85vw;
    height: 100vh;
    background: var(--ch-background);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: var(--ch-shadow-lg);
    border-radius: 16px 0 0 16px;
}

.ch-nav-menu.show {
    transform: translateX(0);
}

/* =================================================================
   BUSCADOR EN MENÚ MÓVIL
   ================================================================= */

.ch-mobile-menu-search {
    padding: 20px;
    border-bottom: 1px solid var(--ch-border);
    margin-bottom: 8px;
}

.ch-mobile-menu-search .ch-search-form {
    background: var(--ch-surface);
    border: 2px solid var(--ch-border);
    border-radius: 12px;
}

.ch-mobile-menu-search .ch-search-form.focused {
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 3px rgba(140, 82, 255, 0.1);
}

.ch-mobile-menu-search .ch-search-input {
    padding: 14px 50px 14px 16px;
}

.ch-mobile-menu-search .ch-search-btn {
    right: 6px;
    width: 38px;
    height: 38px;
}

.ch-mobile-menu-search .ch-search-btn svg {
    width: 18px;
    height: 18px;
}

/* =================================================================
   CONTENEDOR DE NAVEGACIÓN
   ================================================================= */

.ch-nav-container {
    padding: 16px 24px 24px;
}

.ch-menu-section {
    margin-bottom: 32px;
}

.ch-menu-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ch-text);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ch-primary);
}

.ch-menu-item {
    display: block;
    padding: 12px 0;
    color: var(--ch-text-light);
    text-decoration: none;
    transition: var(--ch-transition);
    font-size: 16px;
    border-bottom: 1px solid var(--ch-border);
}

.ch-menu-item:last-child {
    border-bottom: none;
}

.ch-menu-item:hover {
    color: var(--ch-primary);
    padding-left: 8px;
}

/* =================================================================
   LOADING SPINNER
   ================================================================= */

.ch-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--ch-primary);
    border-right-color: var(--ch-primary);
    animation: chSpinRotate 1s linear infinite;
}

@keyframes chSpinRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================================
   BOTTOM NAVIGATION BAR - MÓVIL
   ================================================================= */

.ch-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ch-background);
    border-top: 1px solid var(--ch-border);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 9998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.ch-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--ch-text-light);
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--ch-transition);
    border-radius: 12px;
}

.ch-bottom-nav-item:active {
    transform: scale(0.95);
}

.ch-bottom-nav-item.active {
    color: var(--ch-primary);
}

.ch-bottom-nav-item.active .ch-bottom-icon {
    transform: scale(1.1);
}

.ch-bottom-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.ch-bottom-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* =================================================================
   FULLSCREEN SEARCH - MÓVIL
   ================================================================= */

.ch-fullscreen-search {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ch-background);
    z-index: 10005;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ch-fullscreen-search.show {
    opacity: 1;
    visibility: visible;
}

.ch-fullscreen-search-header {
    padding: 16px;
    border-bottom: 1px solid var(--ch-border);
}

.ch-fullscreen-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--ch-surface);
    border: none;
    border-radius: 50%;
    color: var(--ch-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ch-fullscreen-close:active {
    transform: scale(0.95);
}

.ch-fullscreen-close svg {
    width: 20px;
    height: 20px;
}

.ch-fullscreen-search-form {
    background: var(--ch-surface);
    border: 2px solid var(--ch-border);
    border-radius: 16px;
    margin-right: 50px;
}

.ch-fullscreen-search-form.focused {
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 4px rgba(140, 82, 255, 0.1);
}

.ch-fullscreen-input {
    width: 100%;
    padding: 16px 60px 16px 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--ch-text);
    outline: none;
}

.ch-fullscreen-input::placeholder {
    color: var(--ch-text-light);
}

.ch-fullscreen-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--ch-primary);
    border: none;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-fullscreen-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.ch-fullscreen-search-btn svg {
    width: 20px;
    height: 20px;
}

.ch-fullscreen-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* =================================================================
   LOGIN MODAL - MÓVIL Y DESKTOP
   ================================================================= */

.ch-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10006;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.ch-login-modal.show {
    opacity: 1;
    visibility: visible;
}

.ch-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ch-modal-content {
    position: relative;
    background: var(--ch-background);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

.ch-login-modal.show .ch-modal-content {
    transform: translateY(0);
}

.ch-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--ch-surface);
    border: none;
    border-radius: 50%;
    color: var(--ch-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ch-modal-close:hover {
    background: var(--ch-border);
    transform: rotate(90deg);
}

.ch-modal-close svg {
    width: 20px;
    height: 20px;
}

.ch-modal-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 8px;
}

.ch-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ch-text);
    margin: 0 0 8px 0;
}

.ch-modal-header p {
    font-size: 14px;
    color: var(--ch-text-light);
    margin: 0;
}

.ch-modal-user-info {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--ch-border);
    margin-bottom: 16px;
}

.ch-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 3px solid var(--ch-primary);
}

.ch-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ch-modal-user-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ch-text);
    margin: 0 0 4px 0;
}

.ch-modal-user-info p {
    font-size: 14px;
    color: var(--ch-text-light);
    margin: 0;
}

.ch-modal-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ch-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--ch-text);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--ch-transition);
    font-weight: 500;
}

.ch-modal-item:hover {
    background: var(--ch-surface);
}

.ch-modal-item:active {
    transform: scale(0.98);
}

.ch-modal-item svg {
    width: 20px;
    height: 20px;
    color: var(--ch-text-light);
    flex-shrink: 0;
}

.ch-modal-item.ch-modal-logout {
    color: #ef4444;
    margin-top: 8px;
}

.ch-modal-item.ch-modal-logout svg {
    color: #ef4444;
}

.ch-modal-form {
    padding-top: 8px;
}

.ch-form-group {
    margin-bottom: 16px;
}

.ch-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--ch-border);
    border-radius: 12px;
    font-size: 16px;
    color: var(--ch-text);
    background: var(--ch-surface);
    transition: var(--ch-transition);
}

.ch-form-group input:focus {
    outline: none;
    border-color: var(--ch-primary);
    box-shadow: 0 0 0 4px rgba(140, 82, 255, 0.1);
}

.ch-modal-login-btn {
    width: 100%;
    padding: 14px;
    background: var(--ch-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--ch-transition);
    margin-bottom: 20px;
}

.ch-modal-login-btn:hover {
    background: var(--ch-primary-dark);
}

.ch-modal-login-btn:active {
    transform: scale(0.98);
}

.ch-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--ch-border);
}

.ch-modal-link {
    color: var(--ch-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: var(--ch-transition);
}

.ch-modal-link:hover {
    text-decoration: underline;
}

/* =================================================================
   RESPONSIVE - DESKTOP
   ================================================================= */

/* Ocultar elementos móviles por defecto */
.ch-mobile-only {
    display: none;
}

@media (min-width: 769px) {
    .ch-mobile-only,
    .ch-bottom-nav {
        display: none !important;
    }

    /* Logo visible y posicionado correctamente en desktop */
    .custom-header-wrapper .ch-header .ch-container .ch-logo {
        display: flex !important;
        position: relative !important;
        left: auto !important;
        transform: none !important;
        order: 1;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ch-search-menu-group {
        order: 2;
    }

    .ch-header-actions {
        order: 3;
    }

    .ch-login-modal {
        align-items: center;
        justify-content: center;
    }

    .ch-modal-content {
        border-radius: 20px;
        max-width: 400px;
        transform: scale(0.9);
    }

    .ch-login-modal.show .ch-modal-content {
        transform: scale(1);
    }
}

/* =================================================================
   RESPONSIVE - MÓVIL
   ================================================================= */

@media (max-width: 768px) {
    /* ================================================================
       MÓVIL: Ocultar elementos desktop
       ================================================================ */
    .ch-desktop-only {
        display: none !important;
    }

    .ch-mobile-only {
        display: flex !important;
    }

    /* ================================================================
        MÓVIL: Layout del header (Grid de 3 columnas) - OPTIMIZADO
        ================================================================ */
    .custom-header-wrapper .ch-container {
        height: 64px;
        padding: 0 12px;
        position: relative;
        display: grid !important;
        grid-template-columns: 48px 1fr auto;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ================================================================
       MÓVIL: Menú Hamburguesa (Izquierda)
       ================================================================ */
    .ch-menu-toggle.ch-mobile-only {
        justify-self: start;
        width: 48px;
        height: 48px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 12px;
        border-radius: 12px;
        transition: background 0.2s ease;
    }

    .ch-menu-toggle.ch-mobile-only:active {
        background: var(--ch-surface, rgba(0, 0, 0, 0.05));
    }

    .ch-menu-toggle .ch-hamburger-line {
        width: 26px;
        height: 3px;
        background: var(--ch-text, #1a1a1a);
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .ch-menu-toggle.active .ch-hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
        background: var(--ch-primary, #10B981);
    }

    .ch-menu-toggle.active .ch-hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .ch-menu-toggle.active .ch-hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
        background: var(--ch-primary, #10B981);
    }

    /* ================================================================
       MÓVIL: Logo (Centrado)
       ================================================================ */
    .custom-header-wrapper .ch-logo {
        position: static !important;
        transform: none !important;
        justify-self: center !important;
        z-index: 5;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .ch-logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .ch-logo-image {
        max-height: 32px;
        max-width: 100px;
    }

    .ch-logo-text {
        font-size: 16px;
        font-weight: 700;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ================================================================
       MÓVIL: Acciones del Header (Derecha)
       ================================================================ */
    .ch-header-actions {
        justify-self: end !important;
        display: flex !important;
        gap: 8px;
        justify-content: flex-end;
    }

    /* Ocultar carrito y usuario en header móvil */
    .ch-header-actions .ch-action-btn,
    .ch-header-actions .ch-user-menu {
        display: none !important;
    }

    /* Mostrar SOLO el CTA en móvil */
    .ch-header-actions .ch-cta-btn {
        display: inline-flex !important;
        font-size: 12px;
        padding: 8px 12px;
        height: 40px;
        border-radius: 8px;
        font-weight: 600;
        white-space: nowrap;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 0;
    }

    /* ================================================================
       MÓVIL: Menú Lateral (Sidebar)
       ================================================================ */
    .ch-nav-menu {
        width: 320px;
        max-width: 85vw;
        border-radius: 20px 0 0 20px;
    }

    .ch-nav-container {
        padding: 20px 24px 24px;
    }

    .ch-menu-section h3 {
        font-size: 20px;
        margin-bottom: 16px;
        padding-bottom: 10px;
        border-bottom: 3px solid var(--ch-primary, #10B981);
        color: var(--ch-text, #1a1a1a);
    }

    .ch-menu-item {
        display: flex;
        align-items: center;
        padding: 14px 12px;
        color: var(--ch-text-light, #6b7280);
        text-decoration: none;
        font-size: 16px;
        border-bottom: 1px solid var(--ch-border, #e5e7eb);
        border-radius: 8px;
        margin-bottom: 4px;
        transition: all 0.2s ease;
    }

    .ch-menu-item:hover,
    .ch-menu-item:active {
        background: var(--ch-surface, rgba(16, 185, 129, 0.05));
        color: var(--ch-primary, #10B981);
        padding-left: 16px;
        border-bottom-color: var(--ch-primary, #10B981);
    }

    .ch-menu-item:last-child {
        border-bottom: none;
    }

    /* ================================================================
       MÓVIL: Bottom Navigation Bar
       ================================================================ */
    .ch-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--ch-background, white);
        border-top: 1px solid var(--ch-border, #e5e7eb);
        justify-content: space-around;
        align-items: center;
        padding: 10px 8px max(10px, env(safe-area-inset-bottom));
        z-index: 9998;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        height: 68px;
    }

    .ch-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 12px;
        text-decoration: none;
        color: var(--ch-text-light, #6b7280);
        background: none;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
        border-radius: 12px;
        min-width: 68px;
    }

    .ch-bottom-nav-item:active {
        transform: scale(0.95);
        background: var(--ch-surface, rgba(0, 0, 0, 0.05));
    }

    .ch-bottom-nav-item.active {
        color: var(--ch-primary, #10B981);
        background: rgba(16, 185, 129, 0.1);
    }

    .ch-bottom-nav-item.active .ch-bottom-icon {
        transform: scale(1.15);
    }

    .ch-bottom-icon {
        width: 26px;
        height: 26px;
        stroke-width: 2;
        transition: transform 0.2s ease;
    }

    .ch-bottom-label {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.3px;
        text-transform: capitalize;
    }

    /* ================================================================
       MÓVIL: Padding del body
       ================================================================ */
    body {
        padding-bottom: 78px !important; /* Espacio para bottom nav */
    }

    body:not(.front-page-body) {
        padding-top: 64px !important; /* Espacio para header fijo */
    }

    /* ================================================================
       MÓVIL: Overlay del menú
       ================================================================ */
    .ch-menu-overlay {
        z-index: 9998;
    }

    .ch-menu-overlay.show {
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
    }

    /* ================================================================
       MÓVIL: Ocultar dropdown desktop
       ================================================================ */
    .ch-user-dropdown {
        display: none !important;
    }

    .ch-search-menu-group {
        display: none !important;
    }
}

/* =================================================================
   RESPONSIVE - MÓVIL PEQUEÑO (max-width: 480px)
   ================================================================= */

@media (max-width: 480px) {
    .custom-header-wrapper .ch-container {
        height: 56px;
        padding: 0 8px;
        gap: 6px;
        grid-template-columns: 40px 1fr auto;
    }

    .ch-menu-toggle.ch-mobile-only {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .ch-menu-toggle .ch-hamburger-line {
        width: 24px;
        height: 2px;
    }

    .custom-header-wrapper .ch-logo {
        gap: 4px;
    }

    .ch-logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .ch-logo-image {
        max-height: 28px;
        max-width: 80px;
    }

    .ch-logo-text {
        font-size: 14px;
        max-width: 80px;
    }

    .ch-header-actions .ch-cta-btn {
        font-size: 11px;
        padding: 6px 8px;
        height: 36px;
        max-width: 80px;
    }

    .ch-nav-menu {
        width: 280px;
        max-width: 90vw;
    }

    .ch-bottom-nav {
        height: 60px;
        padding: 8px 4px max(8px, env(safe-area-inset-bottom));
    }

    .ch-bottom-nav-item {
        min-width: 60px;
        padding: 6px 8px;
    }

    .ch-bottom-icon {
        width: 22px;
        height: 22px;
    }

    .ch-bottom-label {
        font-size: 10px;
    }

    /* Ajustar padding del body para header más pequeño */
    body:not(.front-page-body) {
        padding-top: 56px !important;
    }
}

/* =================================================================
   AJUSTE DE CONTENIDO PRINCIPAL
   ================================================================= */

body:not(.front-page-body) {
    padding-top: 72px;
}
