/* =================================================================
   Lookbook Banner - Full-bleed shoppable scene
   ================================================================= */

/* --- Wrapper ---------------------------------------------------- */
.lbb-wrapper {
    position: relative;
    font-family: inherit;
}

/* --- Scene container -------------------------------------------- */
.lbb-scene {
    position: relative;
    height: 580px;
    border-radius: 24px;
    overflow: hidden;
    isolation: isolate;
}

/* Swiper fills the scene */
.lbb-scene .kitify-carousel,
.lbb-scene .kitify-carousel-inner,
.lbb-scene .swiper-container,
.lbb-scene .swiper-wrapper,
.lbb-scene .swiper-slide {
    height: 100%;
}

/* Promote swiper container to its own GPU layer */
.lbb-scene .swiper-container {
    will-change: transform;
}

/* Slide - anchor for absolute image */
.lbb-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* Image fills slide absolutely */
.lbb-img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lbb-slide:hover .lbb-img {
    transform: scale(1.03);
}

/* Bottom gradient overlay.
   --lbb-overlay-color   set by Elementor "Gradient Overlay Color" control.
   --lbb-overlay-opacity set by Elementor "Gradient Opacity" slider.
   opacity on the pseudo-element multiplies with the gradient alpha. */
.lbb-scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--lbb-overlay-color, #000000) 0%,
        transparent 70%
    );
    opacity: var(--lbb-overlay-opacity, 0.5);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.lbb-scene.is-open::after {
    opacity: calc(var(--lbb-overlay-opacity, 0.5) * 0.6);
}

/* --- Navigation arrows ------------------------------------------ */
.lbb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #111;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    font-size: 18px;
    line-height: 1;
}

.lbb-nav:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

/* Disable expensive backdrop-filter during slide transitions */
.lbb-scene.is-transitioning .lbb-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.lbb-nav span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lbb-nav--prev { left: 16px; }
.lbb-nav--next { right: 16px; }

/* --- Dot pagination --------------------------------------------- */
.lbb-dots.swiper-pagination {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex !important;
    gap: 6px;
    align-items: center;
}

.lbb-dots .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 99px;
    opacity: 1;
    margin: 0 !important;
    transition: width 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.lbb-dots .swiper-pagination-bullet-active {
    width: 22px;
    background: #ffffff;
}

/* --- Scene content overlay (caption + trigger) ------------------ */
.lbb-scene-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    will-change: opacity;
}

.lbb-slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 28px;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    gap: 16px;
    will-change: opacity;
}

.lbb-slide-content.is-active {
    opacity: 1;
    pointer-events: none; /* keep swipe-through; only children that need clicks set their own pointer-events */
}

.lbb-slide-content.is-active .lbb-trigger {
    pointer-events: auto;
}

/* --- Caption ---------------------------------------------------- */
.lbb-caption {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 55%;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

/* --- Trigger pill ----------------------------------------------- */
@media (max-width: 767px) {
    .lbb-trigger {
        display: none !important;
    }
}

.lbb-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #111111;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.2);
    transition: transform 0.22s ease, background 0.2s ease, box-shadow 0.22s ease;
    position: relative;
    flex-shrink: 0;
    align-self: flex-end;
}

.lbb-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

.lbb-trigger:active {
    transform: translateY(0);
}

.lbb-trigger[aria-expanded="true"] {
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* Disable expensive backdrop-filter during slide transitions */
.lbb-scene.is-transitioning .lbb-trigger {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.lbb-trigger-icon {
    flex-shrink: 0;
}

/* Pulse ring - optional */
.lbb-trigger--pulse::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.55);
    animation: lbb-pulse 2.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes lbb-pulse {
    0%   { opacity: 0.9; transform: scale(1); }
    60%  { opacity: 0;   transform: scale(1.18); }
    100% { opacity: 0.9; transform: scale(1); }
}

/* --- Product Drawer --------------------------------------------- */
.lbb-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-radius: 20px 20px 0 0;
    max-height: 420px;
    display: flex;
    flex-direction: column;

    /* Slide-up animation */
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.lbb-drawer.is-open {
    transform: translateY(0);
}

.lbb-drawer-inner {
    display: flex;
    flex-direction: column;
    padding: 0 22px 22px;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Drag handle */
.lbb-drawer-inner::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 36px;
    height: 4px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 99px;
    margin: 12px auto 14px;
}

.lbb-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.lbb-drawer-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.02em;
}

.lbb-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.lbb-drawer-close:hover {
    background: rgba(0, 0, 0, 0.14);
    color: #111;
    transform: rotate(90deg);
}

.lbb-drawer-close svg {
    width: 0.75rem;
    height: 0.75rem;
    display: block;
    flex-shrink: 0;
}

/* --- Product grid inside drawer --------------------------------- */
.lbb-drawer-products {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

.lbb-drawer-products::-webkit-scrollbar {
    width: 4px;
}

.lbb-drawer-products::-webkit-scrollbar-track {
    background: transparent;
}

.lbb-drawer-products::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 99px;
}

/* Override theme/WC product grid - use CSS-variable columns */
.lbb-drawer-products ul.products {
    --lbb-drawer-cols: 3;
    --lbb-drawer-gap: 16px;

    display: grid !important;
    grid-template-columns: repeat(var(--lbb-drawer-cols), 1fr) !important;
    gap: var(--lbb-drawer-gap) !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Force each product li to fill its grid cell */
.lbb-drawer-products ul.products > li.product,
.lbb-drawer-products ul.products > li.grid-new-row {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    flex: none !important;
}

/* Hide the grid-new-row spacer li WooCommerce injects */
.lbb-drawer-products ul.products > li.grid-new-row {
    display: none !important;
}

/* Ensure product-item fills the cell properly */
.lbb-drawer-products .product-item {
    height: 100%;
}

.lbb-drawer-products .product-item__thumbnail {
    overflow: hidden;
}
