/* Global carousel UI polish (Owl Carousel + custom nav) */

/* RTL compatibility: Owl Carousel v1 layouts break when the document is RTL.
   Keep carousel mechanics LTR, while allowing slide content to remain RTL. */
html[dir="rtl"] .owl-carousel,
html[dir="rtl"] .owl-carousel .owl-wrapper-outer,
html[dir="rtl"] .owl-carousel .owl-wrapper {
    direction: ltr;
}

html[dir="rtl"] .owl-carousel .owl-item {
    direction: rtl;
}

/* 1) Modern, consistent nav arrows (replace blocky/green squares) */
.owl-carousel {
    position: relative;
}

.custom-carousel .owl-controls {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    pointer-events: none !important;
}

.custom-carousel .owl-controls .owl-buttons .owl-prev,
.custom-carousel .owl-controls .owl-buttons .owl-next,
.custom-glow-prev,
.custom-glow-next {
    pointer-events: auto;
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%);
    width: 44px !important;
    height: 44px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease !important;
    z-index: 30;
}

.custom-carousel .owl-controls .owl-buttons .owl-prev:hover,
.custom-carousel .owl-controls .owl-buttons .owl-next:hover,
.custom-glow-prev:hover,
.custom-glow-next:hover {
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12) !important;
}

.custom-carousel .owl-controls .owl-buttons .owl-prev:active,
.custom-carousel .owl-controls .owl-buttons .owl-next:active,
.custom-glow-prev:active,
.custom-glow-next:active {
    transform: translateY(-50%) scale(0.98);
}

.custom-carousel .owl-controls .owl-buttons .owl-prev {
    left: 12px !important;
    right: auto !important;
}

.custom-carousel .owl-controls .owl-buttons .owl-next {
    right: 12px !important;
    left: auto !important;
}

/* Glow collection custom arrows */
.custom-glow-prev {
    left: 12px !important;
    right: auto !important;
}

.custom-glow-next {
    right: 12px !important;
    left: auto !important;
}

