/* =========================================================
   XCROSSDELE — PREMIUM HOMEPAGE OVERRIDES
   Version: 1.1
   Works with the existing index.php, style.css
   and premium-home.js

   IMPORTANT:
   - Presentation only
   - Does not change PHP functionality
   - Does not change database operations
   - Does not change marketplace roles or payments
========================================================= */


/* =========================================================
   1. DESIGN VARIABLES
========================================================= */

:root {
    --xd-primary: #0866c6;
    --xd-primary-dark: #064b99;
    --xd-navy: #0b1730;
    --xd-gold: #f5a623;

    --xd-surface: #ffffff;
    --xd-background: #f4f7fc;
    --xd-border: #e5eaf2;
    --xd-muted: #64748b;

    --xd-radius: 24px;

    --xd-shadow: 0 16px 45px rgba(15, 23, 42, .075);
    --xd-shadow-hover: 0 24px 55px rgba(15, 23, 42, .14);

    --xd-transition: .25s ease;
}


/* =========================================================
   2. GLOBAL STYLES
========================================================= */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    overflow-x: hidden;

    background:
        radial-gradient(
            ellipse at 5% 8%,
            rgba(8,102,198,.065),
            transparent 32%
        ),
        radial-gradient(
            ellipse at 95% 30%,
            rgba(245,166,35,.055),
            transparent 28%
        ),
        #f6f8fc;
}

::selection {
    background: rgba(8,102,198,.18);
    color: var(--xd-navy);
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   3. TOP ANNOUNCEMENT STRIP
========================================================= */

.top-strip {
    position: relative;
    overflow: hidden;

    background: linear-gradient(
        100deg,
        #07152e,
        #123d79,
        #07152e
    );

    letter-spacing: .035em;
}

.top-strip::after {
    content: "";

    position: absolute;
    top: 0;
    left: -35%;

    width: 25%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.15),
        transparent
    );

    transform: skewX(-20deg);

    animation: xd-strip-shine 7s ease-in-out infinite;

    pointer-events: none;
}


/* =========================================================
   4. MAIN HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255,255,255,.96);

    border-bottom: 1px solid rgba(226,232,240,.9);

    box-shadow: 0 8px 30px rgba(15,23,42,.055);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-main {
    width: 92%;
    max-width: 1320px;

    margin: auto;
    padding: 12px 0;

    display: grid !important;

    grid-template-columns:
        minmax(145px, 175px)
        minmax(0, 1fr)
        minmax(0, auto) !important;

    align-items: center;

    gap: 18px !important;

    overflow: visible;
}

.logo {
    min-width: 0 !important;

    display: flex;
    align-items: center;

    justify-content: flex-start !important;
}

.logo img {
    height: 58px !important;
    max-width: 175px !important;

    object-fit: contain;

    transition: transform .3s ease;
}

.logo img:hover {
    transform: scale(1.045);
}


/* =========================================================
   5. HEADER SEARCH
========================================================= */

.header-search {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(110px, 160px)
        92px !important;

    gap: 7px !important;

    padding: 6px !important;

    border: 1px solid #e3eaf4;
    border-radius: 15px;

    background: #f7f9fc;

    box-shadow: 0 4px 14px rgba(15,23,42,.035);
}

.header-search input,
.header-search select {
    display: block !important;

    width: 100% !important;
    min-width: 0;

    padding: 11px 12px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: #fff;
    color: #1e293b;

    font-size: 13px;

    outline: none;
}

.header-search input:focus,
.header-search select:focus {
    border-color: var(--xd-primary);

    box-shadow: 0 0 0 3px rgba(8,102,198,.09);
}

.header-search button {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;

    padding: 11px 9px !important;

    border-radius: 10px;

    background: linear-gradient(
        135deg,
        var(--xd-primary),
        var(--xd-primary-dark)
    );

    color: #fff;

    font-size: 13px;
    font-weight: 800;

    transition: var(--xd-transition);
}

.header-search button:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 18px rgba(8,102,198,.25);
}


/* =========================================================
   6. HEADER NAVIGATION
========================================================= */

.nav-right {
    display: flex !important;

    justify-content: flex-end !important;
    align-items: center;

    gap: 4px !important;

    flex-wrap: nowrap !important;
    white-space: nowrap !important;

    min-width: 0;
}

