﻿/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --top-bar-color: #2c3e50;
    --background-color: #f5f5f5;
    --highlight-color: #e74c3c;
    --price-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background-color: var(--top-bar-color);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Search Bar in Top Bar */
.search-bar-top {
    position: relative;
    flex: 1;
    max-width: 500px;
}

/* Desktop header: keep search on the right (next to actions) */
@media (min-width: 769px) {
    .search-bar-top {
        flex: 0 0 420px;
        max-width: 420px;
        margin-left: auto;
    }
}

.search-toggle-mobile {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 12px 16px;
    margin: -12px -16px;
    min-width: 50px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    display: block; /* Shown on desktop */
}

.close-search-mobile {
    display: none; /* Hidden on desktop */
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    z-index: 10;
}

.search-bar-top input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.search-bar-top input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-bar-top input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.25);
}

.search-icon-desktop {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    border: 1px solid #e0e0e0;
}

.search-results-dropdown.show {
    display: block !important;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f8f8;
}

.search-result-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.search-result-category {
    font-size: 12px;
    color: #7f8c8d;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7f8c8d;
    min-width: 0;
}

.search-result-weight {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.05);
    color: #2c3e50;
    font-weight: 700;
    font-size: 11px;
    flex: 0 0 auto;
}

.search-result-price {
    font-weight: 700;
    color: var(--price-color);
    margin-left: 12px;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

.search-result-group-title {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #7f8c8d;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

/* Product Pulse Animation */
@keyframes productPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(231, 76, 60, 0.3);
    }
}

.product-card.pulse {
    animation: productPulse 0.6s ease-in-out 3;
}

.search-bar-top i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.restaurant-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    display: none; /* Hidden by default, shown when logo is uploaded */
}

.restaurant-logo.visible {
    display: block;
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.top-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: auto;
}

.back-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.95);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.back-arrow-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.12);
}

.back-arrow-btn:active {
    transform: scale(0.97);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 20px;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s;
    min-width: 36px;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.lang-btn.active {
    background: white;
    color: var(--top-bar-color);
}

/* Language Dropdown (hidden by default, shown on mobile) */
.lang-dropdown {
    display: none;
    padding: 6px 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.lang-dropdown:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-dropdown option {
    background: var(--top-bar-color);
    color: white;
}

    /* Cart Button */
    .cart-button {
        position: relative;
        background: var(--highlight-color);
        color: white;
        padding: 10px 16px;
        border-radius: 10px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .cart-button:hover {
        background: #c0392b;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .cart-button i {
        font-size: 18px;
    }

    .cart-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #f39c12;
        color: white;
        border-radius: 50%;
        width: 22px;
        height: 22px;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 700;
        border: 2px solid var(--top-bar-color);
    }

    .cart-badge:not(:empty) {
        display: flex;
    }

    @keyframes cartBadgeBlinkPop {
        0% { transform: scale(1); background: #f39c12; }
        15% { transform: scale(1.18); background: var(--highlight-color); }
        30% { transform: scale(1); background: #f39c12; }
        45% { transform: scale(1.14); background: var(--highlight-color); }
        60% { transform: scale(1); background: #f39c12; }
        75% { transform: scale(1.10); background: var(--highlight-color); }
        100% { transform: scale(1); background: #f39c12; }
    }

    .cart-badge.cart-badge-animate {
        animation: cartBadgeBlinkPop 0.9s ease-in-out;
    }

.admin-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background-color: var(--highlight-color);
    border-radius: 5px;
    transition: background-color 0.3s;
}

/* ==================== UX Modal (shared) ==================== */
.ux-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 10000;
}

.ux-modal {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    overflow: hidden;
}

.ux-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0;
}

.ux-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
}

.ux-modal-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.ux-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e6e6e6;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #444;
}

.ux-modal-body {
    padding: 14px 18px 18px;
    color: #2c3e50;
    font-size: 14px;
}

.ux-modal-card {
    background: #f8f9fa;
    border: 1px solid #eceff3;
    border-radius: 14px;
    padding: 14px;
    margin-top: 12px;
}

.ux-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

.ux-modal-actions {
    display: flex;
    gap: 10px;
    padding: 0 18px 18px;
}

.ux-modal-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ux-modal-btn:active {
    transform: translateY(1px);
}

.ux-modal-btn-primary {
    background: var(--highlight-color);
    color: #fff;
}

.ux-modal-btn-secondary {
    background: #eef2f5;
    color: #2c3e50;
}

.admin-link:hover {
    opacity: 0.9;
}

/* Main Container */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: white;
    padding: 25px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.04);
    position: sticky;
    top: 52px;
    height: calc(100vh - 52px);
    overflow-y: auto;
    border-radius: 0 16px 16px 0;
}

