/**
 * Menu Page Styles - Diseño Limpio y Funcional
 * Horchata Mexican Food - Página de Menú
 */

/* =============================================
   OVERRIDE BOOTSTRAP PARA FORZAR HORIZONTAL
   ============================================= */
.category-navigation .row {
    display: block !important;
}

.category-navigation .col-12 {
    width: 100% !important;
    flex: none !important;
    max-width: none !important;
}

/* =============================================
   CATEGORY NAVIGATION CONTAINER
   ============================================= */
.category-navigation {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.category-filters-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    max-width: 90%;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #f8f9fa;
}

.category-filters-container::-webkit-scrollbar {
    height: 8px;
}

.category-filters-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.category-filters-container::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.category-filters-container::-webkit-scrollbar-thumb:hover {
    background: #b8941f;
}

.category-filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    color: #1a1a1a;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-filter-btn.active {
    background: #d4af37;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.category-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.category-filter-btn:hover .category-image img {
    transform: scale(1.05);
}

.category-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: normal;
    word-wrap: break-word;
    hyphens: auto;
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

/* =============================================
   CATEGORY HEADER STYLES
   ============================================= */
.category-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}

/* =============================================
   MENU HERO SECTION
   ============================================= */
.menu-hero-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.4) 100%), 
                url('../images/hero/heromenu.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.menu-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.1) 0%, rgba(244, 208, 63, 0.05) 100%);
    z-index: 1;
}

.menu-hero-content {
    position: relative;
    z-index: 2;
}

.menu-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.menu-hero-title .text-primary-custom {
    color: #d4af37;
}

.menu-hero-description {
    font-size: 1.2rem;
    color: #cccc;
    margin-bottom: 0;
}

/* =============================================
   CATEGORY NAVIGATION - FORZAR HORIZONTAL
   ============================================= */
.category-navigation {
    background: #f8f9fa !important;
    padding: 2rem 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

.category-navigation-wrapper {
    position: relative;
    max-width: 90%;
    margin: 0 auto;
}

/* =============================================
   CATEGORY SIDEBAR
   ============================================= */
.category-sidebar {
    position: sticky;
    top: 100px;
    padding: 1rem 0;
}

.category-sidebar-header {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.category-toggle-btn {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e0d5b3;
    border-radius: 10px;
    background: #fff8e6;
    color: #b9911d;
    font-weight: 600;
    margin-bottom: 0.8rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-toggle-btn i {
    transition: transform 0.2s ease;
}

.category-toggle-btn.open {
    background: #d4af37;
    color: #ffffff;
}

.category-toggle-btn.open i {
    transform: rotate(180deg);
}

.category-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.category-sidebar-list .category-filter-btn {
    all: unset;
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
    color: #3a3a3a;
    font-weight: 500;
    letter-spacing: 0.2px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
    cursor: pointer;
}

.category-sidebar-list .category-filter-btn:hover {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
    padding-left: 1rem;
}

.category-sidebar-list .category-filter-btn.active {
    color: #d4af37;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.15);
    position: relative;
    padding-left: 1rem;
}

.category-sidebar-list .category-filter-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    border-radius: 2px;
    background: #d4af37;
}

@media (max-width: 991px) {
    .category-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .category-toggle-btn {
        display: flex;
    }
    
    .category-sidebar-list {
        display: none;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        padding: 0.6rem 0.4rem;
        background: #ffffff;
    }
    
    .category-sidebar-list.open {
        display: flex;
    }
}

@media (min-width: 992px) {
    .category-toggle-btn {
        display: none !important;
    }
    
    .category-sidebar-list {
        display: flex !important;
        background: transparent;
        border: none;
        padding: 0;
    }
}

/* Flechas de navegación de categorías */
.category-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #d4af37;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.category-nav-arrow:hover {
    opacity: 1 !important;
    background: #c09f30;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.category-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.category-nav-arrow-left {
    left: -40px;
}

.category-nav-arrow-right {
    right: -40px;
}

.category-nav-arrow i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .category-nav-arrow {
        width: 35px;
        height: 35px;
    }
    
    .category-nav-arrow-left {
        left: -30px;
    }
    
    .category-nav-arrow-right {
        right: -30px;
    }
}

