:root {
    --popup-bg: #ffffff;
    --popup-text: #2c3e50;
    --popup-accent: #e74c3c;
    --popup-radius: 16px;
    --popup-max-width: 600px;
    --popup-padding: 30px;
    --popup-blur: 5px;
    --popup-heading-weight: 700;
    --popup-anim-duration: 300ms;

    /* Brand Typography */
    --fs-heading-font: inherit;
    --fs-body-font: inherit;
    --fs-heading-weight: 700;
    --fs-heading-line-height: 1.2;
    --fs-heading-letter-spacing: 0em;
    --fs-body-weight: 400;
    --fs-body-line-height: 1.6;
}

/* Resto M2 Frontend Styles - Version 2.0.0 */

/* WordPress Emoji Size Fix - Global */
img.emoji,
img.wp-smiley {
    height: 1em !important;
    width: 1em !important;
    max-height: 1em !important;
    max-width: 1em !important;
    vertical-align: -0.1em !important;
    display: inline !important;
    margin: 0 0.1em !important;
    box-shadow: none !important;
}

/* Base Styles */
.resto-menu,
.resto-all-menus {
    box-sizing: border-box;
}

.resto-menu *,
.resto-menu *::before,
.resto-menu *::after,
.resto-all-menus *,
.resto-all-menus *::before,
.resto-all-menus *::after {
    box-sizing: inherit;
}

.resto-menu {
    font-family: var(--fs-body-font, var(--fs-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif));
    font-weight: var(--fs-body-weight, 400);
    line-height: var(--fs-body-line-height, 1.6);
    margin: 30px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.resto-menu h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-family: var(--fs-heading-font, inherit);
    font-weight: var(--fs-heading-weight, 600);
    line-height: var(--fs-heading-line-height, 1.2);
    letter-spacing: var(--fs-heading-letter-spacing, normal);
    position: relative;
    padding-bottom: 15px;
}

.resto-menu h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    border-radius: 2px;
}

/* Menu Description */
.resto-menu-description {
    text-align: center;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.6;
    max-width: 600px;
    margin: -10px auto 25px auto;
    padding: 0 20px;
}

.resto-menu h2 i,
.resto-menu i {
    margin-right: 10px;
    color: inherit;
    font-size: 0.9em;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Menu Items Grid */
.resto-menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    margin-top: 30px;
}

.resto-menu-items > * {
    min-width: 0;
}