.categories-header {
    padding: 0 25px 20px;
    border-bottom: 2px solid var(--highlight-color);
    margin-bottom: 20px;
}

/* Checkout mobile layout (scoped to mobile only) */
/* MOBILE CHECKOUT: Force horizontal layout */
@media (max-width: 768px) {
    /* Center logo in top-bar on mobile checkout page */
    body.checkout-page .top-bar .container {
        position: relative !important;
    }
    body.checkout-page .top-bar .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
    }
    body.checkout-page .back-arrow-btn {
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
    
    /* Back arrow visible only on mobile */
    .back-arrow-btn { 
        display: inline-flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
        width: 34px !important; 
        height: 34px !important; 
        margin-right: 0 !important; 
        border-radius: 50% !important;
        background: transparent !important; 
        color: white !important; 
        border: 2px solid white !important;
        font-size: 18px !important; 
        line-height: 1 !important; 
        cursor: pointer !important;
        transition: all 0.3s !important;
        padding: 0 !important;
    }
    .back-arrow-btn:hover { 
        transform: scale(1.05) !important; 
        background: rgba(255,255,255,0.1) !important;
    }
    .back-arrow-btn:active { transform: scale(0.95); }
    a[data-translate="back"], a[href="../"] { display: none !important; }

    /* Cart items: single column stack */
    .cart-items { 
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Each cart-item: simple block container */
    body .cart-items .cart-item { 
        display: block !important;
        width: 100% !important;
        padding: 10px !important; 
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        background: #fff !important;
        margin-bottom: 8px !important;
        position: relative !important;
    }

    /* Checkout cart-item-row (mobile): image left (bigger), name above price, qty on far right (vertically centered) */
    body.checkout-page .cart-item .cart-item-row {
        display: grid !important;
        grid-template-columns: 72px 1fr auto !important;
        grid-template-areas:
            "img name name"
            "img price qty";
        column-gap: 10px !important;
        row-gap: 6px !important;
        align-items: start !important;
    }

    /* Image: stays on left */
    body.checkout-page .cart-item-row .cart-item-image-wrap {
        grid-area: img !important;
        width: 72px !important;
        height: 72px !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        background: #f5f5f5 !important;
    }

    body.checkout-page .cart-item-row .cart-item-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    body.checkout-page .cart-item-row .cart-item-weight-overlay {
        position: absolute !important;
        left: 6px !important;
        bottom: 6px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #fff !important;
        background: rgba(0, 0, 0, 0.6) !important;
        padding: 3px 6px !important;
        border-radius: 8px !important;
        line-height: 1 !important;
        backdrop-filter: blur(3px) !important;
    }

    /* Name: top row */
    body.checkout-page .cart-item-row .cart-item-name {
        grid-area: name !important;
        min-width: 0 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        display: block !important;
    }

    /* Price under name */
    body.checkout-page .cart-item-row .cart-item-price {
        grid-area: price !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        color: #e74c3c !important;
        text-align: left !important;
        white-space: normal !important;
        max-width: none !important;
        line-height: 1.2 !important;
        align-self: start !important;
        display: block !important;
    }

    /* Quantity controls: far right, vertically centered */
    body.checkout-page .cart-item-row .cart-item-controls {
        grid-area: qty !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        min-width: 0 !important;
        align-self: start !important;
    }

    /* Quantity controls */
    body.checkout-page .cart-item-controls .quantity-controls {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
    body.checkout-page .quantity-controls .quantity-btn:disabled {
        background: #ccc !important;
        cursor: not-allowed !important;
    }
    body .quantity-controls .quantity-btn { 
        width: 30px !important;
        height: 30px !important;
        font-size: 16px !important;
        padding: 0 !important;
        background: var(--highlight-color) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
    }
    body .quantity-controls .quantity-display { 
        min-width: 24px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
    }

    /* Remove button: red circular X in top-left */
    body.checkout-page .cart-item-row .remove-btn {
        display: flex !important;
        position: absolute !important;
        top: -8px !important;
        left: -8px !important;
        right: auto !important;
        width: 24px !important;
        height: 24px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: #e74c3c !important;
        color: #fff !important;
        border: none !important;
        box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,0.18) !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 5 !important;
    }

    /* Hide cart title on mobile */
    body.checkout-page .cart-section > .section-title[data-translate="cartItems"] {
        display: none !important;
    }
    body.checkout-page .cart-item-row .remove-btn i {
        display: none !important;
    }
    body.checkout-page .cart-item-row .remove-btn::before {
        content: '×' !important;
        font-size: 18px !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        transform: translateY(-1px);
    }

    /* Notes */
    body .cart-item .item-notes-input { 
        width: 100% !important;
        margin-top: 6px !important;
        font-size: 11px !important;
        padding: 6px !important;
        min-height: 30px !important;
    }

    .category-bar { top: 52px !important; }
}

/* Desktop: show back arrow (same style as mobile) */

.categories-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
}

