/* ==========================================================================
   SAM'S CUISINE - PHOTO GALLERY & DROPDOWN STYLES (15 SUBCATEGORIES)
   ========================================================================== */

/* Top Nav Dropdown Menu */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown-caret {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

.nav-item-dropdown:hover .nav-dropdown-caret {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #FFFFFF;
    min-width: 520px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1050;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #332B25 !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-item:hover {
    background: #FAF5EE;
    color: var(--color-primary, #C85D2A) !important;
    transform: translateX(4px);
}

.nav-dropdown-item .cat-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

/* Gallery Section */
.gallery-section {
    padding: 85px 0 95px;
    background-color: #FFFFFF;
    position: relative;
}

.gallery-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.gallery-subheading {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary, #C85D2A);
    display: block;
    margin-bottom: 8px;
}

.gallery-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 2.5rem;
    color: #1F1A17;
    margin-bottom: 12px;
}

.gallery-desc {
    color: #6E655C;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* 15 Subcategories Filter Pills */
.gallery-filter-wrapper {
    margin-bottom: 45px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background-color: #FAF5EE;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    color: #4A433D;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.gallery-filter-btn:hover {
    background-color: #F0E6D8;
    color: #1F1A17;
    border-color: rgba(0, 0, 0, 0.15);
}

.gallery-filter-btn.active {
    background-color: var(--color-primary, #C85D2A);
    color: #FFFFFF;
    border-color: var(--color-primary, #C85D2A);
    box-shadow: 0 4px 14px rgba(200, 93, 42, 0.35);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-color: #1F1A17;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.35s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Gallery Placeholder card for incoming photos */
.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2D2621 0%, #1A1614 100%);
    color: #FAF5EE;
    padding: 20px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease;
}

.gallery-item:hover .gallery-item-placeholder {
    background: linear-gradient(135deg, #3A312B 0%, #201B18 100%);
}

.gallery-placeholder-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-placeholder-icon {
    transform: scale(1.15);
}

/* Item Overlay Info */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-cat {
    display: inline-block;
    background: var(--color-primary, #C85D2A);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    align-self: flex-start;
}

.gallery-item-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    color: #FFFFFF;
    font-size: 1.15rem;
    margin: 0 0 4px;
}

.gallery-item-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-zoom {
    opacity: 1;
    transform: scale(1);
}

/* Lightbox Modal */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 10, 0.94);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 900px;
    max-height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img-wrapper {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    background: #1F1A17;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-caption {
    margin-top: 16px;
    color: #FAF5EE;
    text-align: center;
}

.lightbox-caption h4 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.4rem;
    margin: 0 0 6px;
    color: #FFFFFF;
}

.lightbox-caption p {
    color: #CBC2B5;
    font-size: 0.95rem;
    margin: 0;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2010;
}

.lightbox-close:hover {
    background: var(--color-primary, #C85D2A);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2010;
}

.lightbox-prev {
    left: 25px;
}

.lightbox-next {
    right: 25px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--color-primary, #C85D2A);
    transform: translateY(-50%) scale(1.1);
}

/* Mobile Responsiveness for Gallery */
@media (max-width: 991px) {
    .nav-dropdown-menu {
        display: none;
    }
    
    .gallery-title {
        font-size: 2.1rem;
    }
    
    .gallery-filters {
        justify-content: flex-start;
        padding-left: 10px;
    }
}

@media (max-width: 767px) {
    .gallery-section {
        padding: 55px 0 65px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}
