/* style.css - Final version for Catering Ibu Dedeh */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.silk-gradient {
    background: linear-gradient(135deg, #570000 0%, #800000 100%);
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Navbar scroll effect (hanya untuk index dengan #main-nav) */
#main-nav.scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-bottom-color: #f5f5f4;
}

/* Transisi warna teks saat di-scroll khusus index */
#main-nav.scrolled .nav-logo a {
    color: #1b1c1b !important;
}
#main-nav.scrolled .nav-icon {
    color: #570000 !important;
}

/* Warna teks link default saat di-scroll */
#main-nav.scrolled .nav-link {
    color: #5a413d !important;
    border-bottom-color: transparent !important;
}

/* Style untuk active link saat di-scroll */
#main-nav.scrolled .nav-link.active {
    border-bottom-color: #570000 !important;
    color: #570000 !important;
}

/* Style hover saat di-scroll */
#main-nav.scrolled .nav-link:hover {
    color: #ef4444 !important;
    border-bottom-color: #ef4444 !important;
}

/* Tombol hubungi kami saat scroll */
#main-nav.scrolled .btn-hubungi {
    background-color: white;
    color: #570000;
    border-color: #570000;
}
#main-nav.scrolled .btn-hubungi:hover {
    background-color: #fee2e2;
}

/* Navbar biasa (non-index) */
.nav-link.active {
    border-bottom-color: white !important;
    border-bottom-width: 2px;
    opacity: 1;
}

/* Cart drawer */
#cart-drawer.active {
    pointer-events: auto;
}
#cart-drawer.active .drawer-overlay {
    opacity: 1;
}
#cart-drawer.active .translate-x-full {
    transform: translateX(0);
}
#cart-badge {
    transform: translate(50%, -50%);
}

/* Mobile menu */
#mobile-menu {
    transition: all 0.3s ease;
}

/* ===== MENU CARD ===== */
.menu-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.05);
    border-color: rgba(87,0,0,0.1);
}
.menu-card .img-container {
    height: 240px;
    overflow: hidden;
    background-color: #f0f0f0;
}

/* Mencegah img scale hover mengganggu container flex slider */
.menu-card .img-container img {
    transition: transform 0.5s ease;
}
.menu-card:hover .img-container img.object-cover {
    transform: scale(1.05);
}

.menu-card .card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.menu-card .title-price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.menu-card .title-price h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #570000;
    line-height: 1.3;
    flex: 1;
}
.menu-card .title-price .price {
    font-weight: 700;
    color: #800000;
    font-size: 1.125rem;
    white-space: nowrap;
}
.menu-card .desc {
    color: #5a413d;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== TOMBOL ADD TO CART ===== */
.add-to-cart {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: none;
    background: linear-gradient(135deg, #570000 0%, #800000 100%);
    color: white;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(87,0,0,0.15);
}
.add-to-cart:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(87,0,0,0.3);
}

/* ===== GALLERY COLLAGE GRID (STRETCHED) ===== */
.gallery-collage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.75rem;
    aspect-ratio: 1;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
    background-color: #f0f0f0;
}

.gallery-collage-grid .gallery-item:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }
.gallery-collage-grid .gallery-item:nth-child(10) { grid-area: 3 / 3 / 5 / 5; }

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { font-size: 0.7rem; letter-spacing: 1px; }
.gallery-overlay h3 { font-size: 1.25rem; font-weight: 600; margin-top: 0.25rem; }

/* ===== FILTER BUTTONS ===== */
.filter-btn {
    padding: 0.5rem 1.5rem; 
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem; 
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap; 
    flex-shrink: 0; /* Mencegah tombol mengecil jika di overflow container */
}
@media (min-width: 768px) {
    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

.filter-btn.silk-gradient {
    background: linear-gradient(135deg, #570000 0%, #800000 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(87,0,0,0.2);
}
.filter-btn.bg-white {
    background: white;
    color: #5a413d;
    border: 1px solid #e2e2e2;
}
.filter-btn.bg-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* ===== PAGINATION ===== */
.pagination-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(87,0,0,0.3);
    background: white;
    color: #570000;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}
.pagination-btn:hover {
    background: rgba(87,0,0,0.05);
    transform: translateY(-2px);
}
.pagination-btn.active {
    background: linear-gradient(135deg, #570000 0%, #800000 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(87,0,0,0.2);
    transform: scale(1.05);
}
.pagination-btn:active { transform: scale(0.95); }

/* Animasi fade in untuk pagination */
#pagination-container, #gallery-pagination {
    animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success Modal & Image Modal */
#success-modal.active, #image-modal.active {
    opacity: 1;
    pointer-events: auto;
}
#success-modal.active .bg-white { transform: scale(1); }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
#modal-image { max-height: 85vh; object-fit: contain; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .gallery-collage-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        aspect-ratio: auto;
        gap: 1rem;
        padding-bottom: 1.5rem;
        scrollbar-width: none;
    }
    .gallery-collage-grid::-webkit-scrollbar { display: none; }
    .gallery-collage-grid .gallery-item {
        flex: 0 0 85%;
        height: 350px;
        scroll-snap-align: center;
        border-radius: 0.75rem;
    }
    .gallery-collage-grid .gallery-item:nth-child(1),
    .gallery-collage-grid .gallery-item:nth-child(10) { grid-area: auto; }
    
    .filter-btn { padding: 0.4rem 1rem; font-size: 0.85rem; }
    .pagination-btn { padding: 0.35rem 1rem; font-size: 0.875rem; }
    .menu-card .img-container { height: 200px; }
    .menu-card .title-price { flex-direction: column; align-items: flex-start; }
    .menu-card .title-price .price { white-space: normal; }
}