@media (max-width: 480px) {
    .category-navigation-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .category-nav-arrow {
        width: 30px;
        height: 30px;
        opacity: 0.8;
    }
    
    .category-nav-arrow-left {
        left: 0;
    }
    
    .category-nav-arrow-right {
        right: 0;
    }
}

.category-filters-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    align-items: center !important;
    overflow-x: auto !important;
    padding: 0 1rem !important;
    white-space: nowrap !important;
}

#categoryFilters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

/* Botones de categoría con iconos - FORZAR HORIZONTAL */
.category-filter-btn {
   
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 10px !important;
    border: none !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    min-width: 100px !important;
    max-width: 180px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

.category-filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.category-filter-btn.active {
    background: #d4af37;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    color: #d4af37;
}

.category-filter-btn:hover .category-icon {
    transform: scale(1.1);
    color: #d4af37;
}

.category-filter-btn.active .category-icon {
    transform: scale(1.1);
    color: #ffffff;
}

.category-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #1a1a1a;
}

.category-filter-btn:hover .category-name {
    color: #1a1a1a;
}

.category-filter-btn.active .category-name {
    color: #ffffff;
    font-weight: 700;
}

.category-filter-btn.active .category-name {
    color: #ffffff;
    font-weight: 700;
}

/* Efecto ripple */
.category-filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.category-filter-btn:active::before {
    width: 300px;
    height: 300px;
}

/* =============================================
   SEARCH SECTION
   ============================================= */
.search-section {
    background: #ffffff;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-container input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.search-container input:focus {
    outline: none;
}

.search-container button {
    background: #d4af37;
    border: none;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background: #c09f30;
}

/* =============================================
   MENU CONTENT
   ============================================= */
.menu-content-section {
    background: #ffffff;
    padding: 4rem 0;
}

.menu-content-wrapper {
    position: relative;
}

/* Loading State */
.menu-loading-state {
    text-align: center;
    padding: 4rem 0;
}

.loading-animation {
    position: relative;
}

.loading-spinner {
    animation: spin 2s linear infinite;
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-description {
    color: #666666;
    margin-bottom: 2rem;
}

/* Empty State */
.menu-empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-icon {
    color: #d4af37;
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.empty-title {
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #666666;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   PRODUCT CARDS
   ============================================= */
.product-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-actions .add-to-cart-btn {
    flex: 1;
    min-width: 140px;
}

.product-actions .view-details-btn {
    flex: 1;
    min-width: 140px;
}

.add-to-cart-btn {
    flex: 1;
    background: #d4af37;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: #c09f30;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* =============================================
   CATEGORY SECTIONS
   ============================================= */
.menu-category {
    margin-bottom: 4rem;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #d4af37, #f4d03f);
    border-radius: 2px;
}

.category-description {
    color: #666666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.category-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .menu-hero-title {
        font-size: 2.5rem;
    }
    
    .menu-hero-description {
        font-size: 1rem;
    }
    
    .category-navigation {
        padding: 1rem 0;
    }
    
    .category-filters-container {
        justify-content: flex-start;
        gap: 0.3rem;
        padding: 0 0.5rem;
    }
    
    .category-filter-btn {
        min-width: 70px;
        max-width: 80px;
        padding: 12px 8px;
    }
    
    .category-icon {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .category-name {
        font-size: 0.65rem;
    }
    
    .category-products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .empty-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .category-navigation {
        padding: 0.8rem 0;
    }
    
    .category-filter-btn {
        min-width: 60px;
        max-width: 70px;
        padding: 10px 6px;
    }
    
    .category-icon {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .category-name {
        font-size: 0.6rem;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-container input {
        border-radius: 15px 15px 0 0;
    }
    
    .search-container button {
        border-radius: 0 0 15px 15px;
    }
}