.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 15px;
}

.category-btn {
    padding: 14px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

.category-btn:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--highlight-color);
    transform: translateX(4px);
}

.category-btn.active {
    background-color: var(--highlight-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Content Area */
.content {
    flex: 1;
    padding: 35px 40px;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 35px;
}

.search-bar input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fafafa;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--highlight-color);
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-bar input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-bar i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Products Container */
#products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 5px 0 30px 0;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.promo-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    background: var(--highlight-color);
    color: white;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Badge container for multiple badges */
.badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.badge-container .promo-badge {
    position: static;
    top: auto;
    right: auto;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: var(--highlight-color);
}

.product-image-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #f8f8f8;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-weight-overlay {
    position: absolute;
    left: 10px;
    bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 999px;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.product-info {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-category {
    display: none;
}

@media (min-width: 769px) {
    .categories-header {
        display: none;
    }

    .product-description {
        display: none;
    }
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    margin-bottom: 12px;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--price-color);
    letter-spacing: -0.5px;
}

.price-eur {
    font-weight: 700;
    color: inherit;
}

.price-bgn {
    font-weight: 800;
    color: inherit;
}

.price-separator {
    color: #999;
    margin: 0 4px;
    font-weight: 400;
    display: none;
}

.product-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.promo-price {
    color: var(--highlight-color) !important;
}

.product-price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.product-category {
    font-size: 12px;
    color: #999;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
}

    /* Add to Cart Button */
    .add-to-cart-btn {
        width: 100%;
        padding: 12px;
        background: var(--highlight-color);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .add-to-cart-btn:hover {
        background: #c0392b;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }

    .add-to-cart-btn:active {
        transform: translateY(0);
    }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.product-modal-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 16px;
}

.modal-close-circle {
    position: absolute;
    top: 24px;
    left: 50%;
    right: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: var(--highlight-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 2;
    transform: translateX(-50%);
}

.modal-close-circle:hover {
    background: #c0392b;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.product-modal-content {
    display: flex;
    flex-direction: column;
    width: min(860px, 100%);
    max-height: calc(100vh - 88px);
}

.product-modal-inner {
    padding: 22px;
    overflow-y: auto;
}

.product-modal-name {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.15;
    text-align: center;
}

.product-modal-weight {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-modal-image-wrap {
    position: relative;
}

.product-modal-weight-overlay {
    position: absolute;
    left: 12px;
    bottom: 12px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    backdrop-filter: blur(4px);
}

.product-modal-weight i {
    color: var(--highlight-color);
    margin-right: 6px;
}

.product-modal-qtyline {
    font-size: 16px;
    color: #666;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-modal-unitprice {
    color: #2c3e50;
}

.product-modal-unitprice-label {
    color: #7f8c8d;
    font-weight: 700;
}

.product-modal-bigprice {
    font-size: 34px;
    font-weight: 800;
    color: var(--price-color);
    margin-bottom: 0;
}

.product-modal-description {
    font-size: 15px;
    color: #666;
    line-height: 1.55;
    margin-bottom: 16px;
}

.product-modal-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    background: #f0f0f0;
}

.product-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    padding: 14px 16px;
    border-top: 1px solid #f0f0f0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
}

.product-modal-pricing {
    text-align: center;
    padding-top: 2px;
}

.product-modal-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.product-modal-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f6f7f8;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 8px 10px;
}

.product-modal-qty-controls .qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--highlight-color);
    color: #fff;
    border: none;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
}

/* Product modal qty button interactions */
.product-modal-qty-controls .qty-btn:hover {
    filter: brightness(0.95);
}

.product-modal-qty-controls .qty-btn:active {
    transform: scale(0.98);
}

.product-modal-qty-controls .qty-display {
    min-width: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    color: #2c3e50;
}

