/* ==========================================================================
   LA NUEVA BAKERY — ARTISANAL GALLERY & PRODUCT CATALOG STYLES (gallery.css)
   "Confitería Rioplatense & Café Atelier" — Varied Editorial Frames & Pastelito Selection
   ========================================================================== */

.gallery_slide {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 370px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4.5rem 1.5rem;
    border-bottom: 3px solid var(--lnb-wheat);
}

.bakery_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Bakery-slide.jpg');
}

.cake_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Cakes-Bakery.jpg');
}

.custom_cake_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/customcakes.jpg');
}

.delicatessen_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Delicatessen-bakery.jpg');
}

.bite_side_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Bite-Sides-Bakery.jpg');
}

.imported_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Imported-Bakery.jpg');
}

.pastrie_slide {
    background-image: linear-gradient(135deg, rgba(30, 17, 11, 0.82) 0%, rgba(82, 23, 29, 0.68) 100%), url('../images/Pastries-Bakery.jpg');
}

.gallery_slide h1 {
    color: var(--lnb-white);
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.gallery-hero-lead {
    color: var(--lnb-cream);
    font-size: clamp(0.98rem, 1.8vw, 1.18rem);
    max-width: 660px;
    margin: 0 auto;
}

/* Category Filter / Quick Switcher Bar on Gallery Pages (Liquid Glass Pills) */
.lnb-catalog-nav-bar {
    background: linear-gradient(180deg, rgba(244, 234, 219, 0.72) 0%, rgba(252, 248, 242, 0.85) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 194, 163, 0.65);
    padding: 1.25rem 0;
}

.lnb-catalog-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.lnb-catalog-pill {
    position: relative;
    font-family: var(--font-stamp);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.52rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.74) 0%,
        rgba(255, 249, 240, 0.52) 52%,
        rgba(248, 235, 214, 0.66) 100%
    );
    backdrop-filter: blur(18px) saturate(190%);
    -webkit-backdrop-filter: blur(18px) saturate(190%);
    color: var(--lnb-coffee-dark);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow:
        0 8px 20px -6px rgba(30, 17, 11, 0.12),
        inset 0 1.5px 1px #ffffff,
        inset 0 -1.5px 2px rgba(216, 151, 60, 0.25),
        inset 0 0 14px rgba(255, 255, 255, 0.45);
    transition: all 0.28s var(--transition-smooth);
}

.lnb-catalog-pill:hover,
.lnb-catalog-pill.active {
    background: linear-gradient(
        135deg,
        rgba(178, 38, 51, 0.86) 0%,
        rgba(198, 125, 40, 0.82) 100%
    );
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    color: var(--lnb-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 10px 24px -4px rgba(168, 36, 49, 0.34),
        inset 0 1.5px 1.5px rgba(255, 255, 255, 0.68),
        inset 0 -1.5px 2px rgba(30, 17, 11, 0.25);
    transform: translateY(-2px);
}

/* Gallery Section Container */
.gallery_section {
    padding: 4.5rem 0 5.5rem;
}

.gallery_section .row {
    --bs-gutter-x: 1.85rem;
    --bs-gutter-y: 2.25rem;
}

/* Uniform, Modern Product Card Showcase */
.gallery_product {
    position: relative;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.gallery_product_card_inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1.5px solid var(--lnb-beige);
    border-radius: 22px;
    padding: 13px 13px 18px;
    box-shadow: 0 4px 18px rgba(30, 17, 11, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), 
                border-color 0.4s ease;
    cursor: pointer;
    will-change: transform, box-shadow;
}

@media (hover: hover) and (pointer: fine) {
    .gallery_product:hover .gallery_product_card_inner {
        transform: translateY(-5px);
        box-shadow: 0 16px 36px rgba(30, 17, 11, 0.12), 0 4px 14px rgba(216, 151, 60, 0.1);
        border-color: var(--lnb-caramel);
    }

    .gallery_product:hover img {
        transform: scale(1.045);
        filter: brightness(1.02);
    }
}

.gallery_product:active .gallery_product_card_inner {
    transform: translateY(0) scale(0.99);
    transition: transform 0.15s ease;
}

/* Perfectly Square Image Frame (Uniform Across All Columns) */
.gallery_img_wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fbf5ec;
    border-radius: 16px;
    border: 1px solid rgba(216, 151, 60, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery_product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), 
                filter 0.5s ease;
    will-change: transform;
    backface-visibility: hidden;
    transform: scale(1);
}

body.page-imported .gallery_product img {
    object-fit: contain;
    padding: 0.85rem;
    background: #ffffff;
}

.gallery_product .gallery_product_info {
    position: relative;
    width: 100%;
    height: auto;
    background: transparent;
    padding: 1rem 0.5rem 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    z-index: 2;
}

.gallery_product .gallery_product_info h2 {
    color: var(--lnb-coffee-dark);
    font-family: var(--font-display);
    font-size: 1.15rem !important;
    font-weight: 700;
    margin: 0;
    text-align: center !important;
    line-height: 1.35;
}

.gallery_product_actions {
    display: none !important;
}

.lnb-zoom-btn {
    display: none !important;
}

/* ==========================================================================
   PhotoSwipe Lightbox Reliability Fixes
   Ensure lightbox is locked to viewport, always above navbar, and never leaves ghost images
   ========================================================================== */
.pswp {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
}

.pswp--open {
    display: block !important;
}

.pswp__bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(18, 10, 6, 0.94) !important;
}

.pswp__scroll-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

.pswp__ui {
    z-index: 1000000 !important;
}
