/* Modern Light Template CSS */

.stolik-menu-container.template-modern {
    background-color: var(--stolik-bg-color, #ffffff);
    --stolik-sold-out-badge-bg: linear-gradient(135deg, #ff4d4f, #ff7a45);
    --stolik-sold-out-badge-color: #ffffff;
    --stolik-sold-out-badge-shadow: 0 8px 20px rgba(255, 77, 79, 0.35);
    --stolik-sold-out-badge-radius: 999px;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 960px;
    margin: 0 auto;
    font-family: var(--stolik-base-font-family, inherit);
    position: relative;
    overflow-x: hidden;
}

.template-modern .menu-logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .template-modern .menu-logo-container {
        padding-top: 45px !important;
        margin-bottom: 30px;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100%;
    }
}

.template-modern .menu-logo {
    display: inline-block;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100% !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    margin: 0;
    object-fit: contain; /* Prevents distortion even if dimensions are forced */
    align-self: center;  /* Prevents flexbox vertical stretching */
    flex-shrink: 0;      /* Prevents the logo from being crushed by text */
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .template-modern .menu-logo {
        width: -moz-fit-content;
        width: fit-content;
    }
}

.template-modern .menu-title {
    color: var(--stolik-menu-title-font-color, #ffffff);
    font-family: var(--stolik-menu-title-font-family, inherit);
    font-size: var(--stolik-menu-title-font-size, 32px);
    font-weight: var(--stolik-menu-title-font-weight, 700);
    font-style: var(--stolik-menu-title-font-style, normal);
    text-decoration: var(--stolik-menu-title-text-decoration, none);
    text-align: center;
    margin-bottom: 35px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-inline: clamp(16px, 8vw, 120px);
    overflow-wrap: anywhere;
}

/* When logo is disabled, reserve vertical space for absolute language switcher */
.template-modern .stolik-language-ui + .menu-title {
    margin-top: 52px;
}

.template-modern .stolik-categories-container {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 2px 16px;
    margin: 0 0 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.template-modern .stolik-categories-wrapper .stolik-categories-container {
    padding-left: 44px;
    padding-right: 44px;
}

.template-modern .stolik-scroll-btn {
    color: #ffffff;
    background: rgba(22, 52, 78, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
}

.template-modern .stolik-scroll-btn:hover {
    transform: translateY(-50%) scale(1.06);
}

.stolik-menu-modern .stolik-categories-wrapper .stolik-scroll-btn,
.template-modern .stolik-categories-wrapper .stolik-scroll-btn {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #2b3931 !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    top: 50% !important;
    transform: translateY(calc(-50% - 6px)) !important;
}

.stolik-menu-modern .stolik-categories-wrapper .stolik-scroll-btn:hover,
.template-modern .stolik-categories-wrapper .stolik-scroll-btn:hover {
    background-color: rgba(255, 255, 255, 1) !important;
}

.template-modern .stolik-categories-container::-webkit-scrollbar { display: none; }

.template-modern .category-item:not(.stolik-super-category-pill) {
    color: var(--stolik-nav-text-color, #ffffff);
    font-family: var(--stolik-nav-font-family, inherit);
    font-size: var(--stolik-nav-font-size, 16px);
    font-weight: var(--stolik-nav-font-weight, bold);
    font-style: var(--stolik-nav-font-style, normal);
    text-decoration: var(--stolik-nav-text-decoration, none);
    background: var(--stolik-nav-button-bg, rgba(255, 255, 255, 0.1));
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 0 0 auto;
    width: auto;
    display: inline-block;
    margin: 0;
}

.template-modern .stolik-categories-container .stolik-category-pill {
    flex: 0 0 auto;
    width: auto;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    text-align: center;
    margin: 0;
}

.template-modern .category-item:not(.stolik-super-category-pill):hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-modern .category-item:not(.stolik-super-category-pill).active {
    background: var(--stolik-nav-button-active-bg, rgba(255, 255, 255, 0.9));
    color: var(--stolik-nav-button-active-color, var(--stolik-accent-color, #3498db));
    border-bottom: 3px solid var(--stolik-accent-color, #3498db);
    font-weight: var(--stolik-nav-font-weight, bold);
    font-style: var(--stolik-nav-font-style, normal);
    text-decoration: var(--stolik-nav-text-decoration, none);
}

.template-modern .menu-container {
    background: var(--stolik-item-bg-color, #ffffff);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--stolik-accent-color, #3498db);
    backdrop-filter: blur(10px);
}

.template-modern .category-header {
    margin: 30px 0 20px 0;
    border-bottom: 2px solid var(--stolik-accent-color, #3498db);
    padding-bottom: 10px;
}

.template-modern .category-header:first-child {
    margin-top: 0;
}

.template-modern .category-title {
    color: var(--stolik-category-title-font-color, var(--stolik-accent-color, #3498db));
    font-family: var(--stolik-category-title-font-family, inherit);
    font-size: var(--stolik-category-title-font-size, 22px);
    font-weight: var(--stolik-category-title-font-weight, 700);
    font-style: var(--stolik-category-title-font-style, normal);
    text-decoration: var(--stolik-category-title-text-decoration, none);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.template-modern .menu-item.normal-item {
    background-color: var(--stolik-item-bg-color, #ffffff);
    border: 1px solid var(--stolik-item-border-color, #e9ecef);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.template-modern .menu-item.normal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--stolik-accent-color, #3498db);
}

.template-modern .menu-item.featured-item {
    background-color: var(--stolik-featured-item-bg-color, #fff3cd);
    border: 1px solid var(--stolik-featured-item-border-color, #ffeaa7);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.template-modern .featured-star {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #ffffff;
    color: #ffd700;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    border: 2px solid #ffd700;
    z-index: 2;
}

.template-modern[data-star-uses-accent="1"] .featured-star {
    color: var(--stolik-accent-color, #3498db);
    border-color: var(--stolik-accent-color, #3498db);
}

.template-modern[data-show-star="0"] .featured-star,
.template-modern .featured-star[data-hidden="1"] {
    display: none !important;
}

.template-modern .menu-item.featured-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.template-modern .item-image {
    flex-shrink: 0;
    margin-right: 15px;
    margin-bottom: 15px;
}

.template-modern .menu-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    background-color: var(--stolik-image-bg-color, #f5f5f5);
    border: 1px solid var(--stolik-image-border-color, #e0e0e0);
    transition: all 0.3s ease;
}

.template-modern .menu-item:hover .menu-item-image {
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .template-modern .item-image {
        width: 100%;
        margin: 0 0 14px 0;
        align-self: stretch;
    }

    .template-modern .menu-item-image,
    .template-modern .item-image img {
        width: 100%;
        max-width: 100%;
        height: clamp(170px, 54vw, 300px);
        object-fit: cover;
        display: block;
    }
}

@media (max-width: 360px) {
    .template-modern .menu-title {
        font-size: clamp(20px, var(--stolik-menu-title-font-size, 32px), 30px) !important;
    }

    .template-modern .menu-item-image,
    .template-modern .item-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: clamp(160px, 58vw, 260px) !important;
        object-fit: cover;
        display: block;
    }
}


.template-modern .menu-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-height: 140px;
}

.template-modern .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.template-modern .normal-item .item-name {
    color: var(--stolik-item-title-font-color, #2c3e2c);
    font-family: var(--stolik-item-title-font-family, inherit);
    font-size: var(--stolik-item-title-font-size, 18px);
    font-weight: var(--stolik-item-title-font-weight, 700);
    font-style: var(--stolik-item-title-font-style, normal);
    text-decoration: var(--stolik-item-title-text-decoration, none);
    margin-bottom: 8px;
    line-height: 1.3;
}

.template-modern .featured-item .item-name {
    color: var(--stolik-featured-item-title-font-color, #2c3e2c);
    font-family: var(--stolik-featured-item-title-font-family, inherit);
    font-size: var(--stolik-featured-item-title-font-size, 20px);
    font-weight: var(--stolik-featured-item-title-font-weight, 700);
    font-style: var(--stolik-featured-item-title-font-style, normal);
    text-decoration: var(--stolik-featured-item-title-text-decoration, none);
    margin-bottom: 10px;
    line-height: 1.3;
}

.template-modern .normal-item .item-description {
    color: var(--stolik-item-desc-font-color, #6b7669);
    font-family: var(--stolik-item-desc-font-family, inherit);
    font-size: var(--stolik-item-desc-font-size, 14px);
    font-weight: var(--stolik-item-desc-font-weight, normal);
    font-style: var(--stolik-item-desc-font-style, normal);
    text-decoration: var(--stolik-item-desc-text-decoration, none);
    line-height: 1.5;
    margin-bottom: 12px;
}

.template-modern .featured-item .item-description {
    color: var(--stolik-featured-item-desc-font-color, #5a5a5a);
    font-family: var(--stolik-featured-item-desc-font-family, inherit);
    font-size: var(--stolik-featured-item-desc-font-size, 14px);
    font-weight: var(--stolik-featured-item-desc-font-weight, normal);
    font-style: var(--stolik-featured-item-desc-font-style, normal);
    text-decoration: var(--stolik-featured-item-desc-text-decoration, none);
    line-height: 1.5;
    margin-bottom: 15px;
}

.template-modern .normal-item .item-price {
    color: var(--stolik-item-price-font-color, #7b8e79);
    font-family: var(--stolik-item-price-font-family, inherit);
    font-size: var(--stolik-item-price-font-size, 16px);
    font-weight: var(--stolik-item-price-font-weight, bold);
    font-style: var(--stolik-item-price-font-style, normal);
    text-decoration: var(--stolik-item-price-text-decoration, none);
    text-align: right;
    display: block;
    margin-top: 10px;
}

.template-modern .featured-item .item-price {
    color: var(--stolik-featured-item-price-font-color, #7b8e79);
    font-family: var(--stolik-featured-item-price-font-family, inherit);
    font-size: var(--stolik-featured-item-price-font-size, 18px);
    font-weight: var(--stolik-featured-item-price-font-weight, bold);
    font-style: var(--stolik-featured-item-price-font-style, normal);
    text-decoration: var(--stolik-featured-item-price-text-decoration, none);
    text-align: right;
    display: block;
    margin-top: 12px;
}

.template-modern .item-content {
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (max-width: 768px) {
    .template-modern .stolik-menu-container {
        padding: 25px 20px;
        margin: 10px;
    }

    .template-modern .menu-title {
        font-size: var(--stolik-menu-title-font-size, 32px);
        margin-bottom: 25px;
    }

    .template-modern .stolik-categories-container {
        gap: 10px;
        margin-bottom: 30px;
    }

    .template-modern .category-item {
        padding: 10px 18px;
        font-size: 14px;
    }

    .template-modern .menu-container {
        padding: 20px 15px;
    }

    .template-modern .menu-item {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        min-height: auto;
    }

    .template-modern .item-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        align-self: stretch;
    }

    .template-modern .menu-item-image {
        width: 100%;
        max-width: 100%;
        height: clamp(180px, 52vw, 300px);
        display: block;
    }

    .template-modern .featured-item {
        padding: 20px;
    }

    .template-modern .category-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .template-modern .stolik-menu-container {
        padding: 20px 15px;
    }

    .template-modern .menu-title {
        font-size: var(--stolik-menu-title-font-size, 32px);
    }

    .template-modern .category-item {
        padding: 8px 16px;
        font-size: 13px;
    }

    .template-modern .menu-item-image {
        width: 100%;
        max-width: 100%;
        height: clamp(165px, 56vw, 280px);
        display: block;
    }

    .template-modern .menu-item {
        min-height: auto;
    }

    .template-modern .category-title {
        font-size: 16px;
    }
}

.template-modern .stolik-menu-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 12px;
    pointer-events: none;
}

.template-modern .menu-container {
    position: relative;
    z-index: 1;
}

/* Language dropdown (migrated from PHP inline styles) */
.template-modern .stolik-lang-badges { display: flex; gap: 8px; }
.template-modern .stolik-lang-badge { background: var(--stolik-bg-color, #ffffff); color: #111; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); display: inline-flex; align-items: center; justify-content: center; min-height: 32px; gap: 6px; border: 1px solid rgba(0,0,0,0.25); }
.template-modern .stolik-lang-badge.is-base { background: var(--stolik-bg-color, #ffffff); }
.template-modern .stolik-lang-badge:hover { background: rgba(0,0,0,0.05); color: #111; }
.template-modern .stolik-lang-dropdown { position: relative; }
.template-modern .stolik-lang-current { background: var(--stolik-bg-color, #ffffff); border: 1px solid rgba(0,0,0,0.25); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.18); min-width: 56px; display: flex; gap: 6px; align-items: center; justify-content: center; cursor: pointer; }
.template-modern .stolik-lang-current .stolik-flag,
.template-modern .stolik-lang-option .stolik-flag,
.template-modern .stolik-lang-badge .stolik-flag { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 18px; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.16); background: var(--stolik-bg-color, #ffffff); border: 1px solid rgba(0,0,0,0.28); }
.template-modern .stolik-lang-current .stolik-flag .stolik-flag-emoji,
.template-modern .stolik-lang-option .stolik-flag .stolik-flag-emoji,
.template-modern .stolik-lang-badge .stolik-flag .stolik-flag-emoji { display: block; width: 100%; height: 100%; font-size: 18px; line-height: 1; background-color: transparent; }
.template-modern .stolik-lang-current .stolik-flag .stolik-flag-emoji.fi,
.template-modern .stolik-lang-option .stolik-flag .stolik-flag-emoji.fi,
.template-modern .stolik-lang-badge .stolik-flag .stolik-flag-emoji.fi { background-color: transparent; border: 0; box-shadow: none; }
.template-modern .stolik-lang-current .stolik-flag .stolik-flag-emoji--globe,
.template-modern .stolik-lang-option .stolik-flag .stolik-flag-emoji--globe,
.template-modern .stolik-lang-badge .stolik-flag .stolik-flag-emoji--globe { display: flex; align-items: center; justify-content: center; }
.template-modern .stolik-lang-current .stolik-flag-code,
.template-modern .stolik-lang-option .stolik-flag-code,
.template-modern .stolik-lang-badge .stolik-flag-code { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; border-radius: 4px; background: rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.08); font-size: 11px; font-weight: 600; letter-spacing: .5px; padding: 0 4px; color: #111; }
.template-modern .stolik-lang-menu { position: absolute; right: 0; top: 100%; margin-top: 6px; background: var(--stolik-bg-color, #ffffff); border: 1px solid rgba(0,0,0,0.25); border-radius: 8px; padding: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); min-width: 56px; z-index: 50; }
.template-modern .stolik-lang-menu { padding: 0 !important; margin: 6px 0 0 0 !important; list-style: none; }
.template-modern .stolik-lang-menu > li { margin: 0; padding: 0; list-style: none; }
.template-modern .stolik-lang-option { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: #111; min-height: 26px; }
.template-modern .stolik-lang-option:hover { background: #f5f7fb; }
.template-modern .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 375px) {
    .template-modern .menu-logo-container {
        justify-content: center !important;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 600px) {
    .template-modern .stolik-scroll-btn {
        display: none !important;
    }
}

.template-modern .item-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    clear: both;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6f766e;
}

.template-modern .item-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.template-modern .item-meta-module {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.template-modern .stolik-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    opacity: .8;
    line-height: 1;
    color: currentColor;
}

.template-modern .stolik-meta-icon.allergens-icon {
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    color: var(--stolik-allergen-accent-light, #b45309);
    border: 1px solid var(--stolik-allergen-accent-light-border, rgba(180, 83, 9, 0.52));
    background: var(--stolik-allergen-accent-light-bg, rgba(245, 158, 11, 0.18));
    font-size: .78em;
    font-weight: 600;
    line-height: 1;
    opacity: .9;
    text-transform: lowercase;
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

.template-modern .item-allergens-text,
.template-modern .item-weight-text {
    color: inherit;
}

.template-modern .stolik-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: var(--stolik-accent-color, #4b5a4b);
    font-size: 0.75rem;
    line-height: 1;
    padding: 3px 8px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.template-modern .stolik-like-btn:disabled {
    cursor: default;
    opacity: .75;
}

.template-modern .stolik-like-icon path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
}

.template-modern .stolik-like-btn.is-liked .stolik-like-icon path {
    fill: currentColor;
}

@media (min-width: 901px) {
    .stolik-menu-container.template-modern .stolik-desktop-filter-bar {
        background: #f1f6fb !important;
        color: #1f3347 !important;
        border: 1px solid #5f7b96 !important;
    }

    .stolik-menu-container.template-modern .stolik-desktop-filter-label {
        color: #2c4358 !important;
    }

    .stolik-menu-container.template-modern .stolik-desktop-search-input,
    .stolik-menu-container.template-modern .stolik-input-clear-btn,
    .stolik-menu-container.template-modern .stolik-desktop-clear-filters,
    .stolik-menu-container.template-modern .stolik-allergen-chip {
        color: #1f3347 !important;
        border-color: #5f7b96 !important;
    }

    .stolik-menu-container.template-modern .stolik-filter-toggle,
    .stolik-menu-container.template-modern .stolik-filter-slider-toggle {
        color: #1f3347 !important;
        border: 1px solid #5f7b96 !important;
        background: transparent !important;
    }

    .stolik-menu-container.template-modern .stolik-filter-toggle.is-active,
    .stolik-menu-container.template-modern .stolik-filter-slider-toggle.is-active {
        background: var(--stolik-accent-color, #4b5a4b) !important;
        border-color: var(--stolik-accent-color, #4b5a4b) !important;
        color: #ffffff !important;
    }

    .stolik-menu-container.template-modern .stolik-filter-toggle.is-active svg,
    .stolik-menu-container.template-modern .stolik-filter-slider-toggle.is-active svg {
        color: #ffffff !important;
        fill: currentColor !important;
        stroke: currentColor !important;
    }

    .stolik-menu-container.template-modern .stolik-desktop-search-input {
        background: transparent !important;
    }

    .stolik-menu-container.template-modern .stolik-allergen-chip.is-active,
    .stolik-menu-container.template-modern .stolik-allergen-chip:hover,
    .stolik-menu-container.template-modern .stolik-allergen-chip.is-selected {
        background: #1f3347 !important;
        color: #f1f6fb !important;
        border-color: #1f3347 !important;
    }
}
