/* ============================================
   MARKETPLACE PAGE
   ============================================ */

.marketplace-page {
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

/* ============================================
   MARKETPLACE HERO
   ============================================ */

.marketplace-hero {
    position: relative;
    padding: 5rem 0 3.5rem;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.marketplace-hero::before {
    content: "";
    position: absolute;
    top: -10rem;
    left: 50%;
    width: 34rem;
    height: 34rem;
    border: 1px solid #1ab5c515;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: aboutHeroOrbit 20s linear infinite;
    pointer-events: none;
}

.marketplace-hero::after {
    content: "";
    position: absolute;
    top: 45%;
    left: 50%;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: radial-gradient(circle, #1ab5c510, transparent 70%);
    transform: translate(-50%, -50%);
    animation: aboutHeroGlow 5s ease-in-out infinite;
    pointer-events: none;
}

.marketplace-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 52rem;
    margin: 0 auto 1.2rem;
    color: var(--secondary-color);
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -0.05rem;
}

.marketplace-hero h1::after {
    content: "";
    display: block;
    width: 4rem;
    height: 3px;
    margin: 1.5rem auto 0;
    border-radius: 2rem;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed);
}

.marketplace-hero p {
    position: relative;
    z-index: 1;
    max-width: 45rem;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ============================================
   MARKETPLACE SECTION
   ============================================ */

.marketplace-section {
    position: relative;
    padding: 1rem 0 5rem;
}

/* ---------- HEADING ---------- */

.marketplace-heading {
    position: relative;
    max-width: 48rem;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.marketplace-heading h2 {
    color: var(--secondary-color);
    font-size: 2.4rem;
    line-height: 1.2;
    letter-spacing: -0.04rem;
    margin: 0 0 0.8rem;
}

.marketplace-heading p {
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   MARKETPLACE GRID
   ============================================ */

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
    padding: 0.5rem 0 2rem;
}

/* ============================================
   MARKETPLACE CARD
   ============================================ */

.marketplace-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.2rem;
    border: 1px solid #ffffff;
    border-radius: 2rem;
    background: linear-gradient(145deg, #f3f6f9, #ffffff);
    box-shadow: 0 1rem 3rem #082a4a0b;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* Top gradient accent bar */
.marketplace-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed, #ec4899);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: 2;
}

/* Glow orb */
.marketplace-card::after {
    content: "";
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: #1ab5c514;
    filter: blur(25px);
    transition: transform 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.marketplace-card:hover {
    transform: translateY(-8px);
    border-color: #1ab5c544;
    box-shadow: 0 1.5rem 4rem #082a4a18;
}

.marketplace-card:hover::before {
    transform: scaleX(1);
    animation: profileCardGradient 3s linear infinite;
}

.marketplace-card:hover::after {
    transform: scale(1.5);
}

/* ============================================
   MARKETPLACE LOGO
   ============================================ */

.marketplace-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 9rem;
    margin-bottom: 1.6rem;
    padding: 1.2rem;
    box-sizing: border-box;
    border: 1px solid #eef2f4;
    border-radius: 1.5rem;
    background: #ffffff;
    box-shadow: inset 0 1px 0 #ffffff;
    overflow: hidden;
    transition:
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.marketplace-card:hover .marketplace-logo {
    border-color: #1ab5c533;
    box-shadow: 0 0.8rem 2rem #1ab5c51a;
}

.marketplace-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.marketplace-card:hover .marketplace-logo img {
    transform: scale(1.06);
}

/* ---------- "+" LOGO FOR "MORE" CARD ---------- */

.marketplace-more .marketplace-logo {
    color: var(--primary-color);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(145deg, #eaf9fa, #ffffff);
    border-style: dashed;
    border-color: #1ab5c533;
}

.marketplace-more:hover .marketplace-logo {
    border-color: #1ab5c555;
}

/* ============================================
   MARKETPLACE CONTENT
   ============================================ */

.marketplace-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    text-align: center;
}

.marketplace-content h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 0;
    transition: color 0.25s ease;
}

.marketplace-card:hover .marketplace-content h3 {
    color: var(--primary-color);
}

.marketplace-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

/* ============================================
   MARKETPLACE BUTTON
   ============================================ */

.marketplace-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding: 0.95rem 1.8rem;
    border: 1px solid #ffffff44;
    border-radius: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #0d8fa0);
    background-size: 200% 200%;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    box-shadow:
        0 0.7rem 1.8rem #1ab5c533,
        inset 0 1px 0 #ffffff44;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.marketplace-button::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -100%;
    width: 60%;
    height: 140%;
    background: linear-gradient(90deg, transparent, #ffffff66, transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.marketplace-button::after {
    content: "→";
    display: inline-block;
    transition: transform 0.25s ease;
}

.marketplace-button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #22c5d5, #0d8fa0);
    box-shadow:
        0 1rem 2.4rem #1ab5c555,
        inset 0 1px 0 #ffffff55;
}

.marketplace-button:hover::before {
    left: 150%;
}

.marketplace-button:hover::after {
    transform: translateX(4px);
}

.marketplace-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* ============================================
   MARKETPLACE STATUS (Coming Soon)
   ============================================ */

.marketplace-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: center;
    width: fit-content;
    margin-top: 0.8rem;
    padding: 0.7rem 1.4rem;
    border: 1px dashed #1ab5c555;
    border-radius: 2rem;
    background: #eaf9fa;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.marketplace-status::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0.7rem #1ab5c5aa;
    animation: pulseDot 2s ease-in-out infinite;
}

/* ============================================
   COMING SOON / MORE CARDS
   ============================================ */

.marketplace-coming,
.marketplace-more {
    background: linear-gradient(145deg, #f7fafb, #ffffff);
}

.marketplace-coming::after,
.marketplace-more::after {
    background: #7c3aed10;
}

.marketplace-coming .marketplace-logo {
    background: linear-gradient(145deg, #f3f6f9, #ffffff);
    opacity: 0.85;
}

.marketplace-coming:hover .marketplace-logo img {
    transform: none;
    opacity: 0.6;
}

/* Slight muted look for coming soon cards */
.marketplace-coming .marketplace-content h3,
.marketplace-more .marketplace-content h3 {
    color: #555;
}

.marketplace-coming:hover .marketplace-content h3,
.marketplace-more:hover .marketplace-content h3 {
    color: var(--primary-color);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1000px) {
    .marketplace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .marketplace-hero h1 {
        font-size: 3.2rem;
    }

    .marketplace-heading h2 {
        font-size: 2rem;
    }
}

@media (max-width: 700px) {
    .marketplace-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .marketplace-hero h1 {
        font-size: 2.4rem;
    }

    .marketplace-hero p {
        font-size: 1rem;
    }

    .marketplace-section {
        padding: 1rem 0 3.5rem;
    }

    .marketplace-heading {
        margin-bottom: 1.8rem;
    }

    .marketplace-heading h2 {
        font-size: 1.7rem;
    }

    .marketplace-heading p {
        font-size: 0.95rem;
    }

    .marketplace-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .marketplace-card {
        padding: 1.6rem;
        border-radius: 1.5rem;
    }

    .marketplace-logo {
        height: 7rem;
        margin-bottom: 1.2rem;
        border-radius: 1.2rem;
    }

    .marketplace-more .marketplace-logo {
        font-size: 2.4rem;
    }

    .marketplace-content h3 {
        font-size: 1.3rem;
    }

    .marketplace-content p {
        font-size: 0.9rem;
    }

    .marketplace-button {
        width: 100%;
        box-sizing: border-box;
        padding: 0.9rem 1.5rem;
    }

    .marketplace-status {
        width: 100%;
        box-sizing: border-box;
        font-size: 0.78rem;
    }
}