/* Ensure the old FontAwesome pseudo icons are centered and visible */
.custom-carousel .owl-controls .owl-buttons .owl-prev:before,
.custom-carousel .owl-controls .owl-buttons .owl-next:before {
    position: static !important;
    left: auto !important;
    top: auto !important;
    color: #111 !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

/* Custom glow arrows are <div><i class="fa ..."></i></div> */
.custom-glow-prev i,
.custom-glow-next i {
    color: #111 !important;
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* 2) Reduce excessive padding/boxing on home tab sections */
.scroll-tabs {
    box-shadow: none !important;
    background: #fff !important;
}

.scroll-tabs .more-info-tab {
    padding: 0 0 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.scroll-tabs .tab-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.scroll-tabs .product-slider,
.scroll-tabs .home-owl-carousel {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 3) Brands logo carousel: edge-to-edge full width */
#brands-carousel.logo-slider {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    /* Background and borders now handled in brands.blade.php */
}

/* 4) Remove extra separator lines */
.horizontal-menu-wrapper {
    border-bottom: none !important;
}

/* 5) Sephora-style compact card layout for Recently/Because sections */
.recently-viewed-section .owl-carousel.outer-top-xs,
.because-viewed-section .owl-carousel.outer-top-xs {
    margin-top: 0 !important;
}

/* Control carousel item width - show more items, smaller cards */
.recently-viewed-section .owl-item,
.because-viewed-section .owl-item {
    padding: 0 8px !important;
}

.recently-viewed-section .item-carousel,
.because-viewed-section .item-carousel {
    padding: 0 !important;
}

.recently-viewed-section .products,
.because-viewed-section .products {
    margin: 0 !important;
    padding: 0 !important;
}

/* Product card - minimal padding, tight border */
.recently-viewed-section .product,
.because-viewed-section .product {
    border: 1px solid #e5e5e5;
    border-radius: 0 !important;
    background: #fff;
    box-shadow: none !important;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}

.recently-viewed-section .product-image,
.because-viewed-section .product-image {
    border-bottom: none !important;
    background: #fff;
    padding: 8px 8px 0 8px !important;
}

/* Image container - flush with card edges */
.recently-viewed-section .product-image .image,
.because-viewed-section .product-image .image {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recently-viewed-section .product-image img,
.because-viewed-section .product-image img {
    height: 160px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

/* Product info - left aligned like Sephora, tight spacing */
.recently-viewed-section .product-info,
.because-viewed-section .product-info {
    padding: 10px 8px 8px 8px !important;
    text-align: start !important;
}

.recently-viewed-section .product-info .name,
.because-viewed-section .product-info .name {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    height: auto !important;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recently-viewed-section .product-info .name a,
.because-viewed-section .product-info .name a {
    color: #111 !important;
    text-decoration: none;
}

.recently-viewed-section .product-info .product-price,
.because-viewed-section .product-info .product-price {
    margin-top: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111 !important;
}

/* 6) Product card action bars: keep cart/quickview/wishlist horizontal on tablet/desktop */
@media (min-width: 768px) {
    /* Bootstrap has `.show { display: block !important; }` which breaks `.product-action-1.show` layouts */
    .product-action-1.show {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    /* Prevent "ADD TO BAG" from taking full width and pushing icons to a new line */
    .product-action-1.show .add-to-bag-btn {
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
    }

    /* Ensure SVG icon buttons have a consistent visible size (Home/New Products carousel) */
    .modern-icon-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        line-height: 0 !important;
    }

    .modern-icon-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    /* Neutralize legacy float/green-block styles for the modern action row only */
    .product .cart .action ul.modern-action-row {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .product .cart .action ul.modern-action-row > li {
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .product .cart .action ul.modern-action-row > li.lnk {
        border-left: 0 !important;
    }

    .product .cart .action ul.modern-action-row > li.lnk > a,
    .product .cart .action ul.modern-action-row > li.lnk > button {
        padding: 0 !important;
    }

    /* Fix "balloon" cart pill on homepage carousels (legacy theme sets `.product .cart` to width:100% + top:45%) */
    .homebanner-holder .product .cart,
    .home-owl-carousel .product .cart,
    .new-products-carousel .product .cart {
        top: auto !important;
        bottom: 12px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        margin-left: 0 !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-width: calc(100% - 24px) !important;
        padding: 6px !important;
        border-radius: 999px !important;
    }

    .homebanner-holder .product:hover .cart,
    .home-owl-carousel .product:hover .cart,
    .new-products-carousel .product:hover .cart {
        top: auto !important;
        bottom: 12px !important;
        margin: 0 !important;
        margin-left: 0 !important;
    }

    .homebanner-holder .product .cart .action,
    .home-owl-carousel .product .cart .action,
    .new-products-carousel .product .cart .action {
        float: none !important;
        width: auto !important;
        display: block !important;
        margin: 0 !important;
    }

    body.arabic-lang .homebanner-holder .product .cart,
    body.arabic-lang .home-owl-carousel .product .cart,
    body.arabic-lang .new-products-carousel .product .cart {
        left: auto !important;
        right: 50% !important;
        transform: translateX(50%) !important;
    }

    /* Full-bleed product images (remove white padding frame around carousel images) */
    .homebanner-holder .product .product-image .image,
    .home-owl-carousel .product .product-image .image,
    .new-products-carousel .product .product-image .image {
        padding: 0 !important;
        background: transparent !important;
        display: block !important;
        line-height: 0 !important;
        overflow: hidden !important;
    }

    .homebanner-holder .product .product-image .image a,
    .home-owl-carousel .product .product-image .image a,
    .new-products-carousel .product .product-image .image a {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
    }

    .homebanner-holder .product .product-image .image img,
    .home-owl-carousel .product .product-image .image img,
    .new-products-carousel .product .product-image .image img {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* New Products + Exclusive Collections: square 90-degree corners (no rounding / no clipping look) */
    #product-tabs-slider .product,
    .scroll-tabs.exclusive-collections .product,
    #product-tabs-slider-2 .product {
        border-radius: 0 !important;
        background: #fff !important;
        overflow: hidden !important;
    }

    #product-tabs-slider .product .product-image .image,
    .scroll-tabs.exclusive-collections .product .product-image .image,
    #product-tabs-slider-2 .product .product-image .image {
        border-radius: 0 !important;
    }

    #product-tabs-slider .product .product-image .image img,
    .scroll-tabs.exclusive-collections .product .product-image .image img,
    #product-tabs-slider-2 .product .product-image .image img {
        border-radius: 0 !important;
    }

    /* Center name/rating/price under the image (clean + consistent in RTL) */
    #product-tabs-slider .product .product-info,
    .scroll-tabs.exclusive-collections .product .product-info,
    #product-tabs-slider-2 .product .product-info {
        text-align: center !important;
        padding: 14px 14px 18px !important;
    }

    #product-tabs-slider .product .product-info .name,
    .scroll-tabs.exclusive-collections .product .product-info .name,
    #product-tabs-slider-2 .product .product-info .name {
        margin: 12px 0 6px !important;
    }

    #product-tabs-slider .product .product-info .rating,
    .scroll-tabs.exclusive-collections .product .product-info .rating,
    #product-tabs-slider-2 .product .product-info .rating {
        display: inline-block !important;
        margin: 0 auto 8px !important;
    }

    #product-tabs-slider .product .product-info .product-price,
    .scroll-tabs.exclusive-collections .product .product-info .product-price,
    #product-tabs-slider-2 .product .product-info .product-price {
        display: flex !important;
        justify-content: center !important;
        align-items: baseline !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        margin-top: 6px !important;
    }

    #product-tabs-slider .product .product-info .product-price .price,
    .scroll-tabs.exclusive-collections .product .product-info .product-price .price,
    #product-tabs-slider-2 .product .product-info .product-price .price {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Reduce huge white gap below Exclusive Collections (next section spacing) */
    .glow-video-carousel-section {
        margin-top: 24px !important;
        margin-bottom: 36px !important;
        padding-top: 16px !important;
        padding-bottom: 24px !important;
        background: #fff !important;
    }
}