.nav-link {
    padding: 9px 10px;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;

    transition: var(--xd-transition);
}

.nav-link:hover {
    color: var(--xd-primary);
    background: #edf5ff;

    transform: translateY(-1px);
}

.nav-right .btn {
    padding: 10px 14px;
    font-size: 12px;
}

.header-bottom-wrap {
    scrollbar-width: none;
    overflow-x: auto;
}

.header-bottom-wrap::-webkit-scrollbar {
    display: none;
}

.header-chip {
    padding: 8px 14px;
    font-size: 12px;

    transition: var(--xd-transition);
}


/* =========================================================
   7. BUTTONS
========================================================= */

.btn {
    position: relative;

    overflow: hidden;
    isolation: isolate;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.btn::after {
    content: "";

    position: absolute;
    z-index: -1;
    inset: 0;

    background: linear-gradient(
        110deg,
        transparent 25%,
        rgba(255,255,255,.22) 50%,
        transparent 75%
    );

    transform: translateX(-120%);

    transition: transform .6s ease;
}

.btn:hover::after {
    transform: translateX(120%);
}

.btn:active {
    transform: scale(.97);
}


/* =========================================================
   8. PREMIUM HERO
========================================================= */

.premium-hero {
    position: relative;
    overflow: hidden;

    padding: 52px 0 42px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(245,166,35,.15),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #eaf3ff,
            #ffffff 55%,
            #f3f7fd
        );
}

.hero-premium-wrap {
    gap: 26px;
}

.hero-copy {
    position: relative;
    overflow: hidden;

    border-radius: 30px;

    box-shadow: 0 25px 65px rgba(8,75,153,.22);
}

/*
   Hero entrance is controlled by premium-home.js.
   Do not add another CSS entrance animation here.
*/

.hero-copy::before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    right: -130px;
    top: -160px;

    border: 1px solid rgba(255,255,255,.13);

    border-radius: 50%;

    box-shadow:
        0 0 0 35px rgba(255,255,255,.035),
        0 0 0 75px rgba(255,255,255,.025);

    pointer-events: none;
}

.hero-copy h1 {
    text-wrap: balance;
}

.hero-dashboard {
    min-width: 0;
}

.dashboard-shell {
    align-content: center;
}

