/**
 * NS4L Category Banners - Styling
 * Comprehensive styles for category banner system
 * 
 * @version 1.0
 * @author NS4L Development Team
 */

/* ==========================================================================
   Base Banner Styles
   ========================================================================== */

.ns4l-category-banners {
    position: relative;
    margin: 0 0 2rem 0;
    width: 100%;
    clear: both;
}

/* Hero Banner Specific Styles */
.ns4l-banner-hero {
    margin: 0 0 3rem 0;
    max-width: 100%;
}

.ns4l-banner-hero .ns4l-banner-image-container {
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ns4l-banner-hero .embla {
    border-radius: 0;
}

/* Mini Banner Specific Styles */
.ns4l-banner-mini {
    margin: 0 0 2rem 0;
}

.ns4l-banner-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 8px;
}

.ns4l-banner-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.ns4l-banner-link {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.ns4l-banner-link:hover .ns4l-banner-image {
    transform: scale(1.02);
    filter: brightness(0.95);
}

.ns4l-banner-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.ns4l-banner-hero .ns4l-banner-link {
  border-radius: 0 !important;
}

/* ==========================================================================
   Single Banner Styles
   ========================================================================== */

.ns4l-single-banner {
    width: 100%;
}

.ns4l-single-banner .ns4l-banner-image-container {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.ns4l-single-banner .ns4l-banner-link:hover .ns4l-banner-image-container {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Slider Styles
   ========================================================================== */

.ns4l-banner-slider {
    position: relative;
    overflow: hidden;
}

.embla {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.embla__container {
    display: flex;
    touch-action: pan-y pinch-zoom;
}

.embla__slide {
    flex: 0 0 100%;
    min-width: 0;
    position: relative;
}

.embla__slide .ns4l-banner-image-container {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.embla__slide .ns4l-banner-link:hover .ns4l-banner-image-container {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ==========================================================================
   Navigation Controls
   ========================================================================== */

.embla__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0 0.5rem 0;
    gap: 1rem;
    pointer-events: none;
}

.embla__prev,
.embla__next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ac2222;
    color: #fff;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    line-height: 1;
    pointer-events: auto;
}

.embla__prev i,
.embla__next i {
    font-size: 14px;
    line-height: 1;
    display: block;
}

.embla__prev:hover,
.embla__next:hover {
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.embla__prev:active,
.embla__next:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.embla__prev:disabled,
.embla__next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
    box-shadow: none;
    transform: none;
}

.embla__prev:disabled:hover,
.embla__next:disabled:hover {
    background: #999;
    box-shadow: none;
    transform: none;
}

.embla__prev:focus,
.embla__next:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* ==========================================================================
   Dot Indicators
   ========================================================================== */

.embla__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.75rem 0 0 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.embla__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.embla__dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s ease;
}

.embla__dot:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.embla__dot:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.embla__dot.is-selected {
    background: #333;
    transform: scale(1.2);
}

.embla__dot.is-selected::after {
    background: rgba(0, 0, 0, 0.1);
}

.embla__dot:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet Styles */
@media (max-width: 768px) {
    .ns4l-category-banners {
        margin-bottom: 1.5rem;
    }
    
    .embla__container {
        margin-left: calc(-1 * 0.5rem);
    }
    
    .embla__slide {
        padding-left: 0.5rem;
    }
    
    .embla__controls {
        margin: 1rem 0 0.5rem 0;
        gap: 0.75rem;
    }
    
    .embla__prev,
    .embla__next {
        font-size: 14px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .embla__prev i,
    .embla__next i {
        font-size: 12px;
    }
    
    .embla__dots {
        gap: 0.4rem;
    }
    
    .embla__dot {
        width: 10px;
        height: 10px;
    }
}

/* Mobile Styles */
@media (max-width: 549px) {
    .ns4l-category-banners {
        margin-bottom: 1rem;
    }
    
    .ns4l-banner-hero {
        margin-bottom: 2rem;
    }
    
    .ns4l-banner-image-container {
        border-radius: 6px;
    }
    
    .ns4l-banner-hero .ns4l-banner-image-container {
        border-radius: 0;
    }
    
    .embla {
        border-radius: 6px;
    }
    
    .ns4l-banner-hero .embla {
        border-radius: 0;
    }
    
    .embla__container {
        margin-left: 0;
    }
    
    .embla__slide {
        padding-left: 0;
    }
    
    .embla__controls {
        margin: 0.75rem 0 0.25rem 0;
        gap: 0.5rem;
    }
    
    .embla__prev,
    .embla__next {
        font-size: 12px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .embla__prev i,
    .embla__next i {
        font-size: 10px;
    }
    
    .embla__dots {
        margin-top: 0.5rem;
        gap: 0.3rem;
    }
    
    .embla__dot {
        width: 8px;
        height: 8px;
    }
    
    .embla__dot::after {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }
}

/* ==========================================================================
   Flatsome Theme Integration
   ========================================================================== */

/* Category page specific styling */
.category-page-row .ns4l-category-banners {
    margin-bottom: 30px;
}

.category-page-row .ns4l-category-banners .ns4l-banner-image-container {
    border-radius: 10px;
}

/* Archive page integration */
.archive.woocommerce-page .ns4l-category-banners {
    margin-bottom: 2rem;
}

/* Shop page integration */
.woocommerce-shop .ns4l-category-banners {
    margin-bottom: 2rem;
}

/* Header integration */
.shop-container .ns4l-category-banners {
    margin: 0 0 2rem 0;
}

/* Mobile adjustments for Flatsome */
@media (max-width: 549px) {
    .category-page-row .ns4l-category-banners {
        margin-bottom: 20px;
    }
    
    .archive.woocommerce-page .ns4l-category-banners,
    .woocommerce-shop .ns4l-category-banners {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.ns4l-category-banners.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ns4l-category-banners.loading .ns4l-banner-image {
    filter: blur(2px);
}

/* DISABLE ARROWS AND DOTS */
.embla__dots {
    display: none !important;
}

.embla__controls {
	position: absolute;
    z-index: 99;
    top: 0;
    bottom: 0;
    width: 100%;
    justify-content: space-between;
    padding: 0 10px;
}