/* Elegant Classic Template CSS */
/* Sophisticated design with ornate borders and classical typography */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Crimson+Text:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* Container główny z eleganckim tłem i ramką */
.stolik-menu-container.template-elegant {
    background: var(--stolik-bg-color, #60351f); /* Solid background */
    --stolik-sold-out-badge-bg: rgba(91, 24, 36, 0.88);
    --stolik-sold-out-badge-color: #e9d6a7;
    --stolik-sold-out-badge-border: 1px solid rgba(212, 175, 55, 0.45);
    --stolik-sold-out-badge-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    --stolik-sold-out-badge-radius: 8px;
    padding: 48px 50px 54px;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.10);
    max-width: 960px;
    margin: 0 auto;
    font-family: var(--stolik-base-font-family, inherit);
    position: relative;
    border: 3px solid transparent;
    background-clip: padding-box;
    color: var(--stolik-text-color, #f5f5dc);
    overflow: hidden;
}

.template-elegant .stolik-sold-out-badge {
    font-family: "Playfair Display", serif;
    letter-spacing: 0.06em;
}

/* Logo styling */
.template-elegant .menu-logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.template-elegant .menu-logo {
    /* Scale fluidly: respect user option up to 300px but never overflow container */
    display: inline-block;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100% !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    border-radius: 50%;
    border: 4px solid #d4af37;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    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;
}

/* Center logo container and prevent overflow padding influence */
.template-elegant .menu-logo-container { overflow: visible; }

/* Ultra small phones: ensure logo never overflows (e.g., 320px width) */
@media (max-width: 400px) {
    .template-elegant .menu-logo { max-width: min(70vw, 190px); }
}
@media (max-width: 330px) {
    .template-elegant .menu-logo { max-width: min(72vw, 170px); }
}

/* Tytuł menu */
.template-elegant .menu-title {
    color: var(--stolik-menu-title-font-color, #d4af37);
        font-family: var(--stolik-menu-title-font-family, inherit);
    font-size: var(--stolik-menu-title-font-size, 36px);
    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: 0 0 40px;
    letter-spacing: 0.5px;
    text-transform: none;
    text-shadow: none;
    position: relative;
    padding: 0 clamp(16px, 8vw, 120px);
    overflow-wrap: anywhere;
}

/* When logo is disabled, reserve vertical space for absolute language switcher */
.template-elegant .stolik-language-ui + .menu-title {
    margin-top: 52px;
}

.template-elegant .menu-title::before,
.template-elegant .menu-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 84px;
    height: 12px;
    transform: translateY(-50%);
    opacity: 0.9;
    background-image:
        linear-gradient(90deg, transparent 0, var(--stolik-accent-color, #d4af37) 22%, var(--stolik-accent-color, #d4af37) 78%, transparent 100%),
        linear-gradient(45deg, transparent 46%, var(--stolik-accent-color, #d4af37) 46% 54%, transparent 54%),
        linear-gradient(-45deg, transparent 46%, var(--stolik-accent-color, #d4af37) 46% 54%, transparent 54%);
    background-size: 100% 1px, 10px 10px, 10px 10px;
    background-repeat: no-repeat;
    background-position: center, right 6px center, right 6px center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.template-elegant .menu-title::before {
    left: 8px;
}

.template-elegant .menu-title::after {
    right: 8px;
    background-position: center, left 6px center, left 6px center;
}

.template-elegant .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: 16px 4px 24px;
    margin: 0 0 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.template-elegant .stolik-categories-wrapper .stolik-categories-container {
    padding-left: 44px;
    padding-right: 44px;
}

.template-elegant .stolik-scroll-btn {
    color: #f4e799;
    background: rgba(55, 33, 21, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.72);
    border-radius: 999px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}

.template-elegant .stolik-scroll-btn:hover {
    transform: translateY(-50%) scale(1.06);
}

.template-elegant .stolik-categories-container::-webkit-scrollbar { display: none; }

.template-elegant .category-item {
    color: var(--stolik-nav-text-color, #d4af37);
    font-family: var(--stolik-nav-font-family, inherit);
    font-size: var(--stolik-nav-font-size, 16px);
    font-weight: var(--stolik-nav-font-weight, normal);
    font-style: var(--stolik-nav-font-style, italic);
    text-decoration: var(--stolik-nav-text-decoration, none);
    background: var(--stolik-nav-button-bg, rgba(212, 175, 55, 0.1));
    padding: 8px 20px;
    border: 2px solid var(--stolik-accent-color, #d4af37);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: auto;
    display: inline-block;
    margin: 0;
}

.template-elegant .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-elegant .category-item::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 ease;
}

.template-elegant .category-item:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    color: #f4e799;
}

.template-elegant .category-item:hover::before {
    left: 100%;
}

.template-elegant .category-item.active {
    background: var(--stolik-nav-button-active-bg, #d4af37);
    color: var(--stolik-nav-button-active-color, #1f3570);
    border-color: #f4e799;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    font-weight: var(--stolik-nav-font-weight, bold);
    font-style: var(--stolik-nav-font-style, italic);
    text-decoration: var(--stolik-nav-text-decoration, none);
}

.template-elegant .menu-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.2),
        0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--stolik-accent-color, rgba(212, 175, 55, 0.3));
    backdrop-filter: blur(10px);
}

/* Search + allergen filters contrast (Elegant template) */
.template-elegant .stolik-desktop-filter-bar {
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(77, 43, 25, 0.38);
}

.template-elegant .stolik-desktop-search-input {
    color: #2f180e;
    border: 1px solid rgba(212, 175, 55, 0.52) !important;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.18);
}

.template-elegant .stolik-filter-toggle,
.template-elegant .stolik-filter-slider-toggle {
    color: #e9d8b0;
    border: 1px solid rgba(212, 175, 55, 0.52) !important;
    background: rgba(77, 43, 25, 0.5) !important;
}

.template-elegant .stolik-desktop-filter-label,
.template-elegant .stolik-mobile-sheet-allergen-label {
    color: #e9d8b0 !important;
    opacity: 1 !important;
    font-weight: 600;
}

.template-elegant .stolik-allergen-chip,
.template-elegant .stolik-desktop-clear-filters,
.template-elegant .stolik-clear-filters-btn {
    color: #f3e6c9 !important;
    border: 1px solid rgba(212, 175, 55, 0.52) !important;
    background: rgba(53, 31, 20, 0.52) !important;
    opacity: 1 !important;
}

.template-elegant .stolik-allergen-chip.is-active,
.template-elegant .stolik-filter-toggle.is-active,
.template-elegant .stolik-filter-slider-toggle.is-active {
    color: #3f230f !important;
    border-color: var(--stolik-accent-color, #d4af37) !important;
    background: var(--stolik-accent-color, #d4af37) !important;
}

.template-elegant .category-header {
    margin: 40px 0 30px 0;
    text-align: center;
    position: relative;
}

.template-elegant .category-header:first-child {
    margin-top: 0;
}

.template-elegant .category-title {
    color: var(--stolik-category-title-font-color, #d4af37);
        font-family: var(--stolik-category-title-font-family, inherit);
    font-size: var(--stolik-category-title-font-size, 24px);
    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: 40px 0 20px;
    text-transform: none;
    letter-spacing: 0.5px;
    text-shadow: none;
}

.template-elegant .category-ornament {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--stolik-accent-color, #d4af37), transparent);
    margin: 0 auto;
    position: relative;
}

.template-elegant .category-ornament::before,
.template-elegant .category-ornament::after {
    content: '❋';
    position: absolute;
    top: -8px;
    color: var(--stolik-accent-color, #d4af37);
    font-size: 16px;
}

.template-elegant .category-ornament::before {
    left: -10px;
}

.template-elegant .category-ornament::after {
    right: -10px;
}

.template-elegant .menu-item {
    background: var(--stolik-item-bg-color, #927040);
    border: 1px solid var(--stolik-item-border-color, #d4af37);
    border-radius: 20px;
    padding: 26px 30px 30px;
    margin: 0 0 24px;
    position: relative;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.template-elegant .menu-item.normal-item {
    background: var(--stolik-item-bg-color, #927040);
    border: 1px solid var(--stolik-item-border-color, #d4af37);
    border-radius: 20px;
    padding: 26px 30px 30px;
    margin: 0 0 24px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.template-elegant .menu-item.normal-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.5" fill="%23000" opacity="0.1"/><circle cx="80" cy="80" r="0.5" fill="%23000" opacity="0.1"/><circle cx="40" cy="60" r="0.5" fill="%23000" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    opacity: 0.3;
}

.template-elegant .menu-item.normal-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #f4e799;
}

.template-elegant .menu-item.featured-item {
    background: var(--stolik-featured-item-bg-color, #c0b8af);
    border: 1px solid var(--stolik-featured-item-border-color, #8b4513);
    border-radius: 20px;
    padding: 26px 30px 30px;
    margin: 0 0 24px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    position: relative;
}

@media (max-width: 640px) {
    .template-elegant .menu-item-image,
    .template-elegant .item-image img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Unified featured star style: gold by default; follows accent only when enabled via data attribute */
.template-elegant .featured-item .featured-star {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ffffff;
    color: #ffd700;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    border: 3px solid #ffd700;
}
.template-elegant[data-star-uses-accent="1"] .featured-item .featured-star {
    color: var(--stolik-accent-color, #ffd700);
    border-color: var(--stolik-accent-color, #ffd700);
}
.template-elegant[data-show-star="0"] .featured-item .featured-star {
    display: none !important;
}
.template-elegant .featured-item .featured-star[data-hidden="1"] {
    display: none !important;
}

.template-elegant .menu-item.featured-item:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}


.template-elegant .item-image {
    flex-shrink: 0;
    margin-right: 20px;
    margin-bottom: 15px;
}

.template-elegant .menu-item-image {
    width: 225px;
    height: 150px;
    max-width: 100%;
    border-radius: 18px;
    object-fit: cover;
    background-color: #f5f5f5;
    border: 3px solid var(--stolik-accent-color, #d4af37);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.template-elegant .featured-item .menu-item-image {
    border-color: #8b4513;
    width: 225px;
    height: 150px;
    border-radius: 18px;
}

/* Placeholder (fallback) when no image provided */
.template-elegant .menu-item-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--stolik-item-title-font-family, inherit);
    font-weight: 700;
    font-size: 40px;
    letter-spacing: 2px;
    color: var(--stolik-accent-color, #d4af37);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 3px dashed var(--stolik-accent-color, #d4af37);
}

.template-elegant .menu-item:hover .menu-item-image {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.template-elegant .menu-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.template-elegant .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.template-elegant .menu-container,
.template-elegant .menu-categories,
.template-elegant .category-item,
.template-elegant .item-image,
.template-elegant .menu-item-image,
.template-elegant .item-header,
.template-elegant .item-price-row,
.template-elegant .normal-item,
.template-elegant .featured-item {
    max-width: 100%;
    box-sizing: border-box;
}

.template-elegant .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 20px;
}

.template-elegant .item-price-row {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}
.template-elegant .item-price-row .item-price {
    text-align: right;
    padding: 0;
    background: none;
    border: 0;
}

.template-elegant .normal-item .item-name {
    font-family: var(--stolik-item-title-font-family, "Playfair Display, Georgia, serif");
    font-size: var(--stolik-item-title-font-size, 20px);
    color: var(--stolik-item-title-font-color, #f5f5dc);
    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: 0 0 6px;
    letter-spacing: 0.4px;
    line-height: 1.3;
    text-shadow: none;
}

.template-elegant .featured-item .item-name {
    font-family: var(--stolik-featured-item-title-font-family, var(--stolik-item-title-font-family));
    font-size: var(--stolik-featured-item-title-font-size, var(--stolik-item-title-font-size));
    color: var(--stolik-featured-item-title-font-color, var(--stolik-item-title-font-color));
    font-weight: var(--stolik-featured-item-title-font-weight, var(--stolik-item-title-font-weight));
    font-style: var(--stolik-featured-item-title-font-style, var(--stolik-item-title-font-style));
    text-decoration: var(--stolik-featured-item-title-text-decoration, var(--stolik-item-title-text-decoration));
    margin: 0 0 6px;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.template-elegant .normal-item .item-description {
    font-family: var(--stolik-item-desc-font-family, "Crimson Text, Georgia, serif");
    font-size: var(--stolik-item-desc-font-size, 16px);
    color: var(--stolik-item-desc-font-color, #f0e6d2);
    font-weight: var(--stolik-item-desc-font-weight, 400);
    font-style: var(--stolik-item-desc-font-style, italic);
    text-decoration: var(--stolik-item-desc-text-decoration, none);
    margin: 0 0 12px;
    line-height: 1.55;
    opacity: 1;
}

.template-elegant .featured-item .item-description {
    font-family: var(--stolik-featured-item-desc-font-family, var(--stolik-item-desc-font-family));
    font-size: var(--stolik-featured-item-desc-font-size, var(--stolik-item-desc-font-size));
    color: var(--stolik-featured-item-desc-font-color, var(--stolik-item-desc-font-color));
    font-weight: var(--stolik-featured-item-desc-font-weight, var(--stolik-item-desc-font-weight));
    font-style: var(--stolik-featured-item-desc-font-style, var(--stolik-item-desc-font-style));
    text-decoration: var(--stolik-featured-item-desc-text-decoration, var(--stolik-item-desc-text-decoration));
    margin: 0 0 12px;
    line-height: 1.55;
}

.template-elegant .normal-item .item-price {
    font-family: var(--stolik-item-price-font-family, "Playfair Display, Georgia, serif");
    font-size: var(--stolik-item-price-font-size, 18px);
    color: var(--stolik-item-price-font-color, #d4af37);
    font-weight: var(--stolik-item-price-font-weight, 700);
    font-style: var(--stolik-item-price-font-style, normal);
    text-decoration: var(--stolik-item-price-text-decoration, none);
    display: inline-block;
    margin-top: 4px;
    text-align: right;
    white-space: nowrap;
    text-shadow: none;
}

.template-elegant .featured-item .item-price {
    font-family: var(--stolik-featured-item-price-font-family, var(--stolik-item-price-font-family));
    font-size: var(--stolik-featured-item-price-font-size, var(--stolik-item-price-font-size));
    color: var(--stolik-featured-item-price-font-color, var(--stolik-item-price-font-color));
    font-weight: var(--stolik-featured-item-price-font-weight, var(--stolik-item-price-font-weight));
    font-style: var(--stolik-featured-item-price-font-style, var(--stolik-item-price-font-style));
    text-decoration: var(--stolik-featured-item-price-text-decoration, var(--stolik-item-price-text-decoration));
    display: inline-block;
    margin-top: 4px;
    text-align: right;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 720px) {
    .stolik-menu-container.template-elegant {
        padding: 38px 34px 44px;
        border-radius: 22px;
        border: 0 !important;
        background-clip: border-box;
    }
}

@media (max-width: 560px) {
    .stolik-menu-container.template-elegant {
        padding: 30px 22px 40px;
        border-radius: 0;
    }

    .template-elegant .menu-item {
        border-radius: 12px;
        padding: 22px 24px 26px;
    }
}

@media (max-width: 768px) {
    .template-elegant .stolik-menu-container {
        padding: 30px 15px;
        margin: 0;
        max-width: 100%;
    }

    .template-elegant .menu-title {
        font-size: var(--stolik-menu-title-font-size, 36px);
        letter-spacing: 2px;
        padding: 0 clamp(16px, 8vw, 120px);
        background-image: none;
    }

    .template-elegant .menu-title::before,
    .template-elegant .menu-title::after {
        display: none;
    }

    .template-elegant .stolik-categories-container {
        gap: 10px;
        margin-bottom: 30px;
    }

    .template-elegant .category-item {
        padding: 10px 20px;
        font-size: 14px;
    }

    .template-elegant .menu-container {
        padding: 25px 20px;
    }

    .template-elegant .menu-item {
        padding: 20px 15px;
        flex-direction: column;
        text-align: initial;
        align-items: stretch;
        width: 100%;
    }

    .template-elegant .featured-item {
        padding: 25px;
    }

    .template-elegant .item-image {
        margin-right: 0;
        margin-bottom: 12px;
        align-self: stretch;
    }

    /* Tablet: make images fluid inside item with 10px side breathing space */
    .template-elegant .menu-item .item-image,
    .template-elegant .featured-item .item-image { width: 100%; margin: 0 0 18px 0; }
    .template-elegant .menu-item-image,
    .template-elegant .featured-item .menu-item-image {
        width: 100%;
        max-width: 100%;
        height: clamp(180px, 52vw, 320px);
        aspect-ratio: auto;
        display: block;
        margin: 0;
    }

    .template-elegant .item-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 6px;
    }

    /* Mobile price row spacing (increased +10px from base) */
    .template-elegant .item-price-row { margin-top: 22px; }
    .template-elegant .item-price-row .item-price { padding: 6px 14px; }
    .template-elegant .item-name,
    .template-elegant .item-description {
        text-align: left;
        width: 100%;
    }

    .template-elegant .category-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .template-elegant .stolik-menu-container {
        padding: 15px 10px;
        border-radius: 0;
    }

    .template-elegant .menu-title {
        font-size: var(--stolik-menu-title-font-size, 36px);
        letter-spacing: 1px;
    }

    .template-elegant .category-item {
        padding: 8px 16px;
        font-size: 13px;
    }

    .template-elegant .category-title {
        font-size: 18px;
    }

    .template-elegant .menu-item .item-image,
    .template-elegant .featured-item .item-image { width: 100%; }
    .template-elegant .menu-item-image,
    .template-elegant .featured-item .menu-item-image {
        width: 100%;
        height: clamp(170px, 56vw, 300px);
        aspect-ratio: auto;
        margin: 0;
    }
    .template-elegant .menu-container { padding: 10px 10px; border-radius: 0; }
    .template-elegant .menu-item { border-radius: 0; margin-left: 0; margin-right: 0; }
    .template-elegant .item-price-row { margin-top: 22px; }
}

@media (max-width: 360px) {
    .template-elegant .menu-title {
        font-size: clamp(20px, var(--stolik-menu-title-font-size, 36px), 32px) !important;
    }

    .template-elegant .menu-logo {
        display: inline-block;
        width: auto !important;
        max-width: min(78vw, 200px) !important;
        height: auto !important;
    }

    .template-elegant .menu-item-image,
    .template-elegant .item-image img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}

.template-elegant .stolik-menu-container {
    background-attachment: scroll;
}

.template-elegant .menu-item {
    backdrop-filter: blur(2px);
}

/* --- Layering / repaint stability fixes --- */
.template-elegant .stolik-menu-container { isolation: isolate; }
.template-elegant .menu-container,
.template-elegant .menu-item { position: relative; z-index: 1; }

/* Avoid backdrop-filter triggering heavy repaints on very low-end devices / unsupported browsers */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .template-elegant .menu-item { backdrop-filter: none; }
}

.template-elegant.disable-blur .menu-item { backdrop-filter: none !important; }


.template-elegant .menu-item.normal-item,
.template-elegant .menu-item.featured-item { will-change: transform; }

/* Language dropdown (migrated from PHP inline styles) */
.template-elegant .stolik-language-ui { position: absolute; top: 12px; right: 14px; display: flex; gap: 8px; z-index: 40; }
.template-elegant .stolik-lang-badges { display: flex; gap: 8px; }
.template-elegant .stolik-lang-badge { background: var(--stolik-bg-color, #60351f); color: #e6d6b5; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: inline-flex; align-items: center; justify-content: center; min-height: 32px; gap: 6px; border: none; }
.template-elegant .stolik-lang-badge.is-base { background: var(--stolik-bg-color, #60351f); color: #e6d6b5; border: none; }
.template-elegant .stolik-lang-dropdown { position: relative; z-index: 120; }
.template-elegant .stolik-lang-current { background: var(--stolik-bg-color, #60351f); border: none; border-radius: 10px; padding: 6px 10px; font-size: 14px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.15); min-width: 56px; display: flex; gap: 6px; align-items: center; justify-content: center; cursor: pointer; color: #e6d6b5; }
.template-elegant .stolik-lang-current .stolik-flag,
.template-elegant .stolik-lang-option .stolik-flag,
.template-elegant .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 0 0 1px rgba(65,38,15,.25); background: #fff; }
.template-elegant .stolik-lang-current .stolik-flag .stolik-flag-emoji,
.template-elegant .stolik-lang-option .stolik-flag .stolik-flag-emoji,
.template-elegant .stolik-lang-badge .stolik-flag .stolik-flag-emoji { display: block; width: 100%; height: 100%; font-size: 18px; line-height: 1; }
.template-elegant .stolik-lang-current .stolik-flag .stolik-flag-emoji--globe,
.template-elegant .stolik-lang-option .stolik-flag .stolik-flag-emoji--globe,
.template-elegant .stolik-lang-badge .stolik-flag .stolik-flag-emoji--globe { display: flex; align-items: center; justify-content: center; }
.template-elegant .stolik-lang-current .stolik-flag .stolik-flag-emoji.fi,
.template-elegant .stolik-lang-option .stolik-flag .stolik-flag-emoji.fi,
.template-elegant .stolik-lang-badge .stolik-flag .stolik-flag-emoji.fi { background-size: 100% 100%; background-position: center; background-repeat: no-repeat; color: transparent; font-size: 0; line-height: 0; }
.template-elegant .stolik-lang-current .stolik-flag .stolik-flag-emoji.fi::before,
.template-elegant .stolik-lang-option .stolik-flag .stolik-flag-emoji.fi::before,
.template-elegant .stolik-lang-badge .stolik-flag .stolik-flag-emoji.fi::before { content: ""; }
.template-elegant .stolik-lang-current .stolik-flag-code,
.template-elegant .stolik-lang-option .stolik-flag-code,
.template-elegant .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(212,175,55,.2); border: none; font-size: 11px; font-weight: 700; letter-spacing: .5px; padding: 0 4px; color: #e6d6b5; }
.template-elegant .stolik-lang-menu { position: absolute; right: 0; top: 100%; margin-top: 6px; background: var(--stolik-bg-color, #60351f); background-color: var(--stolik-bg-color, #60351f); border: 1px solid rgba(212, 175, 55, 0.35); border-radius: 10px; padding: 0; box-shadow: 0 10px 24px rgba(0,0,0,.32); min-width: 56px; z-index: 130; }
.template-elegant .stolik-lang-menu { padding: 0 !important; margin: 6px 0 0 0 !important; list-style: none; }
.template-elegant .stolik-lang-menu > li { margin: 0; padding: 0; list-style: none; }
.template-elegant .stolik-lang-option { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: #e6d6b5; min-height: 26px; background-color: var(--stolik-bg-color, #60351f); }
.template-elegant .stolik-lang-option:hover { background: #f8f1da; }
.template-elegant .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-elegant .menu-logo-container {
        justify-content: center !important;
        padding-left: 0;
        padding-right: 0;
    }

    .template-elegant .menu-logo {
        max-width: min(78vw, 260px) !important;
    }

    .template-elegant .menu-item,
    .template-elegant .menu-item.normal-item,
    .template-elegant .menu-item.featured-item {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 600px) {
    .template-elegant .menu-logo-container {
        padding-top: 45px !important;
    }

    .template-elegant .stolik-scroll-btn {
        display: none !important;
    }
}

.template-elegant .item-price-row,
.template-elegant .item-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    clear: both;
}

.template-elegant .item-meta-row {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--stolik-item-meta-font-color, #d0bfa9);
}

.template-elegant .featured-item .item-meta-row {
    color: var(--stolik-featured-item-meta-font-color, #5a3f1d);
}

.template-elegant .item-meta-module {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.template-elegant .stolik-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    opacity: .95;
    line-height: 1;
    color: currentColor;
}

.template-elegant .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: .92;
    text-transform: lowercase;
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

.template-elegant .item-allergens-text,
.template-elegant .item-weight-text {
    color: inherit;
}

.template-elegant .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, #8b5e34);
    font-size: 0.75rem;
    line-height: 1;
    padding: 3px 8px;
    cursor: pointer;
    transition: opacity .2s ease;
}

.template-elegant .stolik-like-btn:disabled {
    cursor: default;
    opacity: .75;
}

.template-elegant .stolik-like-icon path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
}

@media (min-width: 901px) {
    .stolik-menu-container.template-elegant .stolik-desktop-filter-bar {
        background: #4b2f1f !important;
        color: #f7e8c4 !important;
        border: 1px solid #d4af37 !important;
    }

    .stolik-menu-container.template-elegant .stolik-desktop-filter-label {
        color: #efd8a4 !important;
    }

    .stolik-menu-container.template-elegant .stolik-desktop-search-input,
    .stolik-menu-container.template-elegant .stolik-input-clear-btn,
    .stolik-menu-container.template-elegant .stolik-desktop-clear-filters,
    .stolik-menu-container.template-elegant .stolik-allergen-chip {
        color: #f7e8c4 !important;
        border-color: #d4af37 !important;
    }

    .stolik-menu-container.template-elegant .stolik-desktop-search-input {
        background: transparent !important;
    }

    .stolik-menu-container.template-elegant .stolik-allergen-chip.is-active,
    .stolik-menu-container.template-elegant .stolik-allergen-chip:hover,
    .stolik-menu-container.template-elegant .stolik-allergen-chip.is-selected {
        background: #d4af37 !important;
        color: #3b2618 !important;
        border-color: #d4af37 !important;
    }
}

.template-elegant .stolik-like-btn.is-liked .stolik-like-icon path {
    fill: currentColor;
}

.template-elegant .featured-item .stolik-like-btn,
.template-elegant .stolik-featured-item .stolik-like-btn {
    color: var(--stolik-featured-item-meta-font-color, #5a3f1d);
    border-color: currentColor;
}

.template-elegant .featured-item .stolik-like-icon,
.template-elegant .stolik-featured-item .stolik-like-icon,
.template-elegant .featured-item .stolik-like-count,
.template-elegant .stolik-featured-item .stolik-like-count,
.template-elegant .featured-item .stolik-likes-count,
.template-elegant .stolik-featured-item .stolik-likes-count {
    color: currentColor;
}