.product-modal-footer .add-to-cart-btn {
    flex: 1;
    margin-top: 0;
    height: 44px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        z-index: 100;
        border-radius: 0;
        padding: 10px 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    }

    .categories-header {
        display: none;
    }

    .categories-nav {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0 15px;
        gap: 8px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .categories-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .category-btn {
        display: inline-block;
        padding: 10px 18px;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        font-size: 14px;
        background: white;
    }

    .category-btn:hover {
        transform: none;
        border-color: var(--highlight-color);
    }

    .category-btn.active {
        background-color: var(--highlight-color);
        border-color: var(--highlight-color);
    }
}

@media (max-width: 768px) {
    /* Top bar sticky on mobile */
    .top-bar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    /* Mobile header layout: logo left, cart right, search toggle centered */
    .top-bar .container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    /* Override for checkout page - center logo */
    body:has(.checkout-container) .top-bar .container {
        display: flex !important;
        position: relative !important;
    }

    .logo {
        grid-area: logo;
        min-width: 0;
    }

    .logo h1 {
        font-size: 20px;
    }

    .search-bar-top {
        position: absolute;
        left: 0;
        top: 0;
        transform: none;
        flex: 0 0 auto;
        width: 0;
        max-width: 0;
        margin: 0;
        z-index: 5;
    }

    /* Mobile Search Toggle */
    .search-toggle-mobile {
        display: flex !important; /* Override hidden state, use flex for centering */
        z-index: 10; /* Above search-container */
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0 !important; /* cancel desktop negative margins */
        padding: 10px 12px !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Hide desktop search input on mobile, show as overlay when active */
    .search-bar-top .search-container {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        z-index: 9999;
        padding: 12px;
        justify-content: flex-start;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        pointer-events: auto;
    }

    .search-bar-top .search-container.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100vw;
        max-width: 100vw;
    }
    
    /* Hide sidebar when mobile search is active */
    body.mobile-search-open .sidebar {
        display: none !important;
    }

    .search-container input {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        box-sizing: border-box;
        background: white;
        color: #2c3e50;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        padding: 14px 50px 14px 16px;
        font-size: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .search-container input::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }
    
    .search-container input:focus {
        outline: none;
        border-color: var(--highlight-color);
        background: white !important;
    }

    .close-search-mobile {
        display: flex;
        position: absolute;
        top: 18px;
        right: 18px;
        color: #666;
        font-size: 24px;
        transform: none;
        z-index: 10000;
        background: #f0f0f0;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    /* Override Font Awesome icon positioning */
    .close-search-mobile .fa-solid,
    .close-search-mobile .fas {
        right: 12px !important;
    }

    .search-icon-desktop {
        display: none;
    }

    .search-results-dropdown {
        position: static !important;
        margin-top: 12px;
        max-height: 500px !important;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        overflow-y: auto;
        border: 1px solid #e0e0e0;
        width: 100%;
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        flex-shrink: 0; /* Don't shrink in flex container */
    }
    
    /* Ensure show class works on mobile */
    .search-results-dropdown.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 50px !important;
    }
    
    .search-result-item {
        border-bottom: 1px solid #f0f0f0;
        padding: 16px 12px !important;
        display: flex !important;
        align-items: center;
        min-height: 60px;
        width: 100%;
        box-sizing: border-box;
        background: white;
    }
    
    .search-result-info {
        flex: 1;
        display: block !important;
    }
    
    .search-result-name {
        font-size: 14px;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 4px;
    }
    
    .search-result-category {
        font-size: 11px;
        color: #7f8c8d;
    }
    
    .search-result-price {
        font-weight: 700;
        color: var(--price-color);
        font-size: 14px;
    }

    /* Desktop search icon inside input field */
    .search-icon-desktop {
        right: 12px;
        font-size: 13px;
    }
    
    /* Close button icon inside overlay */
    .close-search-mobile i {
        font-size: 18px;
    }

    .top-actions {
        gap: 6px;
        margin-left: auto;
        position: static;
        z-index: 6;
    }

    /* Hide desktop language buttons, show dropdown */
    .language-switcher {
        background: transparent;
        padding: 0;
    }

    .lang-btn {
        display: none;
    }

    .lang-dropdown {
        display: block;
        padding: 5px 8px;
        font-size: 12px;
        min-width: 50px;
    }

    .cart-button {
        padding: 8px 12px;
    }

    .cart-button i {
        font-size: 16px;
    }

    .cart-badge {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
    }

    /* Mobile: Horizontal product cards with image left, info right */
    #products-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-card {
        display: flex;
        flex-direction: row;
        height: 160px;
    }

    .product-image-wrap {
        width: 160px;
        min-width: 160px;
        height: 100%;
    }

    .product-image {
        width: 160px;
        min-width: 160px;
        height: 100%;
        object-fit: cover;
    }

    .product-info {
        flex: 1;
        padding: 12px 12px 16px 12px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }

    .product-name {
        font-size: 15px;
        margin-bottom: 5px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        white-space: normal;
    }

    /* Compact weight display on mobile */
    .product-weight {
        font-size: 11px;
        margin-bottom: 4px;
        color: #999;
    }

    .product-weight i {
        font-size: 10px;
    }

    /* Hide description on mobile */
    .product-description {
        display: none;
    }

    .product-footer {
        margin-top: auto;
    }

    .product-price {
        font-size: 18px;
    }

    .product-price-original {
        font-size: 11px;
    }

    /* EUR-only on mobile */
    .price-eur {
        font-size: 18px !important;
        line-height: 1.1;
        display: inline-block !important;
    }

    .price-bgn {
        display: none !important;
    }

    .price-container {
        gap: 0px;
        line-height: 1;
    }

    /* Horizontal price layout on mobile */
    .product-price-wrapper {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        gap: 8px;
    }

    .product-price-wrapper .product-price {
        font-size: 18px;
        display: flex;
        align-items: center;
    }

    .product-price-wrapper .product-price-original {
        font-size: 10px;
        margin-top: 0;
        display: flex;
        align-items: center;
    }

    .product-price-wrapper .price-container {
        align-items: flex-start;
        display: inline-flex;
    }

    .product-price-wrapper .price-eur {
        font-size: 18px !important;
    }

    .product-price-wrapper .price-bgn {
        display: none !important;
    }

    .add-to-cart-btn {
        padding: 8px 10px !important;
        font-size: 13px !important;
        margin-top: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 36px !important;
        height: 36px !important;
        line-height: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .product-category {
        display: none;
    }

    .promo-badge {
        top: 8px;
        right: auto;
        left: 8px;
        padding: 3px 8px;
        font-size: 9px;
        background: rgba(231, 76, 60, 0.9);
        backdrop-filter: blur(4px);
    }

    /* Horizontal badge layout on mobile - compact and semi-transparent */
    .badge-container {
        top: 8px;
        right: auto;
        left: 8px;
        flex-direction: row;
        gap: 3px;
        flex-wrap: wrap;
        max-width: 110px;
    }

    .badge-container .promo-badge {
        background: rgba(231, 76, 60, 0.9);
        backdrop-filter: blur(4px);
        padding: 3px 8px;
        font-size: 9px;
    }

    .badge-container .promo-badge[style*="27ae60"] {
        background: rgba(39, 174, 96, 0.9) !important;
    }

    /* Mobile modal adjustments - full width but auto height */
    .product-modal-shell {
        padding: 72px 0 0;
    }

    .modal-close-circle {
        top: 18px;
    }

    .modal-content {
        border-radius: 0;
        max-height: 95vh;
        height: auto;
    }

    .product-modal-inner {
        padding: 16px;
    }

    .product-modal-name {
        font-size: 22px;
    }

    .product-modal-bigprice {
        font-size: 26px;
    }

    .product-modal-image {
        height: 240px;
    }

    .product-modal-footer {
        padding: 12px 12px;
    }

    /* Modal footer controls should stay in one row on mobile */
    .product-modal-actions {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .product-modal-actions .add-to-cart-btn {
        width: auto !important;
        margin-top: 0 !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    .product-modal-qty-controls {
        flex: 0 0 auto;
    }

    .product-modal-qtyline {
        display: none !important;
    }

    .content {
        padding: 20px 15px;
    }
}

/* Product modal: place big price under image */
.product-modal-bigprice-under {
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 18px;
    }

    .product-card {
        height: 150px;
    }

    .product-image-wrap {
        width: 160px;
        min-width: 160px;
    }

    .product-image {
        width: 160px;
        min-width: 160px;
    }

    .product-name {
        font-size: 15px;
        height: auto;
        line-height: 1.35;
    }

    .product-price {
        font-size: 16px;
    }

    .modal-content {
        margin: 5% auto;
    }

    #modal-name {
        font-size: 20px;
    }

    .modal-price {
        font-size: 22px;
    }
}
