/* ==========================================================================
   POP-UP MODAL – CARDÁPIO DO DIA (Buffet na Kombi)
   Design Responsivo, Moderno e Isolado
   ========================================================================== */

.cardapio-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 15, 29, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 16px;
    box-sizing: border-box;
}

.cardapio-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.cardapio-popup-dialog {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 94vh;
    background: #111827;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 193, 7, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cardapio-popup-backdrop.active .cardapio-popup-dialog {
    transform: scale(1);
}

/* Header */
.cardapio-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.9) 0%, rgba(17, 24, 39, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cardapio-popup-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffc107;
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
}

.cardapio-popup-title {
    color: #f3f4f6;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.cardapio-popup-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #e5e7eb;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cardapio-popup-close:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);
}

/* Body / Viewer */
.cardapio-popup-body {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030712;
    min-height: 360px;
    max-height: 70vh;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.cardapio-popup-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}

.cardapio-popup-img {
    max-width: 100%;
    max-height: 68vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* Setas de navegação */
.cardapio-popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.75);
    color: #f9fafb;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.cardapio-popup-nav:hover {
    background: #ffc107;
    color: #0f172a;
    border-color: #ffc107;
    transform: translateY(-50%) scale(1.1);
}

.cardapio-popup-nav.prev {
    left: 12px;
}

.cardapio-popup-nav.next {
    right: 12px;
}

/* Footer / Legenda e Contador */
.cardapio-popup-footer {
    padding: 12px 20px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cardapio-popup-caption {
    flex: 1;
    min-width: 200px;
}

.cardapio-popup-caption h4 {
    margin: 0;
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 600;
}

.cardapio-popup-caption p {
    margin: 2px 0 0 0;
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.3;
}

.cardapio-popup-counter {
    background: rgba(255, 255, 255, 0.08);
    color: #ffc107;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* ==========================================================================
   GALERIA SEMANAL – ABA CARDÁPIO (7 DIAS)
   ========================================================================== */

.weekly-cardapio-wrapper {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1 !important;
    visibility: visible !important;
}

.weekly-cardapio-heading {
    text-align: center;
    margin-bottom: 28px;
}

.weekly-cardapio-heading h3 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 6px;
    font-weight: 700;
}

.weekly-cardapio-heading p {
    color: #94a3b8;
    font-size: 0.92rem;
    max-width: 680px;
    margin: 0 auto;
}

/* Grid de 7 dias */
.weekly-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .weekly-days-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .weekly-days-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.weekly-day-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.weekly-day-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 193, 7, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.weekly-day-card.is-today {
    border-color: #ffc107;
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.15);
}

/* Cabeçalho do Card do Dia */
.weekly-day-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.weekly-day-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.weekly-day-card.is-today .weekly-day-name {
    color: #ffc107;
}

.weekly-today-badge {
    background: #ffc107;
    color: #0f172a;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
}

.weekly-photo-count {
    color: #64748b;
    font-size: 0.75rem;
}

/* Área de fotos do dia */
.weekly-day-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.weekly-day-main-photo {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #090d16;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.weekly-day-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.weekly-day-main-photo:hover img {
    transform: scale(1.03);
}

.weekly-zoom-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffc107;
    font-size: 0.85rem;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.weekly-day-main-photo:hover .weekly-zoom-overlay {
    opacity: 1;
}

/* Miniaturas adicionais caso haja mais de 1 foto no dia */
.weekly-thumbs-strip {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.weekly-thumb-item {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    background: #090d16;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.weekly-thumb-item:hover {
    border-color: #ffc107;
    transform: scale(1.05);
}

.weekly-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estado vazio */
.weekly-day-empty {
    padding: 30px 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .cardapio-popup-dialog {
        max-height: 96vh;
        border-radius: 12px;
    }
    .cardapio-popup-header {
        padding: 10px 14px;
    }
    .cardapio-popup-body {
        min-height: 280px;
        max-height: 60vh;
    }
    .cardapio-popup-img {
        max-height: 58vh;
    }
    .cardapio-popup-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .cardapio-popup-footer {
        padding: 10px 14px;
    }

    /* Galeria Semanal em coluna vertical no celular */
    .weekly-days-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .weekly-day-card {
        border-radius: 12px;
    }
    .weekly-cardapio-heading h3 {
        font-size: 1.35rem;
    }
}
