/* ==================== CSS VARIJABLE ==================== */
:root {
    --primary: #3f8f8b;
    --primary-light: #5aa9a5;
    --secondary: #009991;
    --accent: #2d7571;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6B7280;
    --bg: #F9FAFB;
    --card-bg: #FFFFFF;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==================== MAINTENANCE SCREEN ==================== */
.maintenance-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.maintenance-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.maintenance-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== PROMOTIONAL POPUP ==================== */
.promo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.promo-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.promo-image {
    width: 100%;
    height: auto;
    display: block;
}

.promo-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 10;
}

.promo-close:hover {
    transform: scale(1.1);
    background: white;
}

.promo-close img {
    width: 16px;
    height: 16px;
}

/* ==================== HEADER - SLIM DESIGN ==================== */
.header-slim {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 700;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.restaurant-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.restaurant-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.restaurant-location {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.header-icon-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.header-icon-btn img {
    width: 18px;
    height: 18px;
}

/* ==================== LANGUAGE BAR ==================== */
.language-bar {
    background: white;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 59px;
    z-index: 99;
}

.language-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.language-container::-webkit-scrollbar {
    display: none;
}

.language-chip {
    padding: 0.4rem 0.9rem;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-medium);
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.language-chip:hover {
    background: var(--primary-light);
    color: white;
}

.language-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.language-flag {
    font-size: 1.1rem;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-logo {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* ==================== STICKY SERVICE TYPES BAR ==================== */
.service-types-sticky {
    position: sticky;
    top: 59px;
    background: white;
    padding: 0.75rem 1rem;
    z-index: 90;
    display: none;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.service-types-sticky::-webkit-scrollbar {
    display: none;
}

.service-types-sticky.active {
    display: flex;
}

.service-type-chip {
    background: var(--bg);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-medium);
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-type-chip:hover {
    transform: translateY(-1px);
    background: var(--primary-light);
    color: white;
}

.service-type-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== SEARCH BAR ==================== */
.search-bar-container {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(63, 143, 139, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

.search-input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: transparent;
    flex: 1;
    font-weight: 600;
}

.search-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.clear-search {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: var(--transition);
}

.clear-search:hover {
    opacity: 1;
}

.clear-search img {
    width: 100%;
}

/* ==================== MAIN CONTAINER ==================== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 200px);
}

/* ==================== SERVICE TYPES GRID ==================== */
.service-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    
}

.service-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.service-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
}
.service-types-sticky.active {justify-content: center !important; }

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.category-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow);
}

.category-image {
    width: 100%;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.category-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
}

/* ==================== ITEMS GRID ==================== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.item-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: var(--transition);
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.item-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px rgba(63, 143, 139, 0.15);
}

.item-image-container {
    width: 100%;
    height: 150px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    z-index: 2;
}

.item-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: var(--shadow);
}

.badge-featured {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.unavailable-badge {
    background: rgba(239, 68, 68, 0.95);
}

.special-badge {
    background: linear-gradient(135deg, #FF6B6B, #FF4444);
}

.item-body {
    padding: 1rem;
}

.item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-description {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.item-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.item-portion {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

/* ==================== BACK BUTTON ==================== */
.back-btn {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

/* ==================== WHATSAPP FLOATING ==================== */
.whatsapp-floating {
    position: fixed;
    right: 1.25rem;
    bottom: 100px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 98;
    text-decoration: none;
}

.whatsapp-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1rem 0.75rem;
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    transition: var(--transition);
    flex: 1;
    text-decoration: none;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-right: 2.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--text-light);
    transform: scale(1.1);
}

.modal-close img {
    width: 14px;
}

.info-content {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 0.95rem;
}

.info-content p {
    margin-bottom: 1rem;
}

.info-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.powered-by {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.powered-by a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

/* ==================== LOADING STATE ==================== */
.loading-state {
    text-align: center;
    padding: 4rem 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(63, 143, 139, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

.unavailable {
    opacity: 0.55;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 400px) {
    .items-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* ==================== FEATURED VRSTE USLUGA ==================== */

.service-types-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-card-featured {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}

.service-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-card-featured:hover::before {
    left: 100%;
}

.service-card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(63, 143, 139, 0.3);
}

.service-icon-large {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.service-name-large {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ==================== FEATURED ITEMS SEKCIJA ==================== */

.featured-items-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.section-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.4));
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.section-separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
}

.separator-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}

.separator-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== ITEMS DIRECT VIEW (za Dnevna jela) ==================== */

.items-direct-view {
    margin-top: 1rem;
}

/* ==================== RESPONSIVE ==================== */

@media (min-width: 600px) {
    .service-types-featured {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 400px) {
    .service-icon-large {
        font-size: 3.5rem;
    }
    
    .service-name-large {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
}

/* ==================== DODAJ OVO AKO NEMAŠ (nakon featured stilova) ==================== */

.category-title-header {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0 1.5rem 0;
    color: var(--text-dark);
}

.items-direct-view {
    margin-top: 1rem;
}