.dashboard-card {
    border-radius: 23px;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.dashboard-main-card {
    box-shadow: 0 20px 45px rgba(15,23,42,.17);
}

.dashboard-side-card:hover {
    transform: translateY(-4px);

    box-shadow: var(--xd-shadow-hover);
}

.dashboard-stat {
    transition:
        background .25s ease,
        transform .25s ease;
}

.dashboard-stat:hover {
    background: rgba(255,255,255,.19);

    transform: translateY(-3px);
}


/* =========================================================
   9. TRUST SECTION
========================================================= */

.trust-section {
    padding-top: 38px;
}

.trust-shell {
    border-radius: 30px;

    box-shadow: var(--xd-shadow);
}

.trust-point,
.trust-card {
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.trust-point:hover,
.trust-card:hover {
    transform: translateY(-5px);

    box-shadow: var(--xd-shadow-hover);

    border-color: #c9dcf5;
}


/* =========================================================
   10. GENERAL SECTIONS
========================================================= */

.section {
    padding-top: 54px;
}

.section-title {
    text-wrap: balance;
}

.section-subtitle {
    max-width: 720px;
}


/* =========================================================
   11. CATEGORY CARDS
========================================================= */

.category-card {
    position: relative;
    overflow: hidden;

    min-height: 160px;

    border-radius: 22px;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.category-card::after {
    content: "";

    position: absolute;

    width: 110px;
    height: 110px;

    right: -45px;
    bottom: -55px;

    border-radius: 50%;

    background: rgba(8,102,198,.045);

    transition: transform .4s ease;

    pointer-events: none;
}

.category-icon {
    transition: transform .3s ease;
}


/* =========================================================
   12. SEARCH PANEL
========================================================= */

.search-panel {
    border-radius: 25px;

    box-shadow: var(--xd-shadow);
}

.search-box-panel input,
.search-box-panel select {
    min-width: 0;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.search-box-panel input:focus,
.search-box-panel select:focus {
    border-color: var(--xd-primary);

    box-shadow: 0 0 0 4px rgba(8,102,198,.09);
}


/* =========================================================
   13. PRODUCT CARDS
========================================================= */

.grid {
    gap: 24px;
}

.product-card {
    min-width: 0;

    border-radius: 23px;

    box-shadow: 0 8px 24px rgba(15,23,42,.055);

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        box-shadow .35s ease,
        border-color .35s ease;
}

.card-image-wrap {
    height: 235px;

    overflow: hidden;

    background: linear-gradient(
        135deg,
        #eaf3ff,
        #f8fafc
    );
}

.card-image-wrap img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .65s cubic-bezier(.2,.8,.2,1);
}

.card-body {
    padding: 20px;
}

.card-body h4 {
    transition: color .2s ease;
}

.card-body > a:hover h4 {
    color: var(--xd-primary);
}

.price {
    letter-spacing: -.035em;
}

.card-actions {
    padding-top: 4px;
}

.card-actions .btn {
    min-height: 44px;
}

.badge,
.video-badge,
.category-badge,
.type-badge {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


/* =========================================================
   14. SHOWCASE
========================================================= */

.showcase-copy,
.showcase-panel {
    border-radius: 28px;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.showcase-point {
    transition:
        transform .25s ease,
        background .25s ease;
}


/* =========================================================
   15. FEATURES
========================================================= */

.feature-card {
    border-radius: 23px;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


/* =========================================================
   16. FINAL CALL TO ACTION
========================================================= */

.final-cta-card {
    position: relative;
    overflow: hidden;

    border-radius: 30px;
}

.final-cta-card::after {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    right: -120px;
    bottom: -190px;

    border: 1px solid rgba(255,255,255,.15);

    border-radius: 50%;

    box-shadow:
        0 0 0 35px rgba(255,255,255,.035),
        0 0 0 75px rgba(255,255,255,.025);

    pointer-events: none;
}


/* =========================================================
   17. FOOTER
========================================================= */

.footer {
    position: relative;
    overflow: hidden;
}

.footer a {
    transition:
        color .2s ease,
        transform .2s ease;
}


/* =========================================================
   18. FORM SUBMISSION FEEDBACK
========================================================= */

.header-search button.is-submitting,
.search-box-panel button.is-submitting {
    opacity: .75;
    cursor: progress;
}


/* =========================================================
   19. ACCESSIBILITY
========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(8,102,198,.45);
    outline-offset: 3px;
}

button,
input,
select {
    max-width: 100%;
}


/* =========================================================
   20. HOVER EFFECTS
   Only activate on devices with real hover support.
========================================================= */

@media (hover: hover) and (pointer: fine) {

    .category-card:hover {
        transform: translateY(-7px);

        border-color: #c5dcf7;

        box-shadow: var(--xd-shadow-hover);
    }

    .category-card:hover::after {
        transform: scale(1.8);
    }

    .category-card:hover .category-icon {
        transform: scale(1.12) rotate(-5deg);
    }

    .product-card:hover {
        transform: translateY(-8px);

        box-shadow: var(--xd-shadow-hover);

        border-color: #d2e2f5;
    }

    .product-card:hover .card-image-wrap img {
        transform: scale(1.065);
    }

    .showcase-copy:hover,
    .showcase-panel:hover {
        box-shadow: var(--xd-shadow-hover);
    }

    .showcase-point:hover {
        transform: translateX(5px);

        background: #eef6ff;
    }

    .feature-card:hover {
        transform: translateY(-6px);

        box-shadow: var(--xd-shadow-hover);
    }

    .footer a:hover {
        color: #fff;

        transform: translateX(4px);
    }

}


/* =========================================================
   21. TABLET HEADER
========================================================= */

@media (max-width: 1100px) {

    .header-main {
        grid-template-columns: minmax(0, 1fr) !important;

        gap: 11px !important;

        padding: 12px 0;
    }

    .logo {
        justify-content: center !important;
    }

    .header-search {
        width: 100% !important;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(130px, 180px)
            100px !important;
    }

    .nav-right {
        justify-content: center !important;

        flex-wrap: wrap !important;

        white-space: normal !important;
    }

    .hero-premium-wrap,
    .trust-top,
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .hero-dashboard {
        min-width: 0;
    }

    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   22. MOBILE DEVICES
========================================================= */

@media (max-width: 768px) {

    html {
        scroll-padding-top: 15px;
    }

    .top-strip {
        padding: 8px 10px;

        font-size: 11px;
    }

    /* Keep the header sticky on mobile. */

    .site-header {
        position: sticky !important;
        top: 0;
    }

    .header-main {
        width: 92%;

        gap: 10px !important;

        padding: 10px 0;
    }

    .logo img {
        height: 48px !important;
        max-width: 155px !important;
    }

    /* Mobile search fields remain visible. */

    .header-search {
        display: grid !important;

        grid-template-columns: minmax(0, 1fr) !important;

        width: 100% !important;

        padding: 8px !important;

        gap: 7px !important;
    }

    .header-search input,
    .header-search select {
        display: block !important;

        width: 100% !important;

        min-height: 43px;

        font-size: 13px;
    }

    .header-search button {
        display: block !important;

        width: 100% !important;

        min-height: 43px;
    }

    .nav-right {
        justify-content: center !important;

        gap: 5px !important;

        flex-wrap: wrap !important;
    }

    .nav-link {
        font-size: 12px;

        padding: 8px 9px;
    }

    .nav-right .btn {
        padding: 9px 12px;

        font-size: 12px;
    }

    .header-bottom-wrap {
        width: 92%;

        padding: 9px 0;

        overflow-x: auto;
    }

    .header-chip {
        flex-shrink: 0;

        font-size: 11px;

        padding: 8px 12px;
    }


    /* HERO */

    .premium-hero {
        padding: 22px 0 20px;
    }

    .hero-premium-wrap {
        gap: 18px;
    }

    .hero-copy {
        padding: 32px 22px;

        border-radius: 23px;
    }

    .hero-copy h1 {
        font-size: clamp(32px, 9vw, 43px);

        line-height: 1.08;
    }

    .hero-copy p {
        font-size: 14px;

        line-height: 1.75;
    }

    .hero-eyebrow {
        font-size: 11px;
    }

    .hero-actions {
        display: grid;

        grid-template-columns: minmax(0, 1fr);

        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-bullet-row {
        display: grid;

        grid-template-columns: 1fr;

        gap: 8px;
    }

    .hero-bullet-row span {
        font-size: 12px;
    }


    /* DASHBOARD */

    .dashboard-card {
        padding: 19px;

        border-radius: 20px;
    }

    .dashboard-balance {
        font-size: 34px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        gap: 7px;
    }

    .dashboard-stat {
        padding: 10px 7px;
    }

    .dashboard-stat strong {
        font-size: 15px;
    }

    .dashboard-stat span {
        font-size: 10px;
    }


    /* TRUST */

    .trust-section {
        padding-top: 25px;
    }

    .trust-shell,
    .showcase-copy,
    .showcase-panel,
    .search-panel,
    .final-cta-card {
        padding: 21px;

        border-radius: 22px;
    }

    .trust-title,
    .final-cta-card h2,
    .section-title {
        font-size: 27px;
    }

    .trust-points,
    .trust-grid,
    .category-grid,
    .features,
    .footer-wrap {
        grid-template-columns: minmax(0, 1fr);
    }


    /* GENERAL SECTIONS */

    .section {
        padding-top: 38px;
    }


    /* SEARCH PANEL */

    .search-box-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-box-panel input,
    .search-box-panel select,
    .search-box-panel .btn {
        width: 100%;

        min-height: 45px;
    }


    /* PRODUCT GRID */

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .card,
    .product-card {
        min-width: 0;

        border-radius: 17px;
    }

    .card-image-wrap {
        height: 155px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h4 {
        font-size: 14px;

        min-height: 42px;
    }

    .card-body p {
        font-size: 12px;

        min-height: 52px;
    }

    .product-meta-row {
        gap: 5px;
    }

    .product-meta-chip {
        padding: 5px 7px;

        font-size: 10px;
    }

    .price {
        font-size: 18px;
    }

    .card-actions {
        display: grid;

        grid-template-columns: minmax(0, 1fr);

        padding: 0 12px 12px;

        gap: 7px;
    }

    .card-actions .btn {
        min-height: 39px;

        padding: 9px 7px;

        font-size: 11px;
    }

    .badge,
    .video-badge,
    .category-badge,
    .type-badge {
        font-size: 9px;

        padding: 5px 7px;
    }


    /* FINAL CTA */

    .final-cta-card {
        align-items: stretch;
    }

    .final-cta-actions {
        display: grid;

        grid-template-columns: minmax(0, 1fr);

        width: 100%;
    }

    .final-cta-actions .btn {
        width: 100%;
    }


    /* FOOTER */

    .footer {
        padding-top: 35px;
    }

}


/* =========================================================
   23. SMALL PHONES
========================================================= */

@media (max-width: 390px) {

    .header-main {
        width: 94%;
    }

    .header-search {
        padding: 7px !important;
    }

    .nav-link {
        font-size: 11px;

        padding: 7px 8px;
    }

    .premium-hero {
        padding-top: 18px;
    }

    .hero-copy {
        padding: 26px 17px;
    }

    .hero-copy h1 {
        font-size: clamp(29px, 9vw, 36px);
    }

    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Preserve two product columns on most small phones. */

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .card-image-wrap {
        height: 135px;
    }

    .card-body {
        padding: 10px;
    }

    .card-body h4 {
        font-size: 13px;

        min-height: 40px;
    }

    .card-body p {
        font-size: 11px;

        min-height: 48px;
    }

    .price {
        font-size: 16px;
    }

    .card-actions {
        padding: 0 9px 10px;
    }

}


/* =========================================================
   24. VERY NARROW PHONES
========================================================= */

@media (max-width: 340px) {

    .grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card-image-wrap {
        height: 200px;
    }

    .card-body h4 {
        font-size: 16px;

        min-height: auto;
    }

    .card-body p {
        font-size: 13px;

        min-height: auto;
    }

}


/* =========================================================
   25. ANIMATION KEYFRAMES
========================================================= */

@keyframes xd-strip-shine {

    0%, 65% {
        left: -35%;
    }

    100% {
        left: 120%;
    }

}


/* =========================================================
   26. JAVASCRIPT SCROLL REVEAL
   Must match premium-home.js
========================================================= */

.js-motion .reveal-ready {
    opacity: 0;

    transform: translateY(22px);

    transition:
        opacity .7s ease,
        transform .7s cubic-bezier(.2,.8,.2,1);

    will-change: opacity, transform;
}

.js-motion .reveal-ready.is-visible {
    opacity: 1;

    transform: translateY(0);
}

.js-motion .reveal-ready[data-delay="1"] {
    transition-delay: .08s;
}

.js-motion .reveal-ready[data-delay="2"] {
    transition-delay: .16s;
}

.js-motion .reveal-ready[data-delay="3"] {
    transition-delay: .24s;
}

.js-motion .reveal-ready[data-delay="4"] {
    transition-delay: .32s;
}


/* =========================================================
   27. REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;

        scroll-behavior: auto !important;
    }

    .top-strip::after {
        animation: none !important;
    }

    .js-motion .reveal-ready {
        opacity: 1 !important;

        transform: none !important;

        transition: none !important;
    }

}


/* ==========================================
   HERO HEADING TEXT VISIBILITY FIX
========================================== */

.hero-copy h1,
.hero-copy h1 *,
.hero-copy h2,
.hero-copy h2 *,
.hero-copy h3,
.hero-copy h3 *,
.hero-copy p,
.hero-copy p *,
.hero-copy .hero-eyebrow,
.hero-copy .hero-eyebrow * {
    color: #ffffff !important;
}

/* Keep the hero text readable */
.hero-copy h1 {
    font-weight: 900;
    line-height: 1.08;
}

/* Preserve the light button's blue text */
.hero-copy .btn-light,
.hero-copy .btn-light * {
    color: #0866c6 !important;
}

/* =====================================================
   FORCE EXPLORE XCROSSDELE TEXT TO WHITE
===================================================== */

html body .hero.premium-hero .hero-dashboard
.dashboard-main-card .dashboard-balance,
html body .hero.premium-hero .hero-dashboard
.dashboard-main-card .dashboard-balance *,
html body .hero.premium-hero .hero-dashboard
.dashboard-main-card .dashboard-balance::before,
html body .hero.premium-hero .hero-dashboard
.dashboard-main-card .dashboard-balance::after {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* =====================================================
   XCROSSDELE — DEFINITIVE DASHBOARD TEXT FIX
===================================================== */

.dashboard-main-card .dashboard-balance {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
}


/* =========================================================
   END OF XCROSSDELE PREMIUM HOMEPAGE OVERRIDES
========================================================= */
