/**
 * Freelea Gallery Slider - Styles
 * Version: 1.0.0
 */

/* Reset browser defaults */
.freelea-gallery,
.freelea-gallery * {
    box-sizing: border-box;
}

.freelea-gallery {
    overflow: hidden;
    overflow-x: clip;
    position: relative;
    margin: 0;
    margin-top: 0!important;
    padding: 0;
    max-width: 100vw;
    max-width: 100dvw;
    overscroll-behavior-x: none;
}

.freelea-gallery .gallery-row {
    overflow: hidden;
    overflow-x: clip;
    position: relative;
    margin: 0;
    padding: 0;
    max-width: 100vw;
    overscroll-behavior-x: none;
}

.freelea-gallery .slider-wrap {
    overflow: hidden;
    overflow-x: clip;
    position: relative;
    margin: 0;
    padding: 0;
}

.freelea-gallery .slider-track {
    display: flex;
    gap: 4px;
    will-change: transform;
    margin: 0;
    padding: 0;
}

.freelea-gallery .gallery-item {
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: #080808;
    display: block;
    margin: 0;
    padding: 0;
    cursor: pointer;
    outline: none;
}

/* Focus state for accessibility */
.freelea-gallery .gallery-item:focus,
.freelea-gallery .gallery-item:focus-visible,
.freelea-gallery .gallery-item:active,
.freelea-gallery .gallery-item.selected {
    outline: 3px solid #B69BFF !important;
    outline-offset: -3px;
    border-color: #B69BFF !important;
}

.freelea-gallery *:focus,
.freelea-gallery *:focus-visible {
    outline-color: #B69BFF !important;
}

/* Loading skeleton animation */
.freelea-gallery .gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #080808 0%,
        #1a1a1a 50%,
        #080808 100%
    );
    background-size: 200% 100%;
    animation: freelea-shimmer 1.5s infinite;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.freelea-gallery .gallery-item.loaded::before {
    opacity: 0;
    pointer-events: none;
}

@keyframes freelea-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state */
.freelea-gallery .gallery-item.error::before {
    animation: none;
    background: #080808;
}

.freelea-gallery .gallery-item.error::after {
    content: '⚠️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    z-index: 2;
}

.freelea-gallery .gallery-item img,
.freelea-gallery .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: none;
    min-width: 100%;
    min-height: 100%;
}

.freelea-gallery .gallery-item.loaded img,
.freelea-gallery .gallery-item.loaded video {
    opacity: 1;
    visibility: visible;
}

/* Social media icon */
.freelea-gallery .social-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
    text-decoration: none;
}

.freelea-gallery .social-icon:hover,
.freelea-gallery .social-icon:focus-visible {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

.freelea-gallery .social-icon:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.freelea-gallery .social-icon svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* Navigation Arrows */
.freelea-gallery .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.3s ease, opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.freelea-gallery .nav-arrow:hover,
.freelea-gallery .nav-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.35);
}

.freelea-gallery .nav-arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.freelea-gallery .nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.freelea-gallery .nav-arrow svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.freelea-gallery .nav-arrow.arrow-left {
    left: 0;
    border-radius: 0 12px 12px 0;
}

.freelea-gallery .nav-arrow.arrow-right {
    right: 0;
    border-radius: 12px 0 0 12px;
}

/* Bottom Text Area */
.freelea-gallery .bottom-text-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.freelea-gallery .text-box {
    text-align: center;
}

.freelea-gallery .text-box h3 {
    font-size: 36px;
    font-weight: 300;
    color: #222;
    margin: 15px 0;
    line-height: 1.1;
    transition: opacity 0.3s ease;
}

.freelea-gallery .text-box p {
    font-size: 17px;
    color: #222;
    transition: opacity 0.3s ease;
    margin: 0;
}

/* Pause indicator */
.freelea-gallery .pause-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
    pointer-events: none;
}

.freelea-gallery .pause-indicator.visible {
    opacity: 1;
}

