/* Home marketing hub only: loaded from layouts/home-header.blade.php when $isHomeMarketing (/, /home).
   Not loaded on /products or other pages — avoids global .card-img-top / home grid leakage. */

/* Deferred home/theme CSS: vendor sheets (Archivo, owl, animate, magnific, audioplayer) are loaded
   via explicit <link> tags in layouts/home-header.blade.php — no @import waterfall.
   Font Awesome 5 is already loaded from css/fontawesome-free-5.15.4/css/all.min.css; legacy
   font-awesome.min.css was redundant and is not re-linked. */

/* ========== HOME_PAGE_INLINE_DEFERRED (moved from home @section styles; non-critical path) ========== */

    /* ── Gumroad Discover strip ─────────────────────────────────────── */
    .vl-discover-strip {
        padding: 28px 0 32px;
        background: #0d0d0d;
        border-top: 1px solid #1e1e1e;
        border-bottom: 1px solid #1e1e1e;
        overflow: hidden;
    }

    .vl-strip-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 32px 18px;
        max-width: 1400px;
        margin: 0 auto;
    }

    .vl-strip-label {
        display: flex;
        align-items: baseline;
        gap: 12px;
    }

    .vl-strip-eyebrow {
        font-size: 11px;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #00e5ff;
        font-weight: 600;
    }

    .vl-strip-title {
        font-size: 15px;
        color: #aaa;
        font-weight: 400;
    }

    .vl-strip-cta {
        font-size: 12px;
        color: #00e5ff;
        text-decoration: none;
        border: 1px solid rgba(0,229,255,0.2);
        padding: 5px 14px;
        border-radius: 20px;
        transition: background 0.2s, color 0.2s;
        white-space: nowrap;
        transform: none !important;
        display: inline-block;
        box-sizing: border-box;
    }

    .vl-strip-cta:hover {
        background: rgba(0,229,255,0.08);
        color: #fff;
        text-decoration: none;
        transform: none !important;
    }

    /* Marquee viewport — clips overflow and adds fade edges */
    .vl-marquee-viewport {
        position: relative;
        overflow: hidden;
    }

    .vl-marquee-viewport::before,
    .vl-marquee-viewport::after {
        content: '';
        position: absolute;
        top: 0; bottom: 0;
        width: 80px;
        z-index: 2;
        pointer-events: none;
    }

    .vl-marquee-viewport::before {
        left: 0;
        background: linear-gradient(to right, #0d0d0d, transparent);
    }

    .vl-marquee-viewport::after {
        right: 0;
        background: linear-gradient(to left, #0d0d0d, transparent);
    }

    /* Prev/next — above fade masks (z-index 2); no backdrop-filter on mobile (Resources-style). */
    .marquee-nav-btn {
        position: absolute;
        top: 50%;
        z-index: 4;
        width: 48px;
        height: 48px;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(0, 229, 255, 0.35);
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.55);
        color: #00e5ff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .marquee-nav-btn:hover {
        background: rgba(0, 229, 255, 0.12);
        border-color: rgba(0, 229, 255, 0.55);
        color: #7af6ff;
    }

    .marquee-nav-btn:focus-visible {
        outline: 2px solid #00e5ff;
        outline-offset: 2px;
    }

    .marquee-nav-btn .fa {
        font-size: 18px;
        line-height: 1;
    }

    .vl-marquee-viewport .marquee-nav-btn--prev {
        left: 6px;
        transform: translateY(-50%);
    }

    .vl-marquee-viewport .marquee-nav-btn--next {
        right: 6px;
        transform: translateY(-50%);
    }

    .dev-marquee-outer .marquee-nav-btn--prev {
        left: 4px;
        transform: translateY(-50%);
    }

    .dev-marquee-outer .marquee-nav-btn--next {
        right: 4px;
        transform: translateY(-50%);
    }

    /* The scrolling track — JS-driven via rAF, CSS animation removed */
    .vl-marquee-track {
        display: flex;
        gap: 14px;
        padding: 4px 20px;
        width: max-content;
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* Individual marquee card — no box-shadow/filter changes to avoid repaints */
    .vl-card {
        display: flex;
        flex-direction: column;
        width: 140px;
        flex-shrink: 0;
        text-decoration: none;
        color: inherit;
        will-change: transform;
        transition: transform 0.18s;
    }

    .vl-card:hover {
        transform: translateY(-3px);
        text-decoration: none;
        color: inherit;
    }

    .vl-card-img {
        position: relative;
        width: 140px;
        height: 140px;
        aspect-ratio: 1 / 1;
        border-radius: 8px;
        overflow: hidden;
        background: #1a1a1a;
    }

    .vl-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .vl-card-img-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .vl-card-img-placeholder .material-icons {
        font-size: 40px;
        color: #333;
    }

    .vl-card-img-placeholder--forum {
        padding: 24px;
        background: #111;
    }

    .vl-forum-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: 0.7;
    }

    .vl-badge-free {
        position: absolute;
        bottom: 6px;
        left: 6px;
        background: #00c853;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 4px;
        letter-spacing: 0.5px;
    }

    .vl-badge-price {
        position: absolute;
        bottom: 6px;
        left: 6px;
        background: rgba(0,0,0,0.75);
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        padding: 2px 7px;
        border-radius: 4px;
        backdrop-filter: blur(4px);
    }

    .vl-badge-git {
        position: absolute;
        top: 6px;
        right: 6px;
        background: rgba(0,0,0,0.75);
        color: #fff;
        font-size: 12px;
        padding: 3px 5px;
        border-radius: 4px;
        backdrop-filter: blur(4px);
    }

    .vl-badge-open-source {
        position: absolute;
        bottom: 6px;
        left: 6px;
        background: #2d3748;
        color: #e2e8f0;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 4px;
        letter-spacing: 0.5px;
    }

    .vl-badge-forum {
        position: absolute;
        top: 6px;
        left: 6px;
        background: rgba(255,152,0,0.9);
        color: #000;
        font-size: 10px;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 4px;
        backdrop-filter: blur(4px);
    }

    .vl-discover-strip--forum .vl-strip-eyebrow { color: #ff9800; }

    .vl-card-name {
        margin: 7px 0 0;
        font-size: 11px;
        color: #bbb;
        line-height: 1.35;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    /* Mobile static posters for WebM tiles (carousel + grids); desktop WebM unchanged. */
    .card-img-top--home-prog {
        position: relative;
        overflow: hidden;
    }
    .card-img-top--home-prog .home-mobile-poster-slot {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        box-sizing: border-box;
    }
    .card-img-top--home-prog .home-mobile-poster-slot > a.d-block {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin: 0;
    }
    .card-img-top--home-prog .home-mobile-poster-slot .home-prog-poster {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100% !important;
        min-height: 100%;
        object-fit: cover;
        display: block;
    }
    .card-img-top--home-prog > .d-none.d-md-block video.card-media {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .item .home-mobile-poster-slot--carousel {
        position: relative;
        width: 200px;
        max-width: 100%;
        height: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    .item .home-mobile-poster-slot--carousel .carousel-image.home-prog-poster {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .item .home-mobile-poster-slot--carousel > .item-link {
        position: absolute;
        inset: 0;
        display: block;
    }

    /* Lazy WebM upgrade: video link + video fill the same box as the poster <a><img>. */
    .home-mobile-poster-slot .home-lazy-webm-video-link {
        position: absolute;
        inset: 0;
        display: block;
        box-sizing: border-box;
    }
    .home-mobile-poster-slot .home-lazy-webm-video-link video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        background: #f0f0f0;
    }
    .card-img-top--home-prog .home-mobile-poster-slot .home-lazy-webm-video-link video.card-media {
        width: 100% !important;
        height: 100% !important;
        min-height: 100%;
    }
    /* Card Img Top Styles */
    .card-img-top {
        position: relative;
        padding-top: 100%;
        background: #f0f0f0;
        height: 200px; /* Fixed height for image container */
        flex: 0 0 auto; /* Prevent image from flexing */
    }

    .card-media {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Card Title Styles */
    .card-title {
        min-height: 1.5em;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-right: 10px;
        color: black;
           /* Card Title Styles */

    }

    /* Custom Button Styles */
    .btne {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(45deg, #333333 0%, #000000 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        border: none;
        position: relative;
        overflow: hidden;
    }

    .btne:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        background: linear-gradient(45deg, #000000 0%, #333333 100%);
    }

    .btne .custom-eye-icon {
        color: #ffffff;
        font-size: 16px;
        position: relative;
        transition: all 0.3s ease;
        left: auto;
        transform: none;
    }

    .btne:hover .custom-eye-icon {
        color: #f1c4e0;
        transform: scale(1.1);
    }

    /* Remove any conflicting styles */
    .custom-eye-icon {
        position: relative;
        left: auto;
        transform: none;
    }

    /* Update card body to accommodate the new button */
    .card-body {
        background: linear-gradient(to top, rgba(211, 211, 211, 0.9), rgba(255, 255, 255, 0.5));
        padding: 15px;
        display: block; /* Change from flex to block for more predictable layout */
        position: relative; /* For better positioning control */
        height: 180px; /* Fixed height for card body */
    }

    .card-title {
        font-size: 1.1em;
        font-weight: 600;
        margin-bottom: 10px; /* Fixed margin to ensure consistent spacing */
        color: #333;
        height: 20px; /* Fixed height for title */
        overflow: hidden; /* Prevent title from overflowing */
        white-space: nowrap; /* Keep title on one line */
        text-overflow: ellipsis; /* Add ellipsis for long titles */
    }

    /* Animation Performance Optimization */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* ── Static VSTOPIA / Max for Live band (replaces marquee; no motion) ── */
    .bm-static-separator {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 5px 14px;
        margin: 0 0 14px;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.38) 50%, rgba(0, 0, 0, 0.2) 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        box-sizing: border-box;
    }

    .bm-static-separator__inner {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 18px;
        row-gap: 4px;
    }

    .bm-static-separator .bm-logo {
        height: 26px;
        width: auto;
        max-width: 78px;
        object-fit: contain;
        display: block;
        flex-shrink: 0;
    }

    .bm-static-separator .bm-name {
        font-size: 1.12rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.2em !important;
        text-transform: uppercase !important;
        color: #ffffff !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
        line-height: 1 !important;
        white-space: nowrap !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
        top: 1px;
    }

    .bm-static-separator .bm-sub {
        font-size: 0.98rem;
        font-weight: 600;
        letter-spacing: 0.28em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.6);
        line-height: 1;
        white-space: nowrap;
        margin: 0;
    }

    @media (max-width: 767.98px) {
        .bm-static-separator {
            padding: 4px 10px;
            margin-bottom: 10px;
        }
        .bm-static-separator .bm-logo {
            height: 22px;
            max-width: 64px;
        }
        .bm-static-separator .bm-name {
            font-size: 0.95rem !important;
        }
        .bm-static-separator .bm-sub {
            font-size: 0.85rem;
            letter-spacing: 0.22em;
        }
    }

    /* Carousel Section Styles */
    .carousel-section {
        padding: 70px 0;
        background: linear-gradient(135deg, #d3d3d3 0%, #ffffff 100%);
        overflow: hidden;
        position: relative;
        contain: content;
        min-height: 650px;
    }

    /* 3D Container */
    .container-carousel {
        margin: 200px auto 150px;
        width: 200px;
        height: 250px;
        position: relative;
        perspective: 1000px;
        contain: layout size;
        transform: translateZ(0);
    }

    /* Carousel Base */
    .carousel {
        height: 100%;
        width: 100%;
        position: absolute;
        transform-style: preserve-3d;
        transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
        contain: layout style;
        opacity: 0;
    }

    .carousel.loaded {
        opacity: 1;
    }

    /* Carousel Items */
    .item {
        position: absolute;
        width: 200px;
        height: 200px;
        transform-origin: center;
        contain: layout size style;
        backface-visibility: visible;
    }

    .item-wrapper {
        width: 100%;
        height: 100%;
        position: relative;
        background-color: #f0f0f0;
        border-radius: 50%;
        overflow: hidden;
        transform: translateZ(0);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Image Loading Placeholder */
    .image-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
        z-index: 1;
    }

    .carousel.loaded .image-placeholder {
        display: none;
    }

    /* Carousel Images */
    .carousel-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 2;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .carousel.loaded .carousel-image {
        opacity: 1;
    }

    /* Overlay Styles */
    .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        background: linear-gradient(to top, rgba(26, 15, 29, 0.9), rgba(26, 15, 29, 0.5));
        padding: 10px 0;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        height: 100px;
        transform: translateZ(0);
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .item:hover .overlay {
        opacity: 1;
    }

    /* Loading Animation */
    @keyframes loading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    /* Accessibility & Performance */
    @media (prefers-reduced-motion: reduce) {
        .carousel,
        .carousel-image,
        .overlay {
            transition: none !important;
            animation: none !important;
        }
    }

    /* Eye Icon Styles */
    .eye-icon {
        color: #f1c4e0;
        font-size: 18px;
        margin-top: 5px;
        transition: color 0.3s, transform 0.3s;
    }

    .item:hover .eye-icon {
        color: #8c1b8e;
    }

    .item:hover .overlay {
        opacity: 1;
    }

    /* Card Styles */
    .card {
        background: linear-gradient(135deg, #d3d3d3 0%, #ffffff 100%);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        border: 2px solid #000000;
        overflow: hidden;
        transition: transform 0.3s ease;
        height: auto; /* Allow height to be determined by content */
        min-height: 413px; /* Minimum height for desktop */
        display: flex;
        flex-direction: column;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    /* Card Link Styles */
    .card-link {
        text-decoration: none;
        color: inherit;
    }

    /* Card Body Styles */
    .card-body {
        background: linear-gradient(to top, rgba(211, 211, 211, 0.9), rgba(255, 255, 255, 0.5));
        padding: 15px;
        padding-bottom: 20px; /* Extra padding at the bottom to prevent overflow */
        display: block; /* Change from flex to block for more predictable layout */
        position: relative; /* For better positioning control */
        height: 180px; /* Fixed height for card body */
    }

    .card-title {
        font-size: 1.1em;
        font-weight: 600;
        margin-bottom: 10px; /* Fixed margin to ensure consistent spacing */
        color: #333;
        height: 20px; /* Fixed height for title */
        overflow: hidden; /* Prevent title from overflowing */
        white-space: nowrap; /* Keep title on one line */
        text-overflow: ellipsis; /* Add ellipsis for long titles */
    }

    /* Description Ellipsis Styles */
    .description-ellipsis {
        display: -webkit-box;
        -webkit-line-clamp: 5; /* Reduce to 5 lines to fit in fixed card body height */
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.8em;
        line-height: 1.4;
        color: #000000;
        height: auto;
        max-height: 7em; /* 5 lines * 1.4 line-height */
        margin-top: 0; /* Remove top margin */
        margin-bottom: 0; /* Remove bottom margin */
        padding: 0 2px; /* Add padding to prevent text from touching the edges */
        word-wrap: break-word; /* Ensure long words break and wrap */
        width: 100%; /* Ensure the div takes full width of its container */
        visibility: visible; /* Ensure visibility */
    }

    /* Description Ellipsis Child Elements */
    .description-ellipsis * {
        margin: 0;
        padding: 0;
        font-size: inherit !important;
        line-height: inherit;
        color: #000000 !important;
        max-width: 100%; /* Ensure no child element exceeds container width */
        word-break: break-word; /* Break words to prevent overflow */
        font-weight: normal !important;
        visibility: visible !important; /* Ensure visibility */
    }

    /* New wrapper for making entire card clickable */
    .card-link-wrapper {
        display: block;
        text-decoration: none;
        color: inherit;
        cursor: pointer;
        position: relative;
        z-index: 1;
    }

    .card-link-wrapper:hover {
        text-decoration: none;
        color: inherit;
    }

    .card-link-wrapper:hover .card {
        transform: translateY(-7px);
        box-shadow: 0 10px 25px rgba(0, 255, 255, 0.3);
        border-color: rgba(0, 255, 255, 0.5);
    }

    .card-link-wrapper:hover .custom-eye-icon {
        color: #00FFFF;
    }

    /* Section Heading Styles */
    .section-heading p, .section-heading h2 {
        color: black;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    /* Section Background Styles */
    .oneMusic-buy-now-area{
        background: linear-gradient(135deg, #d3d3d3 0%, #ffffff 100%);
    }

    /* Responsive Media Queries */
    @media (max-width: 768px) {
        /* DIAGNOSTIC: same class of issue as Resources — backdrop-filter while scrolling inner wrapper */
        .vl-badge-price,
        .vl-badge-git,
        .vl-badge-forum {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }
        
        .description-ellipsis {
            -webkit-line-clamp: 3; /* Show fewer lines on mobile */
            max-height: 4.2em; /* 3 lines * 1.4 line-height */
            font-size: 0.75em; /* Slightly smaller font on mobile */
            display: -webkit-box !important; /* Force display on mobile */
            visibility: visible !important; /* Ensure visibility */
            opacity: 1 !important; /* Ensure opacity */
            margin-top: 5px !important; /* Add margin for spacing */
            color: #000000 !important; /* Ensure text color is visible */
        }
        
        .card-title {
            font-size: 1em !important; /* Slightly larger title on mobile */
            height: auto !important; /* Allow title to wrap if needed */
            white-space: normal !important; /* Allow text wrapping */
            margin-bottom: 8px !important; /* Add space between title and description */
            overflow: visible !important; /* Show overflow content */
        }
        
        .card-body {
            height: auto !important; /* Allow card body to expand based on content */
            min-height: 120px; /* Set minimum height */
            display: block !important; /* Force block display */
            overflow: visible !important; /* Show overflow content */
            padding: 12px !important; /* Adjust padding for better spacing */
        }
        
        .card {
            height: auto !important; /* Allow card to expand based on content */
            min-height: 350px; /* Set minimum height */
        }
    }

    /* Hover Container Styles */
    .hover-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: none;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 50px;
        box-sizing: border-box;
        background: linear-gradient(135deg, #d3d3d3 0%, #ffffff 100%);
        z-index: 1000;
        gap: 40px;
    }

    .hover-image-container {
        width: 45%;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .hover-media {
        max-width: 100%;
        max-height: 400px;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 10px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    }

    .product-name-container {
        width: 45%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        color: black;
        padding: 20px;
    }

    .product-name-container h2 {
        font-size: 2em;
        color: black;
        margin-bottom: 20px;
    }

    .description-wrapper {
        position: relative;
        max-height: 300px;
        overflow: hidden;
        margin-bottom: 20px;
    }

    .description.truncated {
        display: -webkit-box;
        -webkit-line-clamp: 8;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 20px;
        color: black !important;
    }

    .description.truncated * {
        color: black !important;
    }

    .description.truncated p,
    .description.truncated span,
    .description.truncated div {
        color: black !important;
    }

    .read-more {
        display: inline-block;
        color: #000;
        text-decoration: none;
        font-weight: bold;
        padding: 8px 16px;
        border: 2px solid #000;
        border-radius: 5px;
        transition: all 0.3s ease;
        margin-top: auto;
        align-self: flex-start;
    }

    .read-more:hover {
        background: #000;
        color: #fff;
        text-decoration: none;
    }

    /* Add to your existing styles section */
    .carousel-controls {
        position: absolute;
        bottom: -120px;
        left: 50%;
        transform: translateX(-50%);
        width: 800px;
        max-width: 800px;
        text-align: center;
    }

    .rotation-slider {
        width: 100%;
        -webkit-appearance: none;
        height: 4px;
        border-radius: 2px;
        background: #d3d3d3;
        outline: none;
        opacity: 0.7;
        transition: opacity .2s;
    }

    .rotation-slider:hover {
        opacity: 1;
    }

    .rotation-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #000000;
        cursor: pointer;
        transition: transform 0.2s;
        border: 2px solid white;
    }

    .rotation-slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #000000;
        cursor: pointer;
        transition: transform 0.2s;
        border: 2px solid white;
    }

    .rotation-slider::-webkit-slider-thumb:hover,
    .rotation-slider::-moz-range-thumb:hover {
        transform: scale(1.2);
    }

    /* Update Carousel Section Styles for Mobile */
    @media (max-width: 768px) {
        .carousel-section {
            min-height: 450px; /* Reduce minimum height for mobile */
        }

        .container-carousel {
            margin: 100px auto 100px; /* Reduce margins for mobile */
            transform: scale(0.8); /* Scale down the carousel for better mobile fit */
        }

        /* Ensure carousel items are visible on mobile */
        .carousel {
            transform-style: preserve-3d !important;
            -webkit-transform-style: preserve-3d !important;
        }

        .item {
            backface-visibility: visible !important;
            -webkit-backface-visibility: visible !important;
            transform-style: preserve-3d !important;
            -webkit-transform-style: preserve-3d !important;
        }

        /* Adjust carousel controls for mobile */
        .carousel-controls {
            width: 90%; /* Make slider more accessible on mobile */
            max-width: 300px;
            bottom: -80px;
        }

        /* New Styles for Hover Container on Mobile */
        .hover-container {
            flex-direction: column; /* Stack elements vertically */
            padding: 20px; /* Reduce padding for better fit */
            gap: 20px; /* Adjust gap between elements */
            align-items: center; /* Center align items */
            justify-content: center; /* Center justify content */
        }

        .hover-image-container {
            width: 100%; /* Full width for image container */
            display: flex;
            align-items: center;
            justify-content: center; /* Center the image */
        }

        .hover-media {
            max-width: 80%; /* Reduce image size for better visibility */
            max-height: 250px;
        }

        .product-name-container {
            width: 100%; /* Full width for text container */
            display: flex;
            flex-direction: column; /* Stack text elements vertically */
            align-items: center; /* Center align text */
            padding: 10px; /* Adjust padding */
        }

        .product-name-container h2 {
            font-size: 1.5em; /* Reduce font size */
            text-align: center;
            margin-bottom: 10px; /* Add spacing below the title */
        }

        .description-wrapper {
            max-height: 60px; /* Limit the height */
            overflow: hidden;  /* Hide overflow content */
            text-overflow: ellipsis; /* Add ellipsis */
            display: -webkit-box; /* For multiline ellipsis */
            -webkit-line-clamp: 4; /* Number of lines to show */
            -webkit-box-orient: vertical; /* Vertical orientation */
            text-align: center; /* Center the description text */
            font-size: 0.75em; /* Slightly smaller font on mobile */
            margin-bottom: 10px; /* Add spacing below the description */
        }

        
        .read-more {
            display: inline-block; /* Ensure the button takes only necessary width */
            margin: 10px auto 0; /* Center the button horizontally */
            text-align: center; /* Center the button text */
            padding: 8px 20px; /* Add padding for better tap target */
            background-color: #f1c4e0; /* Example background color */
            color: #ffffff; /* Example text color */
            border-radius: 5px; /* Rounded corners */
            text-decoration: none; /* Remove underline */
            transition: background-color 0.3s ease; /* Smooth hover transition */
            font-size: 0.95em;            /* Slightly smaller font size */
        }
        /* Ensure the image and button are always visible */
        .hover-media,
        .read-more {
            max-width: 100%;
        }
    }

    /* Fix for Safari mobile */
    @supports (-webkit-touch-callout: none) {
        .carousel,
        .item {
            -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
        }
    }

    .section-products {
        overflow: hidden;
    }

    /* Sine wave layer: fills the gray section, scrolls with the page */
    /* Sine wave off: no canvas paint + script returns early (removes global rAF wave tick). */
    .home-sine-wave-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
        display: none !important;
        visibility: hidden !important;
    }

    .oneMusic-buy-now-area.section-products .container {
        position: relative;
        z-index: 2;
    }

    @media (prefers-reduced-motion: reduce) {
        .home-sine-wave-canvas {
            display: none !important;
        }
    }

    /* ── Developer Logos Marquee ── */
    .dev-marquee-section {
        background: #0a0a0a;
        padding: 28px 0 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        overflow: hidden;
        width: 100%;
        color: rgba(255, 255, 255, 0.88);
    }

    .dev-marquee-label {
        text-align: center;
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.72rem;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin: 0 0 18px;
        font-weight: 500;
    }

    /* Outer wrapper — full viewport width, faded edges, clips overflow.
     * overflow-x: clip  →  cuts off horizontal scroll without creating a block
     *   formatting context, so overflow-y: visible can work independently.
     * padding-top/bottom →  gives hover translateY(-3px) room to breathe
     *   without being clipped. */
    .dev-marquee-outer {
        position: relative;
        width: 100%;
        overflow-x: clip;
        overflow-y: visible;
        padding: 6px 0;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
        mask-image:         linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    }

    /*
     * Single track containing 6 identical copies of the logos.
     * width: max-content lets it grow as wide as needed.
     * Animating translateX(-100%/6) = exactly 1 copy-width — always seamless
     * regardless of how many logos exist or how wide the viewport is.
     */
    .dev-marquee-track {
        display: flex;
        align-items: center;
        gap: 56px;
        padding: 0 28px;
        width: max-content;
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .dev-marquee-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        text-decoration: none;
        flex-shrink: 0;
        opacity: 0.5;
        filter: grayscale(1);
        transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
        box-sizing: border-box;
        min-height: 48px;
        min-width: 48px;
        padding: 10px 14px;
    }

    .dev-marquee-item:hover {
        opacity: 1;
        filter: grayscale(0);
        transform: translateY(-3px);
    }

    .dev-marquee-item img {
        height: 44px;
        width: auto;
        max-width: 96px;
        object-fit: contain;
        display: block;
    }

    .dev-marquee-item span {
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.67rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        white-space: nowrap;
        transition: color 0.3s ease;
    }

    .dev-marquee-item:hover span { color: #00ffff; }

    /* ── VSTOPIA platform item ── */
    .dev-marquee-vstopia-item {
        gap: 5px;
    }

    .dev-marquee-vstopia-item img {
        height: 40px;
        max-width: 120px;
    }

    /* "VSTOPIA" rendered in the same style as the navbar logo */
    .dev-marquee-vstopia-name {
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.92);
        line-height: 1;
        /* inherit whatever font the .logo class uses from the global stylesheet */
        font-family: inherit;
    }

    /* "Max for Live" sub-label */
    .dev-marquee-vstopia-sub {
        font-size: 0.52rem;
        font-weight: 500;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.72);
        line-height: 1;
        white-space: nowrap;
        transition: color 0.3s ease;
    }

    .dev-marquee-vstopia-item:hover .dev-marquee-vstopia-name { color: #ffffff; }
    .dev-marquee-vstopia-item:hover .dev-marquee-vstopia-sub  { color: #00ffff; }

    @media (max-width: 768px) {
        .dev-marquee-track { gap: 36px; }
        .dev-marquee-item img { height: 34px; }
    }
    
    .container {
        position: relative;
        z-index: 1; /* Ensures content appears above the background */
    }

    /*
     * Home mobile scroll: disable aggressive CSS containment inside the layout scroll container
     * (.site-scroll-wrapper). Same class of issue as Resources (chunked/black block repaints).
     * Documented fix pattern: resources.blade.php search "No backdrop-filter on scroll-heavy blocks".
     * Main-ad mobile: partial main-ad-section-styles.blade.php (backdrop-filter off + contain: none).
     * Gumroad vl-badge-* backdrops off on mobile (~1193). Marquee: optional rAF pause during inner-scroll
     * fling on mobile only; hover-pause binds to .track only so nav buttons do not stop motion.
     * Desktop keeps contain:* for perf; mobile only for carousel/main-ad relax.
     */
    @media (max-width: 768px) {
        .site-main-ad {
            contain: none;
        }
        .carousel-section,
        .container-carousel,
        .carousel,
        .item {
            contain: none;
        }
        /* Lazy-load + will-change: calmer promotion on mobile marquees. */
        .dev-marquee-track,
        .vl-marquee-track {
            will-change: auto;
        }
        .vl-card {
            will-change: auto;
            transition: none;
        }

        .vl-card:hover {
            transform: none;
        }

    }

