* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #F5F5F5;
    color: #333;
    overflow-x: hidden;
}

/* Overlay întunecat pentru modal mobil */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.mobile-overlay.active {
    display: block;
}

/* MODAL CATEGORII MOBIL */
.mobile-categories-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    flex-direction: column;
}

.mobile-categories-modal.active {
    display: flex;
}

.mobile-categories-modal .modal-header {
    background: #C3232B;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.mobile-categories-modal .close-modal {
    font-size: 30px;
    cursor: pointer;
}

.mobile-categories-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Categorii în modal mobil - aliniate la stânga */
.mobile-categories-modal .category-item a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 17px;
    transition: background 0.3s ease;
}

.mobile-categories-modal .category-item a:hover {
    background-color: #f5f5f5;
    padding-left: 25px;
}

.mobile-categories-modal .category-item i {
    margin-right: 18px;
    font-size: 20px;
    color: #C3232B;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-categories-modal .category-item span {
    flex-grow: 1;
    text-align: left;
}

/* Header - fundal fullscreen roșu */
header {
    background-color: #C3232B;
    height: 72px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Container header - centrat la 1389px */
.header-container {
    max-width: 1389px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    position: relative;
}

/* Hamburger mobil - apare DOAR pe mobil */
.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1005;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }
}

/* Logo desktop */
.desktop-logo {
    display: block;
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.desktop-logo img {
    height: 50px;
    max-width: 100%;
}

/* Logo mobil - centrat perfect */
.mobile-logo {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mobile-logo img {
    height: 85px;
    max-width: 100%;
}

/* Search bar centrat */
.search-bar {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-bar form {
    display: flex;
    width: 100%;
    background: white;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-bar input {
    color: #666;
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 12px;
    outline: none;
}

.search-bar button {
    background: #FFF;
    color: #C3232B;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #f1f1f1;
}

/* Butoane contact - dreapta */
.header-contact-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: white;
    color: #C3232B;
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-btn:hover {
    background: #C3232B;
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(195,35,43,0.3);
}

/* Wrapper principal - centrat la 1389px */
.site-wrapper {
    max-width: 1389px;
    margin: 0 auto;
    position: relative;
}

/* Sidebar desktop - fixed în wrapper-ul centrat */
.sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #eee;
    padding: 10px 0;
    position: fixed;
    height: calc(100vh - 72px);
    overflow-y: auto;
    left: 50%;
    margin-left: -694.5px;
    top: 72px;
    z-index: 998;
}

.categories-title {
    padding: 0 20px 10px;
    font-weight: bold;
    color: #C3232B;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
}

.sidebar .category-item a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 10px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar .category-item a:hover {
    background-color: #F5F5F5;
    padding-left: 25px;
    color: #C3232B;
}

.sidebar .category-item i {
    margin-right: 15px;
    font-size: 16px;
    color: #333;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .category-item span {
    flex-grow: 1;
    text-align: left;
}

/* Layout general - centrat */
main {
    margin-top: 25px;
    display: flex;
    min-height: calc(100vh - 72px);
    max-width: 1389px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.content {
    margin-left: 280px;
    padding: 30px;
    width: calc(100% - 280px);
    background-color: #F5F5F5;
}

/* Grid produse - 4 pe rând pe desktop */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 243px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
    text-align: center;
}

.product-name {
    font-size: 13px;
    color:#666666;
    font-weight: normal;
    text-align: left;
    margin-bottom: 10px;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* NOU: Linia cu cod produs + preț */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.product-code {
    font-size: 10px;
    color: #666;
    font-weight: normal;
}

.product-price {
    text-align: right;
    font-size: 20px;
    color: #C3232B;
    font-weight: bold;
    margin: 10px 0;
}

.btn-comanda {
    background-color: #C3232B;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: normal;
    width: 100%;
    transition: background 0.3s;
}

.btn-comanda:hover {
    background-color: #a81a22;
}

.stare-inactiv {
    opacity: 0.6;
    pointer-events: none;
}

.stare-inactiv::after { display:none;
    content: "Indisponibil";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
}

#loading {
    text-align: center;
    padding: 40px;
    display: none;
}

#loading p {
    font-size: 16px;
    color: #666;
}

/* Buton Back to Top */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #C3232B, #a01c22);
    color: white;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(195, 35, 43, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    justify-content: center;
}

#backToTopBtn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 30px rgba(195, 35, 43, 0.4);
    background: linear-gradient(135deg, #d12a33, #b01f25);
}

#backToTopBtn svg {
    transition: transform 0.3s ease;
}

#backToTopBtn:hover svg {
    transform: translateY(-3px);
}

#backToTopBtn.show {
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE MOBIL */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .desktop-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .search-bar {
        position: absolute;
        top: 80px;
        left: 15px;
        right: 15px;
        margin: 0;
        padding: 0 10px;
        max-width: none;
    }

    .search-bar form {
        border-radius: 30px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        width: 100%;
        padding: 100px 15px 20px 15px;
    }

    .header-container {
        padding: 0 30px;
    }

    .header-contact-buttons {
        gap: 10px;
    }

    .contact-btn {
        width: 22px;
        height: 22px;
        font-size: 18px;
    }

    .product-image {
        height: 230px;
    }

    .product-name {
        font-size: 13px;
        height: 68px;
    }

    .product-price {
        font-size: 16px;
    }

    .btn-comanda {
        padding: 10px;
        font-size: 14px;
    }
}

/* Footer - full și deasupra sidebar-ului */
.site-footer {
    background-color: #333;
    color: #ddd;
    font-size: 14px;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.footer-container {
    max-width: 1389px;
    margin: 0 auto;
    padding: 50px 30px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-column h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #C3232B;
}

.contact-info p {
    line-height: 1.8;
}

.contact-info a {
    color: #C3232B;
    font-weight: bold;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #555;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 18px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: #C3232B;
    transform: translateY(-3px);
}

/* Footer bottom */
.footer-bottom {
    background-color: #222;
    padding: 20px 0;
    font-size: 13px;
    color: #aaa;
}

.footer-bottom-container {
    max-width: 1389px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.legal-links a {
    color: #aaa;
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: #C3232B;
}

/* Cookie Consent Banner */
.cookie-consent {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    padding: 15px 20px;
    z-index: 10000;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-link {
    color: #C3232B;
    text-decoration: underline;
}

.btn-cookie-accept {
    background: #C3232B;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cookie-accept:hover {
    background: #a81a22;
}

/* Responsive footer */
@media (max-width: 992px) {
    .footer-container {
        padding: 40px 20px 20px;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
    }

    .legal-links {
        margin-bottom: 10px;
    }

    .legal-links a {
        margin: 0 10px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        margin-top: 10px;
    }
}