/**
 * Mobile Dish Slider Styles
 * Overlay slider за артикули на мобилни устройства
 */

/* Overlay container */
.mobile-dish-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Напълно черен фон за accordion страница */
body.accordion-page .mobile-dish-overlay {
    background: rgba(0, 0, 0, 1);
}

.mobile-dish-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay content wrapper */
.mobile-dish-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    cursor: default;
    pointer-events: none;
}

.mobile-dish-overlay-content > * {
    pointer-events: auto;
}

/* Close button */
.mobile-dish-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-dish-close:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Category Navigation - само за accordion страница */
body.accordion-page .mobile-category-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 15px;
    background: transparent;
    border-bottom: 1px solid rgba(230, 177, 95, 0.3);
    margin-bottom: 20px;
    margin-top: 60px;
}

body.accordion-page .mobile-category-nav-btn {
    background: var(--main-color);
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

body.accordion-page .mobile-category-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-one);
    stroke-width: 3;
}

body.accordion-page .mobile-category-nav-btn:active {
    transform: scale(0.95);
    background: rgba(230, 177, 95, 0.8);
}

body.accordion-page .mobile-category-info {
    flex: 1;
    position: relative;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--main-color);
}

body.accordion-page .mobile-category-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

body.accordion-page .mobile-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.85) 100%);
    z-index: 2;
}

body.accordion-page .mobile-category-text {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 10px;
    color: white;
}

body.accordion-page .mobile-category-name {
    font-family: var(--font-family-Fraunces);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 3px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

body.accordion-page .mobile-category-description {
    display: none;
}

body.accordion-page .mobile-category-count {
    font-size: 0.75rem;
    color: var(--main-color);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* Скриваме category nav на началната страница */
body:not(.accordion-page) .mobile-category-nav {
    display: none !important;
}

/* Slider container */
.mobile-dish-slider {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Slide container */
.mobile-dish-slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 10px;
}

/* Slide content */
.mobile-dish-slide-content {
    width: 100%;
    max-width: 500px;
    background: rgba(20, 60, 40, 0.3);
    border: 1px solid rgba(100, 200, 150, 0.2);
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    animation: slideIn 0.3s ease;
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image wrapper */
.mobile-dish-image-wrapper {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(58, 49, 10, 0.116);
    border: 1px solid rgba(0, 0, 0, 0.247);
}

.mobile-dish-slide-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

/* Info wrapper */
.mobile-dish-info-wrapper {
    color: #fff;
}

/* Title */
.mobile-dish-slide-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Description */
.mobile-dish-slide-description {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* Footer with prices */
.mobile-dish-slide-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(100, 200, 150, 0.2);
}

.mobile-dish-slide-weight {
    font-size: 14px;
    color: var(--main-color, #ff9800);
    font-weight: 500;
}

.mobile-dish-slide-price-bgn {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color, #ff9800);
    margin-left: auto;
}

.mobile-dish-slide-price-eur {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color, #ff9800);
}

/* Navigation buttons */
.mobile-dish-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, background 0.3s ease;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    pointer-events: none;
}

.mobile-dish-nav.visible {
    opacity: 1;
    pointer-events: auto;
}

.mobile-dish-nav:active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-dish-prev {
    left: 10px;
}

.mobile-dish-next {
    right: 10px;
}

/* Counter */
.mobile-dish-counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 10px;
}

.mobile-dish-current {
    color: #fff;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 479px) {
    .mobile-dish-overlay-content {
        padding: 15px;
    }

    .mobile-dish-slide-content {
        padding: 15px;
    }

    .mobile-dish-slide-title {
        font-size: 1rem;
        letter-spacing: 2px;
        font-family: sans-serif;
    }
    }

    .mobile-dish-slide-description {
        font-size: 14px;
    }

    .mobile-dish-slide-price-bgn,
    .mobile-dish-slide-price-eur {
        font-size: 16px;
    }

    .mobile-dish-slide-weight {
       font-size: 1rem;
    }

    .mobile-dish-nav {
        width: 40px;
        height: 40px;
    }

    .mobile-dish-prev {
        left: 5px;
    }

    .mobile-dish-next {
        right: 5px;
    }
}

/* Hide on desktop */
@media (min-width: 600px) {
    .mobile-dish-overlay {
        display: none !important;
    }
}

/* Cursor pointer на снимките само на мобилни */
@media (max-width: 599px) {
    .menu-tabs .dish-block .dish-image {
        cursor: pointer;
        position: relative;
    }

    /* Добавяме визуална индикация че снимката е кликабилна */
    .menu-tabs .dish-block .dish-image::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 24px 24px;
    }

    .menu-tabs .dish-block .dish-image:active::after {
        opacity: 1;
    }
}