/* =========================================
   PRODUCT CARD COLORFUL INFO BACKGROUNDS
   Rich premium tones rotating on cards
   ========================================= */

/* Base styling for colored product-info area (only in card listings, not single product page) */
.owl-item .product .product-info,
.category-product .product .product-info {
    padding: 14px 14px 18px !important;
    border-radius: 0 0 4px 4px;
    transition: background 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Lock product name to fixed 2-line height so all cards align */
.owl-item .product .product-info .name,
.category-product .product .product-info .name {
    min-height: 2.8em !important;
    max-height: 2.8em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

/* Keep rating and price rows compact */
.owl-item .product .product-info .rating,
.category-product .product .product-info .rating {
    margin-bottom: 6px !important;
}

.owl-item .product .product-info .product-price,
.category-product .product .product-info .product-price {
    margin-top: auto !important;
}

/* Remove colors from top two sections - keep them white */
#product-tabs-slider .owl-item .product .product-info,
#product-tabs-slider-2 .owl-item .product .product-info {
    background: #fff !important;
    min-height: auto;
}

#product-tabs-slider .owl-item .product .product-info .name a,
#product-tabs-slider-2 .owl-item .product .product-info .name a {
    color: #555 !important;
}

#product-tabs-slider .owl-item .product .product-info .product-price .price,
#product-tabs-slider-2 .owl-item .product .product-info .product-price .price {
    color: #111 !important;
}

#product-tabs-slider .owl-item .product .product-info .product-price .price-before-discount,
#product-tabs-slider-2 .owl-item .product .product-info .product-price .price-before-discount {
    color: #d3d3d3 !important;
}

/* Rotating green shades via nth-child on carousel items */
/* Color 1: Deep forest green */
.owl-item:nth-child(6n+1) .product .product-info {
    background: #2E7D5B !important;
}

/* Color 2: Sprint green */
.owl-item:nth-child(6n+2) .product .product-info {
    background: #4CAF7A !important;
}

/* Color 3: Emerald */
.owl-item:nth-child(6n+3) .product .product-info {
    background: #1B8A5A !important;
}

/* Color 4: Sage green */
.owl-item:nth-child(6n+4) .product .product-info {
    background: #6A9C78 !important;
}

/* Color 5: Jade */
.owl-item:nth-child(6n+5) .product .product-info {
    background: #3B8C6E !important;
}

/* Color 6: Mint deep */
.owl-item:nth-child(6n+6) .product .product-info {
    background: #5BA888 !important;
}

/* Also apply to shop page grid items (non-carousel) */
.category-product .products:nth-child(6n+1) .product .product-info {
    background: #2E7D5B !important;
}
.category-product .products:nth-child(6n+2) .product .product-info {
    background: #4CAF7A !important;
}
.category-product .products:nth-child(6n+3) .product .product-info {
    background: #1B8A5A !important;
}
.category-product .products:nth-child(6n+4) .product .product-info {
    background: #6A9C78 !important;
}
.category-product .products:nth-child(6n+5) .product .product-info {
    background: #3B8C6E !important;
}
.category-product .products:nth-child(6n+6) .product .product-info {
    background: #5BA888 !important;
}

/* Ensure text stays crisp on green backgrounds */
.owl-item .product .product-info .name a,
.category-product .product .product-info .name a {
    color: #fff !important;
}

.owl-item .product .product-info .product-price .price,
.category-product .product .product-info .product-price .price {
    color: #fff !important;
    font-weight: 700 !important;
}

.owl-item .product .product-info .product-price .price-before-discount,
.category-product .product .product-info .product-price .price-before-discount {
    color: rgba(255,255,255,0.65) !important;
}