.resto-menu-item {
    background: var(--fs-card-bg, #fff);
    padding: 20px;
    border: 1px solid var(--fs-border, #e1e8ed);
    border-radius: var(--fs-radius, 12px);
    /* box-shadow will be controlled by inline CSS from settings */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resto-menu-item:hover {
    transform: translateY(-5px);
    /* box-shadow will be controlled by inline CSS from settings */
    border-color: #e74c3c;
}

/* Disable hover effects when requested */
.resto-hover-off .resto-menu-item:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-color: #e1e8ed !important;
}

.resto-menu-item.popup-item {
    cursor: pointer;
}

.resto-menu-item.popup-item:hover {
    background: #fafbfc;
}

/* Item Images */
.resto-menu-item img {
    width: 100%;
    max-width: 100%;
    height: 200px;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.resto-menu-item:hover img {
    transform: scale(1.05);
}

/* Item Content */
.resto-menu-item h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: var(--fs-text, #2c3e50);
    font-family: var(--fs-heading-font, inherit);
    font-weight: var(--fs-heading-weight, 600);
    line-height: var(--fs-heading-line-height, 1.3);
    letter-spacing: var(--fs-heading-letter-spacing, normal);
    overflow-wrap: anywhere;
}

.resto-menu-item h3 strong {
    color: #e74c3c;
    font-weight: 700;
}

.resto-menu-item p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 10px 0 0 0;
    overflow-wrap: anywhere;
}

/* Action buttons */
.resto-actions {
    margin-top: 12px;
}

.resto-actions .button {
    cursor: pointer;
}

/* Price Styling - Protected from theme/plugin overrides */
.resto-menu-item .price,
.resto-menu-item .item-price,
.resto-menu .item-price,
.resto-all-menus .item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--fs-price, #27ae60) !important;
    -webkit-text-fill-color: inherit !important;
    background: none !important;
    background-image: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    margin-top: 15px;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* All Menus Container */
.resto-all-menus {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.resto-all-menus .resto-menu {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ecf0f1;
}

.resto-all-menus .resto-menu:last-child {
    border-bottom: none;
}

/* Popup Styles - Override all theme styles */
.resto-global-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    background: transparent;
    display: none !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    margin: 0 !important;
    box-sizing: border-box;
    backdrop-filter: blur(var(--popup-blur, 5px));
}

.resto-global-popup.show {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.resto-global-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.resto-global-popup .popup-container {
    position: relative !important;
    background: var(--popup-bg, #fff);
    border-radius: var(--popup-radius, 16px);
    max-width: var(--popup-max-width, 600px) !important;
    width: 90%;
    max-height: 90%;
    overflow: auto;
    padding: var(--popup-padding, 30px);
    box-sizing: border-box;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn var(--popup-anim-duration, 0.3s) ease-out;
    margin: 0 !important;
    z-index: 2;
}

/* Popup shadow presets */
.popup-container.popup-shadow-none { box-shadow: none !important; }
.popup-container.popup-shadow-soft { box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; }
.popup-container.popup-shadow-medium { box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important; }
.popup-container.popup-shadow-dramatic { box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.05) !important; }

/* Popup close button size variants */
.popup-close.popup-close-small { width: 40px !important; height: 40px !important; }
.popup-close.popup-close-medium { width: 44px !important; height: 44px !important; }
.popup-close.popup-close-large { width: 52px !important; height: 52px !important; }

/* Popup sticky CTA */
.popup-container.popup-sticky-cta .popup-add-btn {
    position: sticky;
    bottom: 0;
    background: var(--popup-bg, #fff);
    padding: 16px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    margin: 16px calc(var(--popup-padding, 30px) * -1) calc(var(--popup-padding, 30px) * -1);
    padding-left: var(--popup-padding, 30px);
    padding-right: var(--popup-padding, 30px);
}

/* Popup Navigation Buttons - Outside container */
.resto-global-popup .popup-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 20px;
    color: #2c3e50;
}

.resto-global-popup .popup-nav i {
    color: inherit !important;
    font-size: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    font-family: 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: normal !important;
    text-decoration: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.resto-global-popup .popup-nav:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
}

.resto-global-popup .popup-nav:hover i {
    color: inherit !important;
}

/* Ensure icons are visible even if FA overridden */
.resto-global-popup .popup-nav i.fa::before {
    font-family: 'FontAwesome' !important;
    display: inline-block !important;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Unicode fallback - show if FontAwesome not loaded */
.resto-global-popup .popup-nav .nav-fallback {
    display: none;
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
}

/* If FontAwesome icon is not visible, show unicode fallback */
.resto-global-popup .popup-nav i.fa:empty+.nav-fallback,
.resto-global-popup .popup-nav:not(:has(i.fa))::before {
    display: inline-block;
}

/* Additional fallback using ::before if all else fails */
.resto-global-popup .popup-nav-prev:not(:has(i))::before {
    content: '‹';
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
}

.resto-global-popup .popup-nav-next:not(:has(i))::before {
    content: '›';
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
}

.resto-global-popup .popup-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Style variations */
.resto-global-popup .popup-nav.nav-style-square {
    border-radius: 8px !important;
}

.resto-global-popup .popup-nav.nav-style-rounded {
    border-radius: 50% !important;
}

/* Ensure perfect centering for both styles */
.resto-global-popup .popup-nav.nav-style-square,
.resto-global-popup .popup-nav.nav-style-rounded {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.resto-global-popup .popup-nav.nav-style-square i,
.resto-global-popup .popup-nav.nav-style-rounded i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: auto !important;
}

/* Fallback centering when shown */
.resto-global-popup .popup-nav .nav-fallback {
    align-items: center;
    justify-content: center;
}

/* Position variations */
.resto-global-popup .popup-nav-prev.nav-pos-edge {
    left: 20px;
}

.resto-global-popup .popup-nav-next.nav-pos-edge {
    right: 20px;
}

.resto-global-popup .popup-nav-prev.nav-pos-side {
    left: calc(50% - 350px);
}

.resto-global-popup .popup-nav-next.nav-pos-side {
    right: calc(50% - 350px);
}

/* Fallback for smaller screens with side position */
@media (max-width: 1200px) {
    .resto-global-popup .popup-nav-prev.nav-pos-side {
        left: 20px;
    }

    .resto-global-popup .popup-nav-next.nav-pos-side {
        right: 20px;
    }
}

.resto-global-popup .popup-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile: Smaller buttons */
@media (max-width: 767px) {
    .resto-global-popup .popup-nav {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .resto-global-popup .popup-nav-prev {
        left: 10px !important;
    }

    .resto-global-popup .popup-nav-next {
        right: 10px !important;
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.popup-close:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.popup-close svg {
    width: 16px;
    height: 16px;
    fill: #6c757d;
}

/* Theme variants */
.theme-classic .resto-menu-item {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #dee2e6;
}

.theme-classic .resto-menu-item:hover {
    transform: none;
    box-shadow: none;
}

.theme-minimal .resto-menu-item {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.theme-minimal .resto-menu-item h3 {
    font-weight: 600;
}

/* Column helpers (overrides default auto-fit) */
.cols-1 .resto-menu-items {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.cols-2 .resto-menu-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 .resto-menu-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 .resto-menu-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cols-5 .resto-menu-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cols-6 .resto-menu-items {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.popup-img-container {
    text-align: center;
    margin-bottom: 25px;
}

.popup-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.popup-info {
    font-family: inherit;
}

.popup-section {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.popup-name-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.popup-item-name {
    font-size: 24px;
    font-family: var(--fs-heading-font, inherit);
    font-weight: var(--popup-heading-weight, var(--fs-heading-weight, 700));
    color: var(--popup-text, var(--fs-text, #2c3e50));
    line-height: var(--fs-heading-line-height, 1.2);
    letter-spacing: var(--fs-heading-letter-spacing, -0.02em);
}

.popup-item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--popup-accent, var(--fs-price, #27ae60));
    background: #ecf0f1;
    padding: 8px 16px;
    border-radius: 25px;
}

.popup-item-desc {
    font-size: 16px;
    color: var(--fs-text-muted, #64748B);
    line-height: 1.6;
    margin-bottom: 15px;
}

.popup-item-badges {
    margin-bottom: 15px;
}

.popup-item-nutrition {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resto-menu {
        padding: 0 15px;
        margin: 20px 0;
    }

    .resto-menu h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .resto-menu-items {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }

    .resto-menu-item {
        padding: 15px;
    }

    /* Don't override aspect-ratio on mobile - let ratio classes work */
    .resto-menu:not([class*="ratio-"]) .resto-menu-item img {
        height: auto;
        object-fit: cover;
    }

    .resto-menu-item h3 {
        font-size: 18px;
    }

    /* Default fullscreen (backward compat: no body class = fullscreen) */
    body:not(.popup-mobile-sheet):not(.popup-mobile-centered) .resto-global-popup,
    body.popup-mobile-fullscreen .resto-global-popup {
        padding: 0 !important;
    }

    body:not(.popup-mobile-sheet):not(.popup-mobile-centered) .resto-global-popup .popup-container,
    body.popup-mobile-fullscreen .resto-global-popup .popup-container {
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-width: none !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)) 20px;
        animation: popupSlideInMobile var(--popup-anim-duration, 0.25s) ease-out;
    }

    @keyframes popupSlideInMobile {
        from {
            opacity: 0;
            transform: translateY(24px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Bottom sheet */
    body.popup-mobile-sheet .resto-global-popup {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    body.popup-mobile-sheet .resto-global-popup .popup-container {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 85dvh !important;
        border-radius: 20px 20px 0 0 !important;
        padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
        animation: popupSlideUpMobile var(--popup-anim-duration, 0.3s) ease-out;
    }

    /* Centered card */
    body.popup-mobile-centered .resto-global-popup {
        padding: 20px !important;
    }

    body.popup-mobile-centered .resto-global-popup .popup-container {
        width: 90% !important;
        max-width: 400px !important;
        height: auto !important;
        max-height: 80dvh !important;
        border-radius: 16px !important;
        padding: 20px !important;
    }

    .popup-item-name {
        font-size: 20px;
    }

    .popup-item-price {
        font-size: 18px;
        padding: 6px 12px;
    }

    .popup-name-price {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .popup-item-name {
        text-align: left;
    }

    .popup-item-price {
        text-align: right;
    }
}

@media (max-width: 480px) {
    .resto-menu {
        padding: 0 10px;
    }

    .resto-menu h2 {
        font-size: 22px;
    }

    .resto-menu-item {
        padding: 12px;
    }

    /* Don't override aspect-ratio on mobile - let ratio classes work */
    .resto-menu:not([class*="ratio-"]) .resto-menu-item:not([class*="ratio-"]) img {
        height: 160px;
    }
}

/* Loading States */
.resto-menu-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.resto-menu-loading:before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error States */
.resto-menu-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

/* Accessibility */
.resto-menu-item:focus,
.popup-item:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

.popup-close:focus {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .resto-global-popup {
        display: none !important;
    }

    .resto-menu-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .resto-menu-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Responsive columns (class-based overrides) */
@media (max-width: 767px) {
    .cols-m-1 .resto-menu-items {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    .cols-m-2 .resto-menu-items {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .cols-m-3 .resto-menu-items {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .cols-t-1 .resto-menu-items {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    .cols-t-2 .resto-menu-items {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .cols-t-3 .resto-menu-items {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .cols-t-4 .resto-menu-items {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1025px) {
    .cols-d-1 .resto-menu-items {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    .cols-d-2 .resto-menu-items {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .cols-d-3 .resto-menu-items {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .cols-d-4 .resto-menu-items {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .cols-d-5 .resto-menu-items {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .cols-d-6 .resto-menu-items {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

/* Image aspect ratios (override fixed height) */
.ratio-1x1 .resto-menu-item img,
.resto-menu-item.ratio-1x1 img,
.resto-menu-item.ratio-1x1>img {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
}

.ratio-4x3 .resto-menu-item img,
.resto-menu-item.ratio-4x3 img,
.resto-menu-item.ratio-4x3>img {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
}

.ratio-3x2 .resto-menu-item img,
.resto-menu-item.ratio-3x2 img,
.resto-menu-item.ratio-3x2>img {
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
    object-fit: cover !important;
}

.ratio-16x9 .resto-menu-item img,
.resto-menu-item.ratio-16x9 img,
.resto-menu-item.ratio-16x9>img {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
}

/* Popup animations */
.resto-global-popup.anim-fade .popup-container {
    animation: popupFade var(--popup-anim-duration, 0.25s) ease-out;
}

.resto-global-popup.anim-slide .popup-container {
    animation: popupSlideIn var(--popup-anim-duration, 0.3s) ease-out;
}

.resto-global-popup.anim-zoom .popup-container {
    animation: popupZoom var(--popup-anim-duration, 0.25s) ease-out;
}


@keyframes popupSlideUpMobile {
    from { transform: translateY(100%); opacity: 0.9; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupZoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   LABEL SYSTEM STYLES
   ======================================== */

/* Base label container */
.resto-item-labels {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 90%;
}

/* Label positioning */
.label-position-top-left {
    top: 10px;
    left: 10px;
}

.label-position-top-right {
    top: 10px;
    right: 10px;
    justify-content: flex-end;
}

.label-position-bottom-left {
    bottom: 10px;
    left: 10px;
}

.label-position-bottom-right {
    bottom: 10px;
    right: 10px;
    justify-content: flex-end;
}

/* Base label styles */
.resto-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.resto-label i {
    font-size: 13px;
    margin: 0;
}

/* Badge style (filled background) */
.resto-label-badge {
    background-color: #007cba;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.resto-label-badge:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Tag style (outlined) */
.resto-label-tag {
    background-color: #fff;
    border: 2px solid #007cba;
    color: #007cba;
    padding: 3px 9px;
}

.resto-label-tag:hover {
    background-color: rgba(0, 124, 186, 0.1);
}

/* Icon only style */
.resto-label-icon {
    background-color: rgba(255, 255, 255, 0.95);
    color: #007cba;
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.resto-label-icon i {
    margin: 0;
    font-size: 14px;
}

.resto-label-icon:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.1);
}

/* Label animations (CSS animations) */
@keyframes labelFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes labelSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes labelZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes labelPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Apply animations based on settings (will be added dynamically) */
.label-animation-fade .resto-label {
    animation: labelFadeIn 0.4s ease-out;
}

.label-animation-slide .resto-label {
    animation: labelSlideIn 0.4s ease-out;
}

.label-animation-zoom .resto-label {
    animation: labelZoomIn 0.3s ease-out;
}

.label-animation-pulse .resto-label {
    animation: labelPulse 2s ease-in-out infinite;
}

/* Stagger animation for multiple labels */
.resto-item-labels .resto-label:nth-child(1) {
    animation-delay: 0s;
}

.resto-item-labels .resto-label:nth-child(2) {
    animation-delay: 0.1s;
}

.resto-item-labels .resto-label:nth-child(3) {
    animation-delay: 0.2s;
}

.resto-item-labels .resto-label:nth-child(4) {
    animation-delay: 0.3s;
}

.resto-item-labels .resto-label:nth-child(5) {
    animation-delay: 0.4s;
}

/* Responsive label sizing */
@media (max-width: 767px) {
    .resto-label {
        font-size: 11px;
        padding: 3px 8px;
    }

    .resto-label-icon {
        width: 24px;
        height: 24px;
    }

    .resto-item-labels {
        gap: 4px;
    }
}

/* ========================================
   LAYOUT SYSTEM STYLES
   ======================================== */

/* Menu Layout: Tabs */
.menu-layout-tabs .resto-menu {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px;
    /* box-shadow will be controlled by inline CSS from settings */
}

.menu-layout-tabs .resto-menu h2 {
    background: #fff;
    padding: 18px 28px;
    border-radius: 12px 12px 0 0;
    margin: -24px -24px 24px -24px;
    border-bottom: 3px solid #007cba;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Menu Layout: List */
.menu-layout-list .resto-menu {
    background: transparent;
    padding: 0;
}

.menu-layout-list .resto-menu h2 {
    border-bottom: 3px solid #007cba;
    padding-bottom: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    position: relative;
}

.menu-layout-list .resto-menu h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #007cba;
    border-radius: 2px;
}

/* Sections Layout: Tabs */
.sections-layout-tabs .resto-menu-items {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    /* box-shadow will be controlled by inline CSS from settings */
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* Sections Layout: List */
.sections-layout-list .resto-menu-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sections-layout-list .resto-menu-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    /* box-shadow will be controlled by inline CSS from settings */
}

.sections-layout-list .resto-menu-item:hover {
    transform: translateY(-2px);
    /* box-shadow will be controlled by inline CSS from settings */
}

.sections-layout-list .resto-menu-item img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 10px;
}

.sections-layout-list .resto-menu-item .item-content {
    flex: 1;
    min-width: 0;
}

/* Sections Layout: Masonry */
.sections-layout-masonry .resto-menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 20px;
    gap: 20px;
}

.sections-layout-masonry .resto-menu-item {
    grid-row-end: span var(--span, 10);
    transition: transform 0.3s ease;
}

/* Fix for horizontal items in masonry - moved after base rules and increased specificity */
.sections-layout-masonry .resto-menu-items .resto-menu-item.item-layout-horizontal {
    --span: 4 !important;
    grid-row-end: span 4 !important;
    min-height: 0 !important;
    align-self: start;
}

.sections-layout-masonry .resto-menu-item:hover {
    transform: translateY(-4px);
}

.sections-layout-masonry .resto-menu-item:nth-child(3n+1) {
    --span: 12;
}

.sections-layout-masonry .resto-menu-item:nth-child(3n+2) {
    --span: 14;
}

.sections-layout-masonry .resto-menu-item:nth-child(3n+3) {
    --span: 11;
}

/* Responsive layout adjustments */
@media (max-width: 767px) {

    /* Menu Layout: Tabs - Mobile */
    .menu-layout-tabs .resto-menu {
        padding: 16px;
        border-radius: 12px;
    }

    .menu-layout-tabs .resto-menu h2 {
        padding: 14px 20px;
        margin: -16px -16px 16px -16px;
        border-radius: 10px 10px 0 0;
        font-size: 1.3rem;
    }

    /* Menu Layout: List - Mobile */
    .menu-layout-list .resto-menu h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    /* Sections Layout: Tabs - Mobile */
    .sections-layout-tabs .resto-menu-items {
        padding: 16px;
        border-radius: 10px;
    }

    /* Sections Layout: List - Mobile */
    .sections-layout-list .resto-menu-items {
        gap: 16px;
    }

    .sections-layout-list .resto-menu-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px;
        border-radius: 10px;
    }

    .sections-layout-list .resto-menu-item img {
        width: 100%;
        max-width: 220px;
        height: auto;
        aspect-ratio: 1;
    }

    /* Sections Layout: Masonry - Mobile */
    .sections-layout-masonry .resto-menu-items {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 16px;
    }

    .sections-layout-masonry .resto-menu-item {
        grid-row-end: auto;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .sections-layout-masonry .resto-menu-items {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }

    .sections-layout-list .resto-menu-item {
        gap: 20px;
        padding: 18px;
    }

    .sections-layout-list .resto-menu-item img {
        width: 130px;
        height: 130px;
    }
}

/* ========================================
   ITEM LAYOUT SYSTEM STYLES
   ======================================== */

/* Item Layout: Vertical (default - görsel üstte) */
.resto-menu-item.item-layout-vertical {
    display: flex;
    flex-direction: column;
}

.resto-menu-item.item-layout-vertical img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.resto-menu-item.item-layout-vertical .item-content {
    flex: 1;
}

/* Item Layout: Horizontal (görsel solda) - Tüm cihazlar */
.resto-menu-item.item-layout-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

/* For backend preview (has .item-image container) */
.resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    flex-shrink: 0;
}

.resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* For frontend (img directly under .resto-menu-item) */
.resto-menu-item.item-layout-horizontal:not([class*="ratio-"])>img {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Horizontal layout WITH ratio class - let aspect-ratio work */
.resto-menu-item.item-layout-horizontal[class*="ratio-"]>img,
.resto-menu-item.item-layout-horizontal[class*="ratio-"] .item-image img {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: auto !important;  /* Let aspect-ratio control height */
    object-fit: cover !important;
    border-radius: 6px;
    flex-shrink: 0;
}

.resto-menu-item.item-layout-horizontal .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* item-info: Flex row for name + separator + price */
.resto-menu-item.item-layout-horizontal .item-info {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    /* Center for better separator alignment */
    gap: 0 !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.resto-menu-item.item-layout-horizontal h3,
.resto-menu-item.item-layout-horizontal h4,
.resto-menu-item.item-layout-horizontal .item-name,
.resto-menu-item.item-layout-horizontal .item-info h3,
.resto-menu-item.item-layout-horizontal .item-info h4 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
    flex: 0 1 auto !important;
    /* Don't grow, so separator can fill */
    min-width: 0 !important;
    white-space: nowrap !important;
    /* For single line horizontal, nowrap is usually better */
    text-overflow: ellipsis;
    overflow: hidden;
}

.resto-menu-item.item-layout-horizontal h3 strong,
.resto-menu-item.item-layout-horizontal h4 strong {
    font-weight: 600;
}

.resto-menu-item.item-layout-horizontal .name-price-separator {
    flex: 1 1 auto !important;
    min-width: 10px !important;
    margin: 0 10px !important;
    align-self: center !important;
    height: 4px !important;
    /* Slightly smaller for sharper look */
}

.resto-menu-item.item-layout-horizontal .item-description,
.resto-menu-item.item-layout-horizontal p {
    font-size: 12px;
    margin: 3px 0 0 0;
    line-height: 1.3;
}

.resto-menu-item.item-layout-horizontal .item-price,
.resto-menu-item.item-layout-horizontal .price,
.resto-menu-item.item-layout-horizontal .item-info .item-price {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Desktop: Larger images and text for horizontal */
@media (min-width: 768px) {
    .resto-menu-item.item-layout-horizontal {
        gap: 15px;
        padding: 15px;
    }

    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image img {
        height: 100px;
        border-radius: 8px;
    }

    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"])>img {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        height: 100px !important;
        border-radius: 8px;
    }
    
    /* Horizontal layout WITH ratio class on desktop */
    .resto-menu-item.item-layout-horizontal[class*="ratio-"]>img,
    .resto-menu-item.item-layout-horizontal[class*="ratio-"] .item-image img {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        height: auto !important;  /* Let aspect-ratio control height */
        object-fit: cover !important;
        border-radius: 8px;
    }
    
    .resto-menu-item.item-layout-horizontal[class*="ratio-"] .item-image {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }

    .resto-menu-item.item-layout-horizontal h3,
    .resto-menu-item.item-layout-horizontal .item-name {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .resto-menu-item.item-layout-horizontal .item-description,
    .resto-menu-item.item-layout-horizontal p {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .resto-menu-item.item-layout-horizontal .item-price {
        font-size: 18px;
    }
}

/* Item Layout: Minimal (kompakt — görsel küçük, yanda; tek satır isim; 2 satır açıklama)
 * Eski kurallar flex-direction:column ile float:left karışımı kullanıyordu — flex child'lar
 * float'u yok sayar, o yüzden görsel her zaman üstte dikeyde kalıyordu. Flex row ile gerçek
 * kompakt görünümü sağlarız. .item-content wrapper'ı shortcode.php 4.2.0+ sürümünden itibaren
 * üretiliyor. */
.resto-menu-item.item-layout-minimal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
}

.resto-menu-item.item-layout-minimal > img,
.resto-menu-item.item-layout-minimal > .item-image > img {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    float: none;
    margin: 0;
}

.resto-menu-item.item-layout-minimal .item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resto-menu-item.item-layout-minimal h3 {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
}

.resto-menu-item.item-layout-minimal p {
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resto-menu-item.item-layout-minimal .item-price,
.resto-menu-item.item-layout-minimal .price {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

/* Name-Price Separator Styles */
.name-price-separator {
    flex: 1;
    height: 4px;
    margin: 0 10px;
    align-self: center;
    position: relative;
    overflow: hidden;
}

.name-price-separator.separator-dots {
    background-image: radial-gradient(circle, #000 1px, transparent 1px) !important;
    background-size: 5px 4px !important;
    background-position: center !important;
    background-repeat: repeat-x !important;
    opacity: 1 !important;
}

.name-price-separator.separator-dashes {
    background-image: linear-gradient(to right, #000 0%, #000 50%, transparent 50%, transparent 100%);
    background-size: 10px 1.5px;
    background-position: center;
    background-repeat: repeat-x;
    opacity: 1;
}

.name-price-separator.separator-solid {
    border-bottom: 1.5px solid #000;
    height: 0;
    align-self: center;
    opacity: 1;
    margin-bottom: -1px;
    /* Visual adjustment for alignment */
}

.name-price-separator.separator-none {
    display: none;
}

/* Mobile: Even smaller for very tight spaces */
@media (max-width: 480px) {
    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }

    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"]) .item-image img,
    .resto-menu-item.item-layout-horizontal:not([class*="ratio-"])>img {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: 50px !important;
    }
    
    /* Horizontal layout WITH ratio class on mobile */
    .resto-menu-item.item-layout-horizontal[class*="ratio-"]>img,
    .resto-menu-item.item-layout-horizontal[class*="ratio-"] .item-image img {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        height: auto !important;  /* Let aspect-ratio control height */
        object-fit: cover !important;
    }
    
    .resto-menu-item.item-layout-horizontal[class*="ratio-"] .item-image {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }

    .resto-menu-item.item-layout-horizontal h3,
    .resto-menu-item.item-layout-horizontal .item-name,
    .resto-menu-item.item-layout-horizontal h3 strong {
        font-size: 13px !important;
    }

    .resto-menu-item.item-layout-horizontal .item-description,
    .resto-menu-item.item-layout-horizontal p {
        font-size: 11px !important;
    }

    .resto-menu-item.item-layout-horizontal .item-price,
    .resto-menu-item.item-layout-horizontal .price {
        font-size: 13px !important;
    }
}

/* ========================================
   INLINE VARIANTS STYLES
   ======================================== */

.resto-item-variants {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e9ecef;
}

.resto-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dotted #f1f3f4;
}

.resto-variant-row:last-child {
    border-bottom: none;
}

.resto-variant-row .variant-name {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.resto-variant-row .variant-price {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* Horizontal layout variants */
.resto-menu-item.item-layout-horizontal .resto-item-variants {
    margin-top: 8px;
    padding-top: 8px;
}

.resto-menu-item.item-layout-horizontal .resto-variant-row {
    padding: 4px 0;
}

.resto-menu-item.item-layout-horizontal .resto-variant-row .variant-name,
.resto-menu-item.item-layout-horizontal .resto-variant-row .variant-price {
    font-size: 12px;
}

/* Minimal layout variants */
.resto-menu-item.item-layout-minimal .resto-item-variants {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.resto-menu-item.item-layout-minimal .resto-variant-row {
    padding: 4px 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .resto-item-variants {
        margin-top: 10px;
        padding-top: 10px;
    }

    .resto-variant-row {
        padding: 5px 0;
    }

    .resto-variant-row .variant-name,
    .resto-variant-row .variant-price {
        font-size: 13px;
    }
}

/* Grid layout variants fix - ensure cards with variants don't overlap */
.sections-layout-masonry .resto-menu-item:has(.resto-item-variants) {
    --span: auto !important;
    grid-row-end: auto !important;
    height: auto !important;
}

/* Fallback for browsers without :has() support */
.resto-menu-item.has-variants {
    --span: auto !important;
    grid-row-end: auto !important;
    height: auto !important;
}

/* Ensure grid doesn't force height on variant items */
.resto-m2-menu .resto-menu-items {
    grid-auto-rows: min-content;
}

/* Popup variant styles */
.popup-variants {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.popup-variants-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.popup-variant-row:last-child {
    border-bottom: none;
}

.popup-variant-name {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.popup-variant-price {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
}

/* ============================================
   Popup Actions Bar - Like & Review Buttons
   ============================================ */
.popup-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.popup-review-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-review-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.popup-review-btn i {
    font-size: 16px;
    margin: 0;
    color: #fff;
}

.popup-like-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-like-count {
    font-size: 16px;
    font-weight: 600;
    color: #e74c3c;
    min-width: 20px;
    text-align: center;
}

.popup-like-btn {
    background: #fff;
    border: 2px solid #e74c3c;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-like-btn i {
    font-size: 18px;
    color: #e74c3c;
    margin: 0;
    transition: all 0.3s ease;
}

.popup-like-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.popup-like-btn.active {
    background: #e74c3c;
}

.popup-like-btn.active i {
    color: #fff;
}

/* ============================================
   Review Modal
   ============================================ */
.resto-review-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.review-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    padding: 30px;
    position: relative;
    animation: reviewModalSlideIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes reviewModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.review-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f3f4;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-modal-close:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.review-modal-close i {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.review-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    text-align: center;
}

.review-modal-title i {
    color: #f1c40f;
    margin-right: 8px;
}

/* Star Rating */
.review-star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.review-star-rating i {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.review-star-rating i:hover {
    transform: scale(1.2);
}

.review-star-rating i.fa-star {
    color: #f1c40f;
}

/* Form Elements */
.review-modal-comment {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.review-modal-comment:focus {
    outline: none;
    border-color: #667eea;
}

.review-modal-name,
.review-modal-email {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 12px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.review-modal-name:focus,
.review-modal-email:focus {
    outline: none;
    border-color: #667eea;
}

.review-modal-submit {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.review-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.review-modal-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.review-modal-submit i {
    font-size: 16px;
    margin: 0;
    color: #fff;
}

.review-modal-note {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin: 15px 0 0 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .review-modal-content {
        padding: 20px;
        border-radius: 12px;
    }

    .review-modal-title {
        font-size: 18px;
    }

    .review-star-rating i {
        font-size: 28px;
    }

    .popup-review-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .popup-review-btn span {
        display: none;
    }
}

/* ============================================
   Popup Reviews Section
   ============================================ */
.popup-reviews-section {
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.popup-reviews-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.popup-reviews-header i.fa-star {
    color: #f1c40f;
}

.popup-reviews-title {
    font-size: 16px;
}

.popup-reviews-avg {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.popup-reviews-avg .avg-rating {
    font-weight: 700;
    color: #f1c40f;
}

.popup-reviews-avg i {
    color: #f1c40f;
    font-size: 14px;
}

.popup-reviews-avg .review-count {
    color: #999;
    font-weight: 400;
}

.popup-reviews-list {
    max-height: 250px;
    overflow-y: auto;
}

.popup-reviews-loading,
.popup-reviews-empty,
.popup-reviews-error {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.popup-reviews-empty i,
.popup-reviews-error i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.popup-review-item {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 10px;
}

.popup-review-item:last-child {
    margin-bottom: 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-stars i {
    color: #f1c40f;
    font-size: 12px;
}

.review-date {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.review-comment {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.review-admin-reply {
    margin-top: 10px;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 13px;
}

.reply-label {
    font-weight: 600;
    color: #3498db;
    display: block;
    margin-bottom: 4px;
}

.reply-label i {
    margin-right: 4px;
}

.reply-text {
    color: #555;
}

/* ============================================================
 * Accessibility baseline (WCAG 2.2)
 * Companion to resto_m2_accessibility_css() which handles admin-opt overrides.
 * Scoped to .resto-menu so site-wide styles are not affected.
 * ============================================================ */

/* Focus-visible: keyboard users only, does not trigger on mouse click */
.resto-menu .resto-menu-item:focus-visible,
.resto-menu .submenu-tab-btn:focus-visible,
.resto-menu .submenu-accordion-header:focus-visible,
.resto-menu .submenu-dropdown-select:focus-visible,
.resto-menu [role="button"]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

/* Minimum 44x44 target for interactive submenu controls (WCAG 2.5.8) */
.resto-menu .submenu-tab-btn,
.resto-menu .submenu-accordion-header {
    min-height: 44px;
}

/* Respect OS-level prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .resto-menu *,
    .resto-menu *::before,
    .resto-menu *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen reader only utility (for any future visually-hidden labels) */
.resto-menu .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
 * Item Layout enforcement
 *
 * Desteklenen image container varyasyonları (sitelerde karşılaşılanlar):
 *   1) Doğrudan <img>                 (shortcode default)
 *   2) <picture><source><img>         (WPC Smart Picture, ShortPixel AI, Optimole, Jetpack)
 *   3) <div class="item-image"><img>  (admin önizleme + bazı Elementor widget'ları)
 *   4) <div class="item-image"><picture>...</picture></div>  (2+3 kombinasyonu)
 *
 * Bu sebeple selector'lar hem direct <img> hem <picture> hem <.item-image> wrapper
 * için ayrı ayrı yazılmıştır. Resim optimizasyon plugin'leri img'i picture'la
 * sararsa ".resto-menu-item > img" selector'ı match etmez; bu da horizontal
 * layout'un sunucuda doğru class eklense bile hiç görünmemesinin sebebiydi.
 *
 * Prefix yok — iki shortcode wrapper'ı (.resto-menu, .resto-all-menus) ve
 * Elementor widget (.elementor-widget ... .resto-menu-item) kapsamı için.
 * ============================================================ */

/* ----- HORIZONTAL ----- */
.resto-menu-item.item-layout-horizontal {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
}

/* Image box: sabit 60x60 kutu (img, picture, veya .item-image) */
.resto-menu-item.item-layout-horizontal > img,
.resto-menu-item.item-layout-horizontal > picture,
.resto-menu-item.item-layout-horizontal > .item-image {
    display: block !important;
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 60px !important;
    flex-shrink: 0 !important;
    float: none !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 6px;
}

/* Inner image fills the box */
.resto-menu-item.item-layout-horizontal > img,
.resto-menu-item.item-layout-horizontal > picture img,
.resto-menu-item.item-layout-horizontal > picture > source + img,
.resto-menu-item.item-layout-horizontal > .item-image img,
.resto-menu-item.item-layout-horizontal > .item-image picture img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0 !important;
}

.resto-menu-item.item-layout-horizontal > .item-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Badge ve label'lar horizontal'da flex kardeş olarak genişlik çalmasın. */
.resto-menu-item.item-layout-horizontal > .resto-item-labels,
.resto-menu-item.item-layout-horizontal > .resto-campaign-badge {
    position: absolute !important;
    z-index: 2;
}

/* ----- MINIMAL ----- */
.resto-menu-item.item-layout-minimal {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px;
}

.resto-menu-item.item-layout-minimal > img,
.resto-menu-item.item-layout-minimal > picture,
.resto-menu-item.item-layout-minimal > .item-image {
    display: block !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    height: 56px !important;
    flex-shrink: 0 !important;
    float: none !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 6px;
}

.resto-menu-item.item-layout-minimal > img,
.resto-menu-item.item-layout-minimal > picture img,
.resto-menu-item.item-layout-minimal > picture > source + img,
.resto-menu-item.item-layout-minimal > .item-image img,
.resto-menu-item.item-layout-minimal > .item-image picture img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    margin: 0 !important;
}

.resto-menu-item.item-layout-minimal > .item-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.resto-menu-item.item-layout-minimal > .resto-item-labels,
.resto-menu-item.item-layout-minimal > .resto-campaign-badge {
    position: absolute !important;
    z-index: 2;
}

/* ----- VERTICAL ----- */
.resto-menu-item.item-layout-vertical {
    display: flex !important;
    flex-direction: column !important;
}

.resto-menu-item.item-layout-vertical > img,
.resto-menu-item.item-layout-vertical > picture,
.resto-menu-item.item-layout-vertical > .item-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    margin: 0 !important;
}

.resto-menu-item.item-layout-vertical > picture img,
.resto-menu-item.item-layout-vertical > picture > source + img,
.resto-menu-item.item-layout-vertical > .item-image img,
.resto-menu-item.item-layout-vertical > .item-image picture img {
    width: 100% !important;
    height: auto;
    display: block;
}

.resto-menu-item.item-layout-vertical > .item-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* Reduced motion: disable popup animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .resto-global-popup,
  .resto-global-popup .popup-container,
  .resto-global-popup.anim-fade .popup-container,
  .resto-global-popup.anim-slide .popup-container,
  .resto-global-popup.anim-zoom .popup-container,
  .popup-close {
    animation: none !important;
    transition: none !important;
  }
}

/* H-X11: Popup skeleton loading (popup_skeleton_loading=1 iken AJAX bekleme placeholder'ı) */
.popup-skeleton-wrapper {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.popup-skeleton {
    background: linear-gradient(90deg, #f0f0f0 0%, #e4e4e4 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: popup-skeleton-pulse 1.4s ease-in-out infinite;
}
.popup-skeleton-line { height: 40px; }
.popup-skeleton-line.short { width: 60%; height: 18px; }
@keyframes popup-skeleton-pulse {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .popup-skeleton { animation: none !important; }
}

/* End of File */