/* Screen reader only */
.freelea-gallery .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Styles */
@media (max-width: 576px) {
    .freelea-gallery {
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-top: 0 !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .freelea-gallery .gallery-row,
    .freelea-gallery .slider-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .freelea-gallery .slider-track {
        gap: 0 !important;
    }

    /* Gallery item width set by JS to match track calculation */
    .freelea-gallery .gallery-item {
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }

    .freelea-gallery .gallery-item img,
    .freelea-gallery .gallery-item video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .freelea-gallery .bottom-text-wrapper {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 0 !important;
    }

    .freelea-gallery .text-box {
        width: 100%;
        padding: 24px 10px 0 10px;
		
    }

    .freelea-gallery .text-box h3 {
        font-size: 22px !important;
        margin: 4px 0 6px 0 !important;
        line-height: 1.2 !important;
        color: #FCFCFC;
    }

    .freelea-gallery .text-box p {
        font-size: 6px;
        line-height: 1.6 !important;
        margin: 0;
        color: #A3A3A3;
    }

    .freelea-gallery .social-icon {
        width: 32px;
        height: 32px;
        bottom: 8px;
        right: 8px;
        border-radius: 8px;
    }

    .freelea-gallery .social-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Hide arrows on mobile */
    .freelea-gallery .nav-arrow {
        display: none;
    }

    .freelea-gallery .pause-indicator {
        display: none;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .freelea-gallery .gallery-item::before {
        animation: none;
    }

    .freelea-gallery .slider-track {
        transition: none;
    }

    .freelea-gallery .gallery-item img,
    .freelea-gallery .gallery-item video,
    .freelea-gallery .social-icon,
    .freelea-gallery .nav-arrow {
        transition: none;
    }
}

/* ===========================================
   Theme Overrides - Custom Colors
   Desktop: Always black
   Mobile Primary: #FCFCFC, Secondary: #A3A3A3, Tertiary: #616161
   =========================================== */

/* Footer - Dark background */
footer {
    background: #1A1A1A !important;
}

footer .footer-copyright {
    border-top-color: #1a1a1a !important;
}

/* Header - Always black on desktop */
.header,
.main-menu-area,
.main-menu-area.fixed-menu,
.main-menu-area.fixed-top {
    background-color: #1A1A1A !important;
}

.header.fixed {
    background-color: rgba(8, 8, 8, 0.95) !important;
}

/* Desktop dropdown/submenu - Dark background */
@media (min-width: 992px) {
    .nav-menu li.menu-item-has-children .sub-menu,
    .nav-menu li.page_item_has_children .children {
        background-color: #080808 !important;
    }

    .nav-menu li.menu-item-has-children .sub-menu li a,
    .nav-menu li.page_item_has_children .children li a {
        color: #FCFCFC !important;
    }

    .nav-menu li.menu-item-has-children .sub-menu li a:hover,
    .nav-menu li.page_item_has_children .children li a:hover {
        background-color: #1a1a1a !important;
        color: #A3A3A3 !important;
    }

    /* Menu text colors - always white on black */
    .nav-menu li a,
    .main-menu-area .nav-menu li a,
    .main-menu-area.fixed-menu .nav-menu li a {
        color: #FCFCFC !important;
    }

    .main-menu-area.fixed-menu .nav-menu li a span:after {
        background-color: #FCFCFC !important;
    }

    .nav-menu li a:hover,
    .main-menu-area.fixed-menu .nav-menu li a:hover {
        color: #A3A3A3 !important;
    }

    .main-menu-area.fixed-menu .cart-open .navbar-shopping-bag > i {
        color: #FCFCFC !important;
    }

    .main-menu-area.fixed-menu .menu-bar span {
        background-color: #FCFCFC !important;
    }
}

/* Mobile - Prevent horizontal scroll */
@media only screen and (max-width: 991px) {
    html {
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
        overscroll-behavior-x: none;
    }

    /* Banner/Slider - reduce top padding on mobile */
    .banner,
    section.banner,
    .banner.slide-bg,
    #home.banner {
        padding-top: 50px !important;
    }
}

/* Mobile menu - Dark background, opens from RIGHT, FULL SCREEN */
@media only screen and (max-width: 991px) {
    /* Header - keep absolute, just reduce padding */
    #top-page.header,
    header.header {
        padding: 10px 15px !important;
        background: transparent !important;
    }

    /* Logo - smaller on mobile */
    .header .logo img,
    .header .navbar-brand img,
    .header .navbar-brand1 img,
    .header .navbar-brand2 img {
        max-height: 28px !important;
        width: auto !important;
    }

    /* Hamburger icon visibility - WHITE */
    body .menu-bar span,
    body .main-menu-area .menu-bar span,
    body .main-menu-area.fixed-menu .menu-bar span,
    .header .menu-bar span {
        background-color: #fff !important;
    }

    /* Mobile menu - FULL SCREEN, dark background, opens from RIGHT */
    .op-mobile-menu {
        background-color: #080808 !important;
        z-index: 999999 !important;
        left: 100% !important;
        right: auto !important;
        transition: left 0.3s ease-in-out !important;
    }

    .mobile-menu-open .op-mobile-menu {
        left: 0 !important;
    }

    /* Menu header with close button */
    body .op-mobile-menu .m-menu-header {
        border-bottom: 1px solid #1a1a1a !important;
    }

    body .op-mobile-menu .close-button:before,
    body .op-mobile-menu .close-button:after {
        background-color: #fff !important;
    }

    /* Menu items */
    body .op-mobile-menu .nav-menu {
        padding: 20px 0 !important;
        overflow-y: auto !important;
    }

    body .op-mobile-menu .nav-menu li {
        padding: 0 25px !important;
    }

    body .op-mobile-menu .nav-menu li a {
        display: block !important;
        color: #fff !important;
        font-size: 18px !important;
        font-weight: 500 !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid #1a1a1a !important;
        text-decoration: none !important;
    }

    body .op-mobile-menu .nav-menu > li:last-child > a {
        border-bottom: none !important;
    }

    body .op-mobile-menu .nav-menu li a:hover,
    body .op-mobile-menu .nav-menu li a:active {
        color: #A3A3A3 !important;
    }

    body .op-mobile-menu .nav-menu li.dropdown > .dropdown-arrow {
        color: #A3A3A3 !important;
        font-size: 16px !important;
    }

    body .op-mobile-menu .dropdown-menu {
        background: transparent !important;
        padding: 0 0 10px 20px !important;
    }

    body .op-mobile-menu .nav-menu li > ul li {
        padding: 0 !important;
    }

    body .op-mobile-menu .nav-menu li > ul li a {
        font-size: 15px !important;
        font-weight: 400 !important;
        padding: 12px 0 !important;
        color: #616161 !important;
        border-bottom: none !important;
    }

    body .op-mobile-menu .nav-menu li > ul li a:hover {
        color: #A3A3A3 !important;
    }
}
