/* =====================================================
   MARVSTORE WIDGET SYSTEM - COMPACT & PROFESSIONAL
   Optimized for article embedding
   ===================================================== */

:root {
    --primary: #8e2de2;
    --primary-gradient: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    --secondary: #14f195;
    --accent: #FFFF00;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
}

/* ===== WIDGET CONTAINER - COMPACT ===== */
.marv-shop-widget {
    font-family: 'Poppins', sans-serif;
    margin: 1.5rem 0;
    position: relative;
}

/* =====================================================
   STYLE 1: BANNER WIDGET - CREATIVE & STUNNING
   ===================================================== */
.shop-banner-widget {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 50%, #1a1a2e 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(142, 45, 226, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated gradient border */
.shop-banner-widget::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        var(--primary),
        var(--secondary),
        var(--primary),
        var(--secondary)
    );
    border-radius: 20px;
    opacity: 0.6;
    filter: blur(10px);
    animation: borderGlow 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Background Images Container */
.banner-background-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
    filter: blur(0px);
}

.banner-bg-image.active {
    opacity: 1;
    animation: zoomSubtle 20s ease-in-out infinite;
}

@keyframes zoomSubtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.banner-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(26, 26, 46, 0.75) 0%,
        rgba(26, 26, 46, 0.90) 50%,
        rgba(26, 26, 46, 0.95) 100%
    );
}

/* Floating particles effect */
.shop-banner-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(142, 45, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 241, 149, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(142, 45, 226, 0.1) 0%, transparent 50%);
    animation: particleFloat 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.8; }
}

.shop-banner-widget .banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shop-banner-widget h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(142, 45, 226, 0.3);
}

.shop-banner-widget p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-weight: 400;
}

.shop-banner-widget .banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 10px 30px rgba(142, 45, 226, 0.4),
        0 0 0 0 rgba(142, 45, 226, 0.5);
    position: relative;
    overflow: hidden;
}

.shop-banner-widget .banner-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.shop-banner-widget .banner-cta:hover::before {
    width: 300px;
    height: 300px;
}

.shop-banner-widget .banner-cta:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(142, 45, 226, 0.6),
        0 0 0 8px rgba(142, 45, 226, 0.1);
}

.shop-banner-widget .banner-cta:active {
    transform: translateY(-3px) scale(1.02);
}

/* =====================================================
   STYLE 2: CAROUSEL WIDGET - COMPACT
   ===================================================== */
.shop-carousel-widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.carousel-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.carousel-controls {
    display: flex;
    gap: 0.35rem;
}

.carousel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(142, 45, 226, 0.4);
}

.carousel-pause {
    background: rgba(142, 45, 226, 0.3);
    font-size: 0.85rem;
}

.carousel-pause:hover {
    background: var(--primary-gradient);
}

.carousel-track {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(142, 45, 226, 0.3);
    border-color: var(--primary);
}

.carousel-item-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.carousel-item-content {
    padding: 0.9rem;
}

.carousel-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    min-height: 2.1rem;
}

.carousel-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.7rem;
}

.carousel-item-btn {
    display: block;
    width: 100%;
    padding: 0.55rem;
    background: var(--primary-gradient);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.carousel-item-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(142, 45, 226, 0.4);
}

/* =====================================================
   STYLE 3: SIDEBAR WIDGET - COMPACT
   ===================================================== */
.shop-sidebar-widget {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 20px;
    max-width: 320px;
}

.sidebar-widget-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.sidebar-widget-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.sidebar-widget-header h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
}

