/* ================================================
   HEADER IMAGE CONTAINER OPTIMIZATION
   ================================================ */

/* Header Image Container - Maximize image size within nav */
.header-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.header-image-container .site-logo {
    max-height: 80px; /* Fixed maximum height to prevent header expansion */
    height: auto;
    width: auto;
    max-width: none; /* Remove horizontal restrictions */
    object-fit: contain;
    aspect-ratio: 2/1; /* Maintain 2:1 width to height ratio */
}

/* Ensure header container has consistent height */
.site-header:has(.header-image-container) {
    padding: 5px 0; /* Minimal padding to allow maximum image size */
    max-height: 90px; /* Constrain header height */
    overflow: hidden; /* Prevent any overflow */
}

.site-header:has(.header-image-container) .container {
    align-items: center;
    height: 80px; /* Fixed container height */
}

/* Mobile optimization for header images */
@media (max-width: 768px) {
    .header-image-container .site-logo {
        max-height: 40px; /* Adjusted mobile size */
        aspect-ratio: 2/1;
    }
    
    .site-header:has(.header-image-container) {
        padding: 8px 0; /* More padding on mobile for breathing room */
        max-height: none !important; /* Remove height restriction on mobile */
        overflow: visible !important; /* Allow content to show properly */
        min-height: 56px; /* Ensure minimum height */
    }
    
    .site-header:has(.header-image-container) .container {
        height: auto !important; /* Override fixed height */
        min-height: 40px; /* Minimum height to ensure content fits */
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-image-container {
        height: auto; /* Allow natural height on mobile */
    }
}

/* Menu Categories Layout */
.menu-categories {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Category Legend - Navigation Buttons */
.category-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.category-legend .contact-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    min-width: auto;
    text-align: center;
    cursor: pointer;
}

.category-legend .contact-button:hover,
.category-legend .contact-button:focus {
    background: rgba(0, 0, 0, 0.1);
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.category-legend .contact-button:active {
    background: rgba(0, 0, 0, 0.15);
    transform: translateY(1px);
}

/* Mobile optimization for category legend */
@media (max-width: 767px) {
    .category-legend {
        gap: 0.5rem;
        justify-content: flex-start;
        margin-bottom: 0.75rem;
    }
    
    .category-legend .contact-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        flex: 0 0 auto;
        min-width: auto;
        max-width: none;
    }
}

.menu-category {
    margin-bottom: 2rem;
}

.menu-category-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Menu Items Container */
.menu-items-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Individual Menu Item */
.menu-item {
    padding: 1.5rem !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.menu-item-header {
    margin-bottom: 0.75rem;
    display: block !important;
    width: 100% !important;
}

.menu-item-name {
    margin: 0 0 0.5rem 0;
    display: block !important;
    width: 100% !important;
}

.menu-item-price {
    font-weight: bold;
    margin: 0;
    display: inline-block !important;
    width: auto !important;
}

.menu-item-description {
    margin: 0 0 1rem 0;
    line-height: 1.5;
    display: block !important;
    width: 100% !important;
}

/* Menu Item Tags */
.menu-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-item-tag {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Add to Cart Button and Cart Icon */
.add-to-cart-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    background: rgba(0,0,0,0.08);
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s;
}

.add-to-cart-btn:hover,
.add-to-cart-btn:focus {
    background: rgba(0,0,0,0.15);
}

.cart-icon {
    font-size: 1.2em;
    vertical-align: middle;
    line-height: 1;
}

/* Quantity Selector */
.quantity-selector {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-label {
    font-weight: 600;
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.15s;
    color: var(--text);
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover,
.quantity-btn:focus {
    background: rgba(0, 0, 0, 0.1);
}

.quantity-btn:active {
    background: rgba(0, 0, 0, 0.15);
}

.quantity-input {
    border: none;
    background: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 1rem;
    width: 60px;
    height: 40px;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .quantity-selector {
        margin: 0.75rem 0;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .quantity-label {
        font-size: 0.95rem;
    }
    
    .quantity-controls {
        flex-shrink: 0;
    }
    
    .quantity-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 50px;
        height: 36px;
        font-size: 0.95rem;
    }
}

/* Menu Options */
.menu-item-options {
    margin: 1rem 0;
}

.menu-option {
    margin-bottom: 1rem;
}

.menu-option-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.menu-option-choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-choice-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-choice-input input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.menu-choice-input label {
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.choice-price {
    color: var(--primary);
    font-weight: 500;
}

/* Menu Addons */
.menu-item-addons {
    margin: 1rem 0;
}

.menu-addons-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.menu-addon-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-addon-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-addon-input input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.menu-addon-input label {
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.addon-price {
    color: var(--primary);
    font-weight: 500;
}

.included-addon {
    color: var(--success);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .menu-categories {
        gap: 4rem;
    }
    
    .menu-items-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .menu-item {
        padding: 2rem;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .menu-item-header {
        margin-bottom: 1rem;
        display: block !important;
        width: 100% !important;
    }
    
    .menu-item-name {
        margin: 0 0 0.5rem 0;
        display: block !important;
        width: 100% !important;
    }
    
    .menu-item-price {
        margin: 0;
        display: inline-block !important;
        width: auto !important;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .menu-items-container {
        gap: 3rem;
    }
}

/* Floating Cart Icon */
.floating-cart-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success-color, #32CD32);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 3px solid white;
}

.floating-cart-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: var(--primary-color, #8B4513);
}

.floating-cart-icon i {
    font-size: 1.5rem;
    position: relative;
}

.floating-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error, #FF4500);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

/* Mobile Optimization */
@media (max-width: 767px) {
    .menu-categories {
        gap: 5px;
    }
    
    .menu-category {
        margin-bottom: 5px !important;
        padding: 10px !important;
    }
    
    .menu-item {
        padding: 0 !important;
    }
}