.cenik-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cenik-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cenik-popup {
    position: relative;
    width: min(920px, 96vw);
    max-height: 88vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    animation: cenikFadeIn 0.35s ease-out;
    background-color: #1e3c72;
}

.cenik-popup-inner {
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    background-color: #1e3c72;
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.78) 0%,
            rgba(255, 255, 255, 0.72) 100%
        ),
        url('../img/odzadje-cenik.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cenik-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background 0.2s ease;
}

.cenik-close:hover {
    background: #b71c1c;
    transform: scale(1.06);
}

.cenik-title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #1e3c72;
    font-family: 'Montserrat', sans-serif;
}

.cenik-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-right: 44px;
}

.cenik-header-text {
    flex: 1;
    min-width: 0;
}

.cenik-logo {
    flex-shrink: 0;
    height: 46px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    margin-top: 2px;
}

.cenik-note {
    margin: 0 0 6px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cenik-category {
    margin-bottom: 18px;
}

.cenik-category:last-of-type {
    margin-bottom: 8px;
}

.cenik-category-title {
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f9d423;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e3c72;
    font-family: 'Montserrat', sans-serif;
}

.cenik-pricelist {
    width: 100%;
}

.cenik-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px minmax(140px, 32%);
    column-gap: 16px;
    align-items: start;
}

.cenik-grid-head {
    padding: 0 10px 8px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.18);
}

.cenik-category .cenik-grid-head {
    margin-top: 4px;
}

.cenik-grid-head .cenik-col {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    font-weight: 600;
}

.cenik-grid-row {
    padding: 10px;
    border-bottom: 1px solid rgba(30, 60, 114, 0.12);
    font-size: 0.95rem;
}

.cenik-grid-row:last-child {
    border-bottom: none;
}

.cenik-col-service {
    text-align: left;
    word-break: break-word;
}

.cenik-col-price {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #1e3c72;
}

.cenik-grid-head .cenik-col-price {
    text-align: right;
    font-weight: 600;
    color: #666;
}

.cenik-col-note {
    text-align: left;
    color: #666;
    font-size: 0.88rem;
    word-break: break-word;
}

.cenik-grid-head .cenik-col-note {
    font-size: 0.8rem;
    color: #666;
}

.cenik-empty {
    padding: 24px;
    text-align: center;
    color: #666;
}

.cenik-footer-notice {
    margin: 18px 10px 0;
    padding: 14px 12px 0;
    border-top: 1px solid rgba(30, 60, 114, 0.18);
    font-size: 0.84rem;
    line-height: 1.55;
    color: #444;
    text-align: center;
    white-space: pre-line;
}

.cenik-footer-notice:empty {
    display: none;
}

.cenik-last-updated {
    margin: 16px 10px 0;
    padding-top: 12px;
    border-top: 1px solid rgba(30, 60, 114, 0.18);
    font-size: 0.88rem;
    line-height: 1.45;
    color: #1e3c72;
    text-align: center;
    font-weight: 600;
}

.cenik-last-updated:empty {
    display: none;
}

.cenik-close-bottom {
    display: block;
    margin: 20px auto 0;
    padding: 10px 32px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(90deg, #1e3c72 0%, #f9d423 100%);
    box-shadow: 0 0 10px 2px rgba(249, 212, 35, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cenik-close-bottom:hover {
    transform: scale(1.03);
    box-shadow: 0 0 16px 3px rgba(249, 212, 35, 0.55);
}

@keyframes cenikFadeIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .cenik-popup-inner {
        padding: 22px 14px 16px;
    }

    .cenik-header {
        flex-wrap: wrap;
        padding-right: 40px;
    }

    .cenik-logo {
        height: 38px;
        max-width: 140px;
        margin-left: auto;
    }

    .cenik-header-text {
        width: 100%;
    }

    .cenik-grid {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .cenik-grid-head {
        display: none;
    }

    .cenik-grid-row {
        padding: 12px 8px 14px;
        border-bottom: 1px solid rgba(30, 60, 114, 0.12);
    }

    .cenik-col-price,
    .cenik-col-note {
        display: flex;
        gap: 8px;
        align-items: baseline;
    }

    .cenik-col-price::before {
        content: 'Cena:';
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #888;
        font-weight: 600;
        flex-shrink: 0;
    }

    .cenik-col-note::before {
        content: 'Opomba:';
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #888;
        font-weight: 600;
        flex-shrink: 0;
    }

    .cenik-col-note:empty {
        display: none;
    }

    html[lang='en'] .cenik-col-price::before {
        content: 'Price:';
    }

    html[lang='en'] .cenik-col-note::before {
        content: 'Note:';
    }
}