.sidebar-widget-header p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-products {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-product {
    display: flex;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.85rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.sidebar-product:hover {
    background: rgba(142, 45, 226, 0.2);
    transform: translateX(4px);
}

.sidebar-product-image {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-product-info {
    flex: 1;
    min-width: 0;
}

.sidebar-product-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    line-height: 1.25;
}

.sidebar-product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
}

.sidebar-view-all {
    display: block;
    margin-top: 1.25rem;
    padding: 0.75rem;
    background: var(--primary-gradient);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-view-all:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(142, 45, 226, 0.4);
}

/* =====================================================
   STYLE 4: INLINE ARTICLE WIDGET - COMPACT
   ===================================================== */
.shop-inline-widget {
    background: linear-gradient(135deg, rgba(142, 45, 226, 0.08) 0%, rgba(74, 0, 224, 0.08) 100%);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.inline-widget-image {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

.inline-widget-content {
    flex: 1;
    min-width: 0;
}

.inline-widget-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.inline-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
    line-height: 1.3;
}

.inline-widget-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.9rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.inline-widget-footer {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.inline-widget-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary);
}

.inline-widget-btn {
    padding: 0.6rem 1.25rem;
    background: var(--primary-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.inline-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(142, 45, 226, 0.4);
}

/* =====================================================
   STYLE 5: FLOATING WIDGET - MOBILE OPTIMIZED (LEFT)
   ===================================================== */
.shop-floating-widget {
    position: fixed;
    bottom: 20px;
    left: 20px !important;
    right: auto !important;
    z-index: 1000;
}
.floating-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(142, 45, 226, 0.5);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.floating-toggle:hover {
    transform: scale(1.08) !important;
}
.floating-content {
    position: fixed !important;
    bottom: 85px !important;
    left: 20px !important;
    right: auto !important;
    width: 300px;
    max-width: calc(100vw - 40px);
    background: #1a1a2e;
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 1.25rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    transform: scale(0);
    transform-origin: bottom left !important;
    transition: all 0.3s ease;
    max-height: 65vh;
    overflow-y: auto;
}
.floating-content.active {
    transform: scale(1);
}
.floating-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.9rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* =====================================================
   STYLE 6: GRID WIDGET - COMPACT WITH PAGINATION
   ===================================================== */
.shop-grid-widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.75rem;
    backdrop-filter: blur(10px);
}

.grid-widget-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.grid-widget-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid-widget-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.grid-product {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.grid-product:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 35px rgba(142, 45, 226, 0.3);
}

.grid-product-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.grid-product-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.grid-product-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    background: var(--secondary);
    color: var(--dark);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    align-self: flex-start;
}

.grid-product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    line-height: 1.3;
    min-height: 2.5rem;
}

.grid-product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin: auto 0 0.9rem 0;
}

.grid-product-btn {
    display: block;
    width: 100%;
    padding: 0.7rem;
    background: var(--primary-gradient);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.grid-product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(142, 45, 226, 0.5);
}

/* Grid Pagination */
.grid-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.grid-pagination-dots {
    display: flex;
    gap: 0.45rem;
}

.grid-pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-pagination-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.grid-pagination-dot:hover {
    background: rgba(142, 45, 226, 0.6);
}

.grid-auto-indicator {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.grid-auto-indicator .pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.25); }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
    .shop-banner-widget {
        padding: 2.5rem 1.5rem;
        min-height: 280px;
        border-radius: 15px;
    }

    .shop-banner-widget h2 {
        font-size: 1.6rem;
    }

    .shop-banner-widget p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .shop-banner-widget .banner-cta {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    .shop-inline-widget {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .inline-widget-image {
        width: 100%;
        max-width: 200px;
        height: 150px;
        margin: 0 auto;
    }

    .inline-widget-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .shop-floating-widget {
        bottom: 15px;
        right: 15px;
    }

    .floating-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }

    .floating-content {
        width: 300px;
        max-width: calc(100vw - 30px);
        right: 15px;
        left: auto;
        bottom: 75px;
        max-height: 60vh;
    }

    .grid-products {
        grid-template-columns: 1fr;
    }

    .shop-carousel-widget {
        padding: 1rem;
    }

    .carousel-item {
        min-width: 180px;
    }

    .shop-sidebar-widget {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .shop-banner-widget {
        min-height: 240px;
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }

    .shop-banner-widget h2 {
        font-size: 1.4rem;
    }

    .shop-banner-widget p {
        font-size: 0.95rem;
    }

    .shop-banner-widget .banner-cta {
        padding: 0.8rem 1.75rem;
        font-size: 0.95rem;
    }

    .inline-widget-title {
        font-size: 1rem;
    }

    .carousel-item {
        min-width: 160px;
    }

    .carousel-item-image {
        height: 100px;
    }

    .floating-content {
        width: 280px;
        max-width: calc(100vw - 30px);
    }
}
