/* Fuente CocoBiker para títulos */
@font-face {
    font-family: 'CocoBiker';
    src: url('./fuentes/CocoBiker Regular Trial 2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Fuente CocoGothic para párrafos - Regular */
@font-face {
    font-family: 'CocoGothic';
    src: url('./fuentes/coco-gothic-parrafos/CocoGothic_trial.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Fuente CocoGothic - Bold */
@font-face {
    font-family: 'CocoGothic';
    src: url('./fuentes/coco-gothic-parrafos/CocoGothic-Bold_trial.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Fuente CocoGothic - Light */
@font-face {
    font-family: 'CocoGothic';
    src: url('./fuentes/coco-gothic-parrafos/CocoGothic-Light_trial.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos del header */
header {
    background-color: #ffffff; /* Fondo blanco sólido */
    font-family: 'CocoGothic', sans-serif;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 10000; /* Asegura que el header esté por encima de todo */
    left: 0;
    right: 0;
    padding: 0;
    transform: translateZ(0); /* Forzar aceleración por hardware */
    margin: 0;
    height: 60px; /* Altura fija */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 15px;
}

/* Estilos para el menú de hamburguesa */
.menu-toggle {
    background: none;
    border: none;
    padding: 5px;
    z-index: 10001; /* Por encima del header */
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    margin-right: 10px;
    transform: translateZ(0); /* Forzar aceleración por hardware */
}

.menu-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Estilos para la barra de búsqueda */
.search-container {
    position: relative;
    margin-left: 0;
    display: flex;
    align-items: center;
}
.search-icon {
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1000;
    min-width: 300px;
    display: none;
    margin-top: 10px;
}

/* Mostrar la barra de búsqueda cuando tiene la clase visible */
.search-bar.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Estilos para el input de búsqueda */
.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    font-family: 'CocoGothic', sans-serif;
}

.search-input:focus {
    border-color: #4a90e2;
}

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

/* Estilos para el contenedor de búsqueda */
.search-container {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    z-index: 1001;
}

/* Estilos base para la barra de búsqueda */
.search-bar {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 1001;
    width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    margin-top: 10px;
    /* Asegurar que esté por encima de otros elementos */
    display: block !important;
    pointer-events: auto;
}

/* Mostrar la barra de búsqueda cuando tiene la clase visible */
.search-bar.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block !important;
}

/* Estilos para el botón de búsqueda */
.search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    position: relative;
    z-index: 1002;
}

/* Estilos para el formulario de búsqueda */
.search-form {
    width: 100%;
    position: relative;
}

/* Estilos para el input de búsqueda */
.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    font-family: 'CocoGothic', sans-serif;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #4a90e2;
}

/* Estilos para móviles (menos de 600px) */
@media (max-width: 600px) {
    .search-bar {
        position: fixed;
        left: 0;
        right: 0;
        top: 70px;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        background: transparent;
        box-shadow: none;
    }
    
    .search-bar.visible {
        display: flex !important;
    }
    
    .search-container {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 0;
    }
    
    .search-form {
        width: 100%;
        margin: 0;
    }
    
    .search-input {
        width: 100%;
        box-sizing: border-box;
        border-radius: 20px;
        padding: 10px 15px;
        border: 1px solid #ddd;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* Asegurar que el botón de búsqueda esté correctamente posicionado */
    .search-toggle {
        position: relative;
        z-index: 1003;
    }
    
    /* Asegurar que el input sea fácil de tocar en móvil */
    .search-input {
        min-height: 44px;
        font-size: 16px; /* Evitar zoom en iOS */
    }
}

/* Asegurar que el z-index sea correcto en el header */
.header {
    position: relative;
    z-index: 1000;
}

/* Asegurar que el contenedor de iconos esté correctamente posicionado */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 5px;
    padding-right: 10px;
    position: relative;
    z-index: 1002;
}

/* Sobrescribir cualquier estilo que pueda estar ocultando la barra */
.search-bar {
    display: none;
}

.search-bar.visible {
    display: block !important;
}

/* Estilos para los íconos de navegación */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 4px; /* Reducir aún más el espacio entre iconos */
    margin-left: 5px;
    padding-right: 10px; /* Añadir un pequeño espacio a la derecha */
}

.user-icon,
.cart-icon {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 5px 3px; /* Reducir el padding horizontal */
    margin: 0 -2px; /* Ajuste fino del margen entre iconos */
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.user-icon:hover,
.cart-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #4a90e2;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para el título del sitio */
.site-title {
    font-family: 'CocoBiker', sans-serif;
    margin: 0;
    font-size: 48px;
    color: #000000 !important;
    text-transform: none;
    white-space: normal;
    line-height: 1.1;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

/* Asegurar que el enlace del título sea negro */
.site-title a,
.site-title a:link,
.site-title a:visited,
.site-title a:hover,
.site-title a:active,
.site-title a:focus {
    color: #000000 !important;
    text-decoration: none !important;
}

/* Estilos responsivos */
@media (max-width: 600px) {
    .header-content {
        padding: 0 10px;
    }
    
    .search-container {
        position: static;
        margin-left: auto;
        margin-right: 10px;
    }
    
    .search-bar {
        right: 10px;
        left: auto;
        width: calc(100% - 60px);
        max-width: 300px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .site-title {
        font-size: 28px;
    }
    
    .nav-icons {
        gap: 10px;
    }
}

/* Eliminar cualquier sombra en el contenido del header */
.header-content,
.container-fluid,
.header-left,
.header-center,
.header-right,
.header,
header > * {
    box-shadow: none !important;
}

/* Asegurar que solo el header principal tenga sombra */
header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

/* Contenedor principal del header */
.header-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
}

/* Estilos específicos para cada sección */
.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.header-center {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding: 0 15px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar {
    display: none; /* Ocultar por defecto */
    width: 100%;
    max-width: 500px;
    position: relative;
    align-items: center;
}

/* Mostrar barra de búsqueda al lado izquierdo del título en pantallas > 600px */
@media (min-width: 601px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        padding: 0 15px;
    }
    
    .header-left {
        order: 1;
        flex: 1;
        justify-content: flex-start;
    }
    
    .header-center {
        order: 2;
        flex: 0 0 auto;
        margin: 0;
        padding: 0 20px;
    }
    
    .header-right {
        order: 3;
        flex: 1;
        justify-content: flex-end;
    }
    
    .search-bar {
        /*display: flex;*/
        max-width: 300px;
        margin-right: 20px;
    }
    
    .search-bar input {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.search-bar input {
    width: 100%;
    padding: 8px 15px 8px 15px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f5f5f5;
    height: 36px;
    font-family: 'CocoGothic', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.search-bar button.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.search-bar button.search-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-bar button.search-button svg {
    width: 16px;
    height: 16px;
    color: #666;
    transition: color 0.2s ease;
}

.search-bar button.search-button:hover svg {
    color: #4a90e2;
}

.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.menu-toggle {
    padding: 5px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right a,
.header-right button {
    padding: 5px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Media query para móviles */
/* Estilos para pantallas medianas */
@media (max-width: 999px) {
    .header-content {
        padding: 0 8px;
        gap: 6px;
        justify-content: space-between;
    }
    
    .header-left,
    .header-right {
        gap: 6px;
    }
    
    .search-bar input {
        padding: 5px 25px 5px 8px;
        font-size: 12px;
    }
    header {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 0 8px;
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        height: 50px; /* Reducir altura para que coincida con la imagen */
    }
    
    .header-content {
        box-shadow: none !important;
        width: 100%;
        max-width: 100%;
        padding: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding: 0;
        display: flex;
        align-items: center;
    }
    
    /* Ajustar el tamaño de los elementos del header */
    .menu-toggle {
        transform: scale(0.7);
        margin: 0;
        padding: 5px;
        border: none;
        background: none;
    }
    
    .search-bar {
        max-width: 180px;
        flex: 1;
        margin: 0 5px;
        position: relative;
    }
    /*
    .search-bar input {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        padding: 5px 30px 5px 10px;
        height: 32px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        background: #f5f5f5;
    }
    */
    .search-button {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%) scale(0.7);
        background: none;
        border: none;
        padding: 0;
        margin: 0;
    }
    
    /* Asegurar que el contenido se ajuste */
    .header-left, 
    .header-center, 
    .header-right {
        display: flex;
        align-items: center;
        height: 100%;
        min-width: auto;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }
    
    .header-center {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: center;
        padding: 0 5px;
    }
    
    .search-bar {
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    .search-bar input {
        width: 100%;
        max-width: 100%;
        padding: 6px 30px 6px 10px;
        font-size: 13px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        background: #f5f5f5;
    }
    
    .search-bar {
        width: 100%;
        max-width: 400px;
        position: relative;
    }
    
    .search-bar input {
        width: 100%;
        padding: 5px 30px 5px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        font-size: 14px;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }
    
    /* Ajustar iconos del lado derecho */
    .header-right a, 
    .header-right button {
        padding: 5px;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
    }
    
    .menu-toggle {
        padding: 5px;
        background: none;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Asegurar que los iconos sean del mismo tamaño */
    .header-right svg {
        width: 20px;
        height: 20px;
    }
    
    /* Ajustar el logo si existe */
    .logo img {
        max-height: 30px;
        width: auto;
    }
}

/* Contenedor principal */
.container-fluid {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 8px;
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
}

/* Sidebar styles are in sidebar.css */

.logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.close-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 20px;
}

/* Navegación principal */
.main-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
}

.nav-item:hover {
    background-color: #f0f0f0;
    color: #000;
}

/* Enlaces de usuario */
.user-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.login-link,
.site-title {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.1;
    white-space: nowrap; /* Evita el salto de línea */
    word-wrap: break-word;
    display: inline-block; /* Asegura que el h1 se comporte como un bloque en línea */
}

.site-title a {
    color: #000000 !important; /* Color negro para el título */
    text-decoration: none !important;
    transition: none !important;
    display: inline-block;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.site-title, .site-title a, .site-title a:visited, .site-title a:active, .site-title a:focus, .site-title a:hover {
    color: #000000 !important;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    background-color: #fff;
}

.main-content.sidebar-open {
    margin-left: 300px;
}

/* Barra superior */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    z-index: 1000;
    background-color: white;
}

/* Reset de estilos de depuración */

/* Estilos del botón de menú */
.menu-toggle {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    z-index: 10001; /* Por encima del header */
    position: relative;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
    margin: 0;
    outline: none;
}

/* Estilos del icono del menú */
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
}

.menu-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.menu-line + .menu-line {
    margin-top: 4px;
}

/* Estilos cuando el menú está activo */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Efectos de hover */
.menu-toggle:hover {
    background-color: #f8f8f8;
}

/* Estilos de los íconos de navegación */
.nav-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-icons a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.nav-icons a:hover {
    background-color: #f5f5f5;
}

/* Contador del carrito */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 0 0 1px white; /* Borde blanco para mejor contraste */
}

/* Estilos para las líneas del menú */
.menu-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

.menu-line + .menu-line {
    margin-top: 4px;
}

/* Menu icon styles are defined at the top of the file */

.menu-text {
    font-family: 'CocoGothic', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animación del botón cuando el menú está abierto */
/* Removed */

.top-links {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: auto; /* Esto empuja el contenedor a la derecha */
}

.top-links a {
    color: #333;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 0 0 1px white; /* Borde blanco para mejor contraste */
}

/* Contenido de la página */
.page-content {
    padding: 30px;
}

/* Estilos para pantallas grandes */
@media (min-width: 1000px) {
    .header {
        left: 0;
        width: 100%;
        z-index: 10000 !important; /* Asegurar que el header esté por encima del sidebar */
        top: 0;
    }
    
    .menu-toggle {
        position: relative;
        left: 0;
        top: 0;
        z-index: 1002;
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .sidebar:not(.collapsed) ~ .header .menu-toggle {
        margin-left: 15px;
    }
}

/* Asegurar que el botón esté a la izquierda del contenido */
.content-wrapper {
    margin-left: 0; /* El margen lo maneja el sidebar */
    margin-top: 0;
    padding-top: 0;
    transition: margin-left 0.3s ease;
    position: relative;
    top: 0;
}

/* Estilos para pantallas grandes */
@media (min-width: 1000px) {
    .menu-toggle {
        position: relative;
        z-index: 10001; /* Asegurar que el botón del menú esté por encima del header */
    }
    
    .sidebar:not(.collapsed) ~ .header .menu-toggle {
        margin-left: 15px;
    }
    
    .header-left {
        padding-left: 20px;
    }
}

/* Estilos para pantallas pequeñas */
@media (max-width: 991px) {
    /* La barra de búsqueda ahora será visible en móviles */
    
    .header-center {
        flex: 1;
        text-align: center;
    }
    
    .header-right {
        justify-content: flex-end;
    }
}

/* Estilos base del header - Mobile First */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1003; /* Aseguramos que el header esté por encima del banner pero debajo del sidebar */
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header left section */
.header-left {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 15px;
    margin: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Estilos específicos para las líneas del menú */

/* Header center section */
.header-center {
    text-align: center;
    padding: 0 15px;
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0; /* Permite que el contenedor se encoja */
    max-width: 200px; /* Ancho máximo para forzar el salto de línea */
    margin: 0 auto;
}

.logo-title-container {
    position: relative;
    z-index: 1;
    display: inline-block; /* Asegura que el contenedor se ajuste al contenido */
}

.logo-title-container a {
    display: block;
    cursor: pointer;
    pointer-events: auto;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 10px 15px; /* Añade espacio alrededor del texto para mejor clic */
    margin: -10px -15px; /* Compensa el padding para mantener el diseño */
}

/* Asegura que el h1 dentro del enlace herede los estilos correctamente */
.logo-title-container a h1 {
    margin: 0;
    padding: 0;
    display: inline;
}

.site-title a:hover {
    color: #000000; /* Mantener negro al hacer hover */
    text-decoration: none;
}

.header-right {
    order: 3;
    width: auto;
    justify-content: flex-end;
    padding: 0;
    border: none;
}

/* Search bar styles */

/* Estilos base para móviles */
/*
@media (max-width: 851px) {
    .search-bar {
        display: flex;
        align-items: center;
        background: #f5f5f5;
        border-radius: 20px;
        padding: 0 15px;
        margin: 0 20px 0 10px;
        flex: 1;
        max-width: 600px;
        height: 40px;
        box-sizing: border-box;
        transition: all 0.3s ease;
        position: relative;
        z-index: 5;
        min-width: 0;
        border: 1px solid #e0e0e0;
    }
}
*/
/* Estilos para pantallas mayores a 850px */
@media (min-width: 851px) {
    .search-bar {
        display: flex;
        align-items: center;
        background: #f5f5f5;
        border-radius: 20px;
        padding: 0 15px;
        margin: 0 20px 0 10px;
        flex: 1;
        max-width: 600px;
        height: 40px;
        box-sizing: border-box;
        transition: all 0.3s ease;
        position: relative;
        z-index: 5;
        min-width: 0;
        border: 1px solid #e0e0e0;
    }
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 0 10px;
    outline: none;
    width: 100%;
    font-family: 'CocoGothic', sans-serif;
    font-size: 14px;
    color: #333;
}

.search-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 5px 10px;
    outline: none;
    width: 180px;
    font-family: 'CocoGothic', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.6;
}

.search-bar input::placeholder {
    font-weight: normal;
    opacity: 0.7;
}

/* Estilos para móviles */
@media (max-width: 991px) {
    .header-content {
        padding: 0 10px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    /* Ajustes para la barra de búsqueda en móviles */
    .search-bar {
        margin-right: 5px;
        max-width: 180px;
    }
    
    .search-bar input {
        width: 120px;
        transition: width 0.3s ease;
    }
    
    /* Mostrar solo el ícono en móviles */
    .search-bar:not(:focus-within) input {
        width: 0;
        padding: 5px 0;
        margin: 0;
        border: none;
    }
    
    .search-bar:focus-within {
        background: #f5f5f5;
    }
    
    .search-button {
        flex-shrink: 0;
        background: #e0e0e0 !important;
        width: 40px;
        height: 40px;
        min-width: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid #d0d0d0;
    }
    
    .search-bar:focus-within .search-button {
        background: #e0e0e0;
    }
}

.search-button {
    background: #e0e0e0 !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #333 !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative !important;
    z-index: 100 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.search-button:hover {
    background: #e0e0e0;
    color: #000;
}

.search-button svg {
    width: 16px;
    height: 16px;
    display: block !important;
    position: relative;
    z-index: 1;
}

/* Search button styles */
.search-bar button.search-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make sure the search icon is visible */
.search-button svg {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Estilos del icono del menú */

/* Ajustar posición del menú en pantallas grandes */
@media (min-width: 1000px) {
    .sidebar:not(.collapsed) ~ .header {
        left: 280px;
        width: calc(100% - 280px);
        transition: left 0.3s ease, width 0.3s ease;
    }
    
    .sidebar.collapsed ~ .header {
        left: 0;
        width: 100%;
        transition: left 0.3s ease, width 0.3s ease;
    }
    
    .content-wrapper {
        margin-top: 72px; /* Altura del header */
        position: relative;
        z-index: 1;
    }
}


/* Estilos del logo */
.logo {
    flex: 0 0 auto;
    margin: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 100%;
    width: auto;
    transition: transform 0.3s ease;
    display: block;
}

.logo-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    height: 40px;
}

.logo-button:hover {
    opacity: 0.8;
}

.main-nav a {
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #000000;
}

/* Estilos de la barra superior */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 15px;
}

/* Estilos de navegación */
/* Main navigation */
.main-nav {
    display: none; /* Ocultar en móviles por defecto */
    gap: 20px;
    margin-left: 30px;
}

@media (min-width: 992px) {
    .main-nav {
        display: flex;
    }
}

.main-nav a {
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    text-decoration: none;
    color: #333;
}

.main-nav a:hover {
    color: #000000;
}

/* Estilos de la barra principal del header */
.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

/* Logo */
.logo {
    flex: 1;
    text-align: center;
}

.logo img {
    max-height: 60px;
    width: auto;
}

/* Iconos de utilidad */
.utility-icons {
    display: flex;
    gap: 20px;
}

.utility-icons a {
    color: #333333;
    font-size: 18px;
    text-decoration: none;
}

/* Barra de búsqueda */
/*
.search-bar {
    position: relative;
    flex: 0 0 250px;
    max-width: 250px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
*/
/* Media queries para responsividad */
@media (max-width: 1200px) {
    .search-bar {
        flex: 0 0 220px;
        max-width: 220px;
    }
}

/*
@media (max-width: 992px) {
    .search-bar {
        flex: 0 0 180px;
        max-width: 180px;
    }
    
    .site-title {
        font-size: 42px;
    }
}
*/

/* Tablet and Desktop */
@media (min-width: 600px) {
    .header-content {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        padding: 0 30px;
        height: 70px;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        order: 1;
        flex: 1;
        justify-content: flex-start;
    }
    
    .header-center {
        order: 2;
        flex: 0 0 auto;
        padding: 0 20px;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        order: 3;
        flex: 1;
        justify-content: flex-end;
    }
    
    .search-bar {
        margin: 40px 5px 0 0;
        min-width: 200px;
    }
    
    .site-title {
        font-size: 36px;
        white-space: nowrap;
    }
    
    /* Desktop specific */
    @media (min-width: 992px) {
        .search-bar {
            display: flex;
            align-items: center;
            background: #f5f5f5;
            border-radius: 20px;
            padding: 0 15px;
            flex: 1;
            max-width: 600px;
            height: 40px;
            box-sizing: border-box;
            transition: all 0.3s ease;
            position: relative;
            z-index: 5;
            min-width: 250px;
            border: 1px solid #e0e0e0;
        }
        
        .site-title {
            font-size: 40px;
        }
    }
}

/* Navigation Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-icon,
.cart-icon {
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 0 0 1px white; /* Borde blanco para mejor contraste */
}

/* Ajustes para móviles - Menos de 600px */
/*
@media (max-width: 599px) {
*/
    .header {
        height: 56px;
        padding: 0 4px !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .header-content {
        height: 100%;
        padding: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 2px !important;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 8px !important;
        margin: 0 -4px 0 -4px !important;
        min-width: 36px;
        border: none;
        background: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
    
    .header-center {
        max-width: 100px;
        margin: 0;
        text-align: left;
        padding: 0 4px;
    }
    
    .site-title {
        font-family: 'CocoBiker', sans-serif;
        font-size: 38px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        line-height: 1.2;
    }
    
    .nav-icons {
        display: flex;
        align-items: center;
        gap: 2px !important;
        padding-right: 0;
        justify-content: flex-end;
    }
    
    .search-container {
        position: relative;
        display: flex;
        align-items: center;
        margin-right: 0;
    }
    
    .search-icon,
    .user-icon,
    .cart-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px;
        margin: 0 2px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #f0f0f0;
    }
    
    .search-icon {
        background: #f0f0f0 !important;
    }
    
    .search-icon svg,
    .user-icon svg,
    .cart-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    /*
    .search-bar {
        position: absolute;
        right: 38px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 0;
        transition: width 0.3s ease;
        overflow: hidden;
        background: white;
        border-radius: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    */
    .search-bar.active {
        width: 160px;
        border: 1px solid #4a90e2;
    }
    
    .search-bar input {
        width: 100%;
        padding: 8px 15px;
        border: none;
        border-radius: 20px;
        font-size: 14px;
        background: transparent;
        outline: none;
        height: 36px;
    }
    
    /* Ajustes para pantallas muy pequeñas */
    @media (max-width: 480px) {
        .header-center {
            max-width: 80px;
        }
        
        .site-title {
            font-size: 20px !important;
        }
        
        .search-bar.active {
            width: 140px;
        }
        
        .search-icon,
        .user-icon,
        .cart-icon {
            width: 30px !important;
            height: 30px !important;
            min-width: 30px;
        }
        
        .search-icon svg,
        .user-icon svg,
        .cart-icon svg {
            width: 16px !important;
            height: 16px !important;
        }
    }
    .header {
        height: 90px;
        padding: 0 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .header-content {
        height: 100%;
        padding: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
    }
    
    /* Menú hamburguesa */
    .menu-toggle {
        width: 40px;
        height: 40px;
        padding: 8px;
        margin: 0 -8px 0 -8px;
        border: none;
        background: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }
    
    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
    }
    
    .menu-line {
        display: block;
        width: 100%;
        height: 2px;
        background: #333;
        transition: all 0.3s ease;
    }
    
    /* Contenedor de título */
    .header-center {
        text-align: center;
        padding: 0 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0 auto;
        max-width: 180px;
    }
    
    .site-title {
        font-weight: bold;
        color: #333;
        letter-spacing: 0.5px;
        text-transform: none;
        white-space: normal;
        line-height: 1.1;
        padding: 0 5px;
        max-width: 100%;
    }
    
    /* Iconos de navegación */
    .nav-icons {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        padding-right: 4px;
    }
    
    .search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        cursor: pointer;
        background: #f5f5f5;
        border-radius: 50%;
        z-index: 11;
        position: relative;
    }
    
    .search-icon:hover {
        background: #e0e0e0;
    }
    
    .search-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        color: #333;
        text-decoration: none;
        position: relative;
    }
    
    .nav-icons svg {
        width: 22px;
        height: 22px;
    }
    
    .cart-count {
        position: absolute;
        top: -8px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        padding: 0;
        background: #f44336;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Arial, sans-serif;
        font-size: 11px;
        font-weight: bold;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        box-sizing: border-box;
        text-align: center;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
        transform: none;
    }
    
    .cart-icon {
        position: relative;
    }
    
    /* Barra de búsqueda */
    /* Contenedor de búsqueda */
    .search-container {
        position: relative;
        display: flex;
        align-items: center;
        margin-right: 10px;
    }
    
    /* Barra de búsqueda */

    @media (min-width: 1px) {
        .search-bar {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
            width: 0;
            transition: width 0.3s ease;
            overflow: hidden;
            background: white;
            border-radius: 20px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
    }
    
    
    .search-bar.expanded {
        left: 15px;
        right: 15px;
        display: block;
    }
    
    .search-bar.active {
        display: block;
    }
    
    .search-bar input {
        width: 100%;
        padding: 8px 15px;
        border: none;
        border-radius: 20px;
        font-size: 14px;
        background: transparent;
        outline: none;
        height: 36px;
    }
    
    .search-bar input:focus {
        background: white;
        border-color: #4a90e2;
    }
    
    .menu-toggle {
        margin-right: 5px;
    }
    
    .header-right {
        padding: 8px 0;
        width: 100%;
        justify-content: center;
    }
    
    .search-bar {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .site-title {
        text-align: center;
        width: 100%;
    }
    
    .nav-icons {
        display: flex;
        justify-content: end;
        gap: 20px;
        width: 100%;
    }
    
    .logo-img {
        height: 26px;
    }
/*}
*/
.search-bar input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-family: 'CocoGothic', sans-serif;
    outline: none;
    font-size: 14px;
}

.search-button {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666666;
}

/* Carrito */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menú móvil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 991px) {
    .header-content {
        padding: 0 10px;
    }
    
    .main-nav {
        display: none;
    }
    
    /* Keep search bar visible on all screen sizes */
    /*
    .search-bar {
        display: flex;
        max-width: 200px;
    }
    */
}

/* Estilos para títulos y párrafos */
h1, h2, h3, h4, h5, h6 {
    font-family: 'CocoBiker', sans-serif;
    font-weight: normal;
    margin-bottom: 0.5em;
    margin-top: 0.5em important;
}

body {
    font-family: 'CocoGothic', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 50px; /* Igual a la altura del header */
}

p {
    font-family: 'CocoGothic', sans-serif;
    font-weight: normal;
    line-height: 1.6;
    margin-bottom: 1em;
}

/* Mostrar barra de búsqueda al lado izquierdo del título en pantallas > 600px */
@media (min-width: 601px) {
    .header-content {
        display: flex;
        align-items: center;
        padding: 0 15px;
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 20px;
        margin-right: auto;
    }
    
    .header-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        padding: 0;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-left: auto;
    }
    
    /* Mover la barra de búsqueda al header-left */
    .header-left .search-bar {
        display: flex !important;
        width: 200px;
        margin: 0 10px;
        position: static;
        transform: none;
    }
    
    /* Estilos para el enlace del título */
    .logo-title-container {
        position: relative;
        z-index: 1;
        display: inline-block;
    }

    .logo-title-container a {
        display: block;
        cursor: pointer !important;
        text-decoration: none !important;
        color: inherit;
        padding: 10px 15px;
        margin: -10px -15px;
    }

    .logo-title-container a h1 {
        margin: 0;
        padding: 0;
        display: inline;
        color: #000000 !important;
    }
    
    /* Ocultar la barra de búsqueda del centro y derecha */
    .header-center .search-bar,
    .header-right .search-bar,
    .nav-icons .search-bar {
        display: none !important;
    }
    
    .search-bar input {
        padding: 8px 15px;
        font-size: 14px;
        height: 36px;
    }
    
    /* Asegurar que el menú y la barra de búsqueda estén alineados */
    .menu-toggle {
        margin-right: 10px;
    }
}

/* Cierre de la consulta de medios */




/* ================================
Ajustes definitivos solo para móviles
================================ */
@media (max-width: 480px) {

  /* ===== Ajustes definitivos para los iconos en .nav-icons ===== */
  .nav-icons {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;         /* reduce este valor a 4px o 2px si querés aún más juntos */
    column-gap: 6px !important;
    color: #333 !important;      /* color de los iconos */
  }

  /* Quita padding/margen que puede separar los iconos */
  .nav-icons > * {
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    min-width: 0 !important;
  }

  /* Forzamos tamaño desde CSS (sobrescribe atributos width/height) */
  .nav-icons svg {
    width: 16px !important;      /* ajustá: 14px,16px,18px según gusto */
    height: 16px !important;
    display: block !important;
    flex-shrink: 0 !important;
    box-sizing: content-box !important;
    /*vertical-align: middle !important;*/
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    fill: none !important;
    stroke: currentColor !important;
    color: inherit !important;
  }

  /* Botón lupa: sin fondo ni borde y sin padding extra */
  .search-container button,
  .search-icon {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
  }

  /* Ícono del carrito */
  .cart-icon {
    position: relative !important;
    padding: 0 2px !important;
    margin: 0 !important;
  }

  /* Contador del carrito (más pequeño) */
  .cart-count {
    position: absolute !important;
    top: -6px !important;
    right: -8px !important;
    font-size: 0.62rem !important;
    padding: 2px 4px !important;
    border-radius: 999px !important;
  }

}
