:root {
    --orange: #F79F1F;
    --glass-bg: rgba(25, 25, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

/* --- AMBIENT OSNOVA --- */
body.ambient-theme {
    background-color: #111;
    color: var(--text-main);
    overflow-x: hidden;
}

.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55); /* Zatamnjenje za bolju čitljivost belog teksta */
    z-index: -1;
}

/* --- HEADER (GLASSMORPHISM) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2%;
    height: 5.5rem; /* fiksna visina — category-nav i tag-bar se pozicioniraju prema ovome */
}

.restaurant-logo img {
    height: 3.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.icons {
    display: flex;
    gap: 1.8rem;
    font-size: 2.2rem;
}

.icons div {
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.3s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.icons div:hover {
    color: var(--orange);
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #ff4d4d;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --- FORME I DROPDOWN MENIJI (DARK GLASS) --- */
.search-form, .cart {
    display: none;
    padding: 1.5rem 5%;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.search-form.active, .cart.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.search-form input {
    width: 100%;
    padding: 1.2rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    font-size: 1.4rem;
    outline: none;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

/* Language Dropdown */
.language-dropdown {
    position: fixed;
    top: 6.5rem;
    right: 5%;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 16rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: none;
    z-index: 1100;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.language-dropdown.active {
    display: block;
    animation: slideDown 0.2s;
}

.lang-grid { display: flex; flex-direction: column; }
.lang-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem 1.8rem;
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.lang-item:last-child { border-bottom: none; }
.lang-item:hover, .lang-item:active {
    background: rgba(255,255,255,0.1);
    color: var(--orange);
}
.lang-item img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }

/* Korpa */
.cart {
    position: fixed;
    top: 6.5rem;
    right: 5%;
    width: 32rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 1100;
    border-radius: 1.5rem;
}

.cart .box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 1rem;
}

.cart .box img { height: 5.5rem; width: 5.5rem; object-fit: cover; border-radius: 0.8rem; }
.cart .box .content h3 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 0.3rem;}
.cart .box .content .price { font-size: 1.3rem; color: var(--orange); font-weight: bold; display: block;}
.cart .box .content .quantity { font-size: 1.2rem; color: var(--text-muted); }
.cart .box .fa-trash { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: #ff4d4d; cursor: pointer; font-size: 1.6rem; }

.cart .total {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 1.5rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-main);
}

.cart .btn {
    width: 100%;
    background: var(--orange);
    color: #fff;
    padding: 1.2rem;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 700;
}

/* --- BOČNI MENI (NAVBAR) --- */
.navbar {
    position: fixed;
    top: 0;
    right: -110%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    transition: 0.4s ease-in-out;
    padding: 2.5rem;
    border-left: 1px solid var(--glass-border);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}

.navbar.active { right: 0; }
#close-menu { font-size: 2.8rem; cursor: pointer; color: var(--text-main); margin-bottom: 2rem; display: block; text-align: right; transition: color 0.3s;}
#close-menu:hover { color: var(--orange); }

.nav-content { text-align: center; color: var(--text-main); }
.nav-logo { height: 7rem; margin-bottom: 1.5rem; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }
.nav-content h3 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.nav-desc { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 2.5rem; line-height: 1.6; }
.nav-info p { font-size: 1.4rem; margin-bottom: 1.2rem; color: #ddd; display: flex; align-items: center; justify-content: center; gap: 1rem;}
.nav-info i { color: var(--orange); font-size: 1.6rem; }

.nav-socials { margin-top: 3rem; display: flex; justify-content: center; gap: 1.5rem; }
.nav-socials img { width: 3.5rem; transition: transform 0.3s; }
.nav-socials img:hover { transform: translateY(-3px); }

/* --- KATEGORIJE (PILLS) --- */
.category-nav {
    position: fixed;
    top: 5.5rem; /* = visina .header-main */
    left: 0;
    right: 0;
    background: rgba(5, 5, 5, 0.55); /* malo tamnija od headera da se razlikuje */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 998;
    border-bottom: 1px solid var(--glass-border);
}

.pill-container {
    display: flex;
    overflow-x: auto;
    padding: .7rem 5%;
    gap: .8rem;
    scrollbar-width: none; /* Firefox */
}

.pill-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.pill-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1.8rem;
    border-radius: 5rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.pill-item img { width: 2.5rem; height: 2.5rem; border-radius: 50%; margin-right: 0.8rem; object-fit: cover; }
.pill-item span { font-size: 1.3rem; color: var(--text-main); font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,0.5);}
.pill-item.active { background: var(--orange); border-color: var(--orange); box-shadow: 0 4px 10px rgba(247, 159, 31, 0.4); }
.pill-item.active span { color: #fff; text-shadow: none; }

/* --- SADRŽAJ I AMBIENT KARTICE --- */
.content-wrapper { padding: 14rem 5% 5rem 5%; }
.menu-section { scroll-margin-top: 13.5rem; margin-bottom: 4rem; }
.category-title {
    font-size: 2.4rem;
    margin: 0 0 2rem 0;
    border-left: 5px solid var(--orange);
    padding-left: 1.2rem;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    letter-spacing: 0.5px;
}

.items-grid-ambient {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.ambient-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 1.8rem;
}

.ambient-card:active {
    transform: scale(0.98);
    background: rgba(40, 40, 40, 0.7);
}

.ambient-card-content {
    display: flex;
    flex-direction: row;
    gap: 1.2rem;
    align-items: flex-start;
}

/* Thumbnail slika na kartici */
.card-thumb {
    width: 7.5rem;
    height: 7.5rem;
    flex-shrink: 0;
    border-radius: 1rem;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    display: block;
}

/* Placeholder kad nema slike */
.card-thumb-placeholder {
    width: 7.5rem;
    height: 7.5rem;
    flex-shrink: 0;
    border-radius: 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 2.5rem;
}

/* Desna strana kartice — tekst + cijena */
.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-details h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    letter-spacing: 0.3px;
}

.item-details p {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.price-ambient {
    font-size: 1.8rem;
    color: var(--orange);
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.add-btn-ambient {
    background: var(--orange);
    color: #fff;
    border: none;
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(247, 159, 31, 0.4);
    transition: transform 0.2s;
}

.add-btn-ambient:active { transform: scale(0.9); }

/* --- AMBIENT MODAL --- */
.modal-overlay-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay-ambient.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content-ambient {
    background: rgba(25, 25, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 450px;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay-ambient.active .modal-content-ambient { transform: scale(1); }

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.modal-img-wrapper {
    width: 100%;
    height: 28rem;
    background: rgba(0,0,0,0.3);
}

#modalImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 2.5rem;
    color: var(--text-main);
}

#modalTitle {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

#modalDesc {
    font-size: 1.35rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.price-large {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--orange);
}

.btn-checkout {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 1.4rem 2.5rem;
    border-radius: 1.2rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(247, 159, 31, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* Korpa - quantity dugmici */
.cart-qty {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 2.6rem;
    height: 2.6rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--orange);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--orange);
    color: #000;
}

.qty-num {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 2rem;
    text-align: center;
}


/* ── TAG FILTER BAR ─────────────────────────────────────────────── */
#tag-filter-bar {
    position: fixed;
    top: 11rem;
    left: 0;
    right: 0;
    display: flex !important;
    gap: .7rem;
    overflow-x: auto;
    padding: .6rem 5%;
    z-index: 997;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: rgba(247, 159, 31, 0.08); /* blagi topli orange tint — razlikuje se od category-nav */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(247, 159, 31, 0.2); /* orange border umjesto bijelog */
}
#tag-filter-bar::-webkit-scrollbar { display: none; }

.tag-link-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 1.1rem;
    border-radius: 5rem;
    font-size: 1.15rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}
.tag-link-item:hover {
    background: rgba(247, 159, 31, 0.2);
    border-color: rgba(247, 159, 31, 0.5);
    color: #fff;
}

/* Kad je tag bar prisutan, content treba više padding-a */
body:has(#tag-filter-bar) .content-wrapper {
    padding-top: 15rem; /* header(5.5) + cat-nav(4.5) + tag-bar(3.5) + zrak(1.5) */
}
body:has(#tag-filter-bar) .menu-section {
    scroll-margin-top: 15rem;
}
