/**
 * Vivaia Influencer Showcase - Frontend Styles
 *
 * @package Vivaia_Influencer_Showcase
 */

/* Main container */
.vivaia-influencer-showcase {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* -------------------------------
   Header (Mobile Only)
   ------------------------------- */
.showcase-header {
    margin-bottom: 30px;
    text-align: center;
}

.showcase-header .showcase-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.showcase-header .instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0095f6;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.showcase-header .instagram-link:hover {
    opacity: 0.7;
}

.showcase-header .instagram-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Hide header on desktop */
@media (min-width: 768px) {
    .showcase-header.mobile-only {
        display: none;
    }
}

/* -------------------------------
   Desktop: Grid Layout (4 columns)
   ------------------------------- */
@media (min-width: 768px) {
    .influencer-grid.desktop-only {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    /* Hide mobile carousel on desktop */
    .influencer-carousel.mobile-only {
        display: none !important;
    }
}

/* -------------------------------
   Mobile: Carousel with 2x2 Grid Slides
   ------------------------------- */
@media (max-width: 767px) {
    /* Hide desktop grid on mobile */
    .influencer-grid.desktop-only {
        display: none;
    }

    /* Show mobile carousel */
    .influencer-carousel.mobile-only {
        display: block;
    }

    /* Each slide container */
    .carousel-slide {
        width: 100%;
    }

    /* 2x2 grid inside each slide */
    .slide-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }

    /* Remove left padding to prevent height calculation issues */
    .owl-carousel .owl-stage {
        padding-left: 0px !important;
    }

    /* Fix: Allow overflow for Elementor shortcode widget containers */
    .elementor-widget-shortcode .elementor-widget-container {
        overflow: visible !important;
    }

    .elementor-widget-shortcode {
        overflow: visible !important;
    }

    .vivaia-influencer-showcase {
        overflow: visible !important;
    }

    /* Owl Carousel dots styling */
    .influencer-carousel .owl-dots {
        text-align: center;
        margin-top: 20px;
        padding: 0;
    }

    .influencer-carousel .owl-dot {
        display: inline-block;
        width: 30px;
        height: 3px;
        margin: 0 4px;
        background: #ddd;
        border-radius: 2px;
        border: none;
        padding: 0;
        transition: background 0.3s ease;
        cursor: pointer;
    }

    .influencer-carousel .owl-dot.active {
        background: #333;
    }

    .influencer-carousel .owl-dot:hover {
        background: #999;
    }
}

/* -------------------------------
   Individual Item Styling
   ------------------------------- */
.influencer-item {
    position: relative;
    overflow: hidden;
}

.influencer-link {
    display: block;
    text-decoration: none;
    position: relative;
}

/* Image wrapper */
.influencer-image-wrapper {
    position: relative !important;
    width: 100%;
    aspect-ratio: 1 / 1; /* 1:1 aspect ratio (square) */
    overflow: hidden !important;
    background: transparent;
    display: block !important;
    height: auto;
}

.influencer-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.influencer-link:hover .influencer-image {
    transform: scale(1.05);
}

/* -------------------------------
   Influencer Name (Bottom Left)
   ------------------------------- */
.influencer-image-wrapper .influencer-name {
    position: absolute !important;
    bottom: 15px !important;
    left: 15px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    z-index: 3 !important;
    transition: opacity 0.3s ease;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* -------------------------------
   Hover Overlay with "Shop Now"
   ------------------------------- */
.influencer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.influencer-link:hover .influencer-overlay {
    opacity: 1;
}

/* Shop Now Button */
.shop-now-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-radius: .10667rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.influencer-link:hover .shop-now-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Hide name on hover (optional) */
.influencer-link:hover .influencer-name {
    opacity: 0.5;
}

/* Mobile Slider Styling - REMOVED (now using 2-column grid instead) */

/* -------------------------------
   Responsive Adjustments
   ------------------------------- */

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .influencer-grid.desktop-only {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 columns (default - already set above) */
@media (min-width: 992px) {
    .influencer-grid.desktop-only {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large desktop: maintain 4 columns */
@media (min-width: 1200px) {
    .influencer-grid.desktop-only {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* -------------------------------
   Loading State
   ------------------------------- */
.vivaia-influencer-showcase.loading .influencer-item {
    opacity: 0.5;
}

/* -------------------------------
   Accessibility
   ------------------------------- */
.influencer-link:focus {
    outline: 2px solid #0095f6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .influencer-image,
    .influencer-overlay,
    .shop-now-btn,
    .influencer-name {
        transition: none !important;
    }
}

/* -------------------------------
   Print Styles
   ------------------------------- */
@media print {
    .vivaia-influencer-showcase {
        display: none;
    }
}
