/* ========================================
   HEADER TIENDANIMAL - ESTILOS CSS PUROS
   Basado en diseño Figma
   ======================================== */

/* Variables CSS */
:root {
    --primary-color: #228800;
    --secondary-color: #2C3E50;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #E5E5E5;
    --background-color: #FFFFFF;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Fuentes Nunito cargadas localmente via fonts.css */

/* Reset y base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
}

/* ========================================
   HEADER PRINCIPAL
   ======================================== */

.site-header {
    background-color: var(--background-color);
   /*box-shadow: var(--shadow);*/
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    overflow: visible;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    margin-top: 12px;
    overflow: visible;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 32px;
}

/* ========================================
   LOGO SECTION
   ======================================== */

.header-logo {
    flex: 0 0 auto;
    min-width: 200px;
}

.custom-logo-link {
    display: inline-block;
    text-decoration: none;
    transition: var(--transition);
    cursor:pointer;
}

.custom-logo-link:hover {
   /* opacity: 0.8;*/
}

.custom-logo {
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    cursor:pointer;
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 32px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100% !important;
    height: 48px !important;
    padding: 12px 50px 12px 16px !important;
    border: 2px solid var(--border-color);
    border-radius: .5rem !important;
    background-color: #F9FAFB;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-color);
    transition: var(--transition);
    outline: none  !important;
}

.search-input::placeholder {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 400;
}

.search-input:focus {
    border-color: var(--primary-color);
    background-color: var(--background-color);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.search-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius:0 .5rem .5rem 0;
    background-color: var(--primary-color);
    background-color:#7AB800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.search-button:hover {
    background-color: #008A42;
    /*transform: translateY(-50%) scale(1.05);*/
}

.search-button:active {
    transform: translateY(-50%) scale(0.95);
}

.search-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* ========================================
   RIGHT SECTION - VERTICAL STORE LINKS
   ======================================== */

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

.store-item {
    display: flex;
    align-items: center;
}

/* Vertical Store Links */
.store-link-vertical {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 90px;
    height: 60px;
    justify-content: center;
    align-self: flex-start;
}

.store-link-vertical:hover {
    color: var(--primary-color);
}

.store-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: transparent;
    transition: var(--transition);
}

.store-link-vertical:hover .store-icon-container {
  /*  background-color: rgba(0, 166, 81, 0.1);*/
    transform: scale(1.1);
}

.store-icon-container svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    transition: var(--transition);
}

.store-text-vertical {
    display: block;
    text-align: center;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin-top:4px;
}

/* ========================================
   MOBILE MENU
   ======================================== */

.header-mobile-menu {
    display: none;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px;
    box-shadow: none !important;
}

.mobile-menu-toggle:hover {
    background-color: #F8F9FA;
    color: var(--primary-color);
}

.mobile-menu-toggle.active {
    background-color: var(--primary-color);
    color: white;
}

.mobile-menu-toggle svg {
    display: none;
}

/* Hamburger bars - 3 lines only */
.mobile-menu-toggle::before,
.mobile-menu-toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background-color: currentColor;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle::before {
    top: 14px;
}

.mobile-menu-toggle::after {
    bottom: 14px;
}

/* Middle bar using the button itself */
.mobile-menu-toggle {
    background: linear-gradient(to right, currentColor 0%, currentColor 100%);
    background-size: 24px 3px;
    background-position: center;
    background-repeat: no-repeat;
}

.mobile-menu-toggle.active {
    background: linear-gradient(to right, currentColor 0%, currentColor 100%);
    background-size: 24px 3px;
    background-position: center;
    background-repeat: no-repeat;
}

.mobile-menu-toggle.active::before {
    transform: translateY(0) rotate(45deg);
    top: 20px;
}

.mobile-menu-toggle.active::after {
    transform: translateY(0) rotate(-45deg);
    bottom: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
        margin-top:0;
    }
    
    .header-content {
        height: 70px;
        gap: 24px;
    }
    
    .header-logo {
        min-width: 150px;
    }
    
    .custom-logo {
        height: 45px;
    }
    
    .header-search {
        margin: 0 20px;
    }
    
    .search-input {
        height: 44px;
        font-size: 13px;
    }
    
    .header-right {
        gap: 16px;
    }
    
    .store-link-vertical {
        min-width: 75px;
        height: 55px;
        padding: 6px 12px;
    }
    
    .store-icon-container {
        width: 24px;
        height: 24px;
    }
    
    .store-icon-container svg {
        width: 16px;
        height: 16px;
    }
    
    .store-text-vertical {
        font-size: 9px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .header-content {
        height: 60px;
        gap: 16px;
    }
    
    .header-logo {
        min-width: 120px;
    }
    
    .custom-logo {
        height: 40px;
    }
    
    .header-search {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        max-width: 100%;
        margin: 0;
        padding: 12px 16px;
        background-color: var(--background-color);
        border-bottom: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }
    
    .header-search.active {
        opacity: 1;
        visibility: visible;
    }
    
    .header-right {
        display: none;
    }
    
    .header-mobile-menu {
        display: block;
    }
    
}

/* Mobile Small */
@media (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }
    
    .header-content {
        height: 56px;
        gap: 12px;
    }
    
    .header-logo {
        min-width: 100px;
    }
    
    .custom-logo {
        height: 35px;
    }
}

/* ========================================
   ANIMACIONES Y EFECTOS
   ======================================== */

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

.site-header {
    animation: fadeInDown 0.5s ease-out;
}

/* Efecto hover para el logo */
/*
.custom-logo-link {
    position: relative;
    overflow: hidden;
}

.custom-logo-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 166, 81, 0.1), transparent);
    transition: left 0.5s ease;
}

.custom-logo-link:hover::before {
    left: 100%;
}
*/

/* ========================================
   ACCESIBILIDAD
   ======================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Focus visible para navegación por teclado */
.nav-icon:focus-visible,
.search-button:focus-visible,
.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   UTILIDADES
   ======================================== */

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ========================================
   DEBUG (solo para desarrollo)
   ======================================== */

/* .header-content {
    border: 2px solid red;
}

.header-logo {
    border: 2px solid blue;
}

.header-search {
    border: 2px solid green;
}

.header-nav {
    border: 2px solid orange;
} */