/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #06b6d4;
    --accent-color: #7c3aed;

    --page-background: #eef4ff;
    --card-background: #ffffff;
    --soft-blue: #dbeafe;

    --text-dark: #172033;
    --text-light: #64748b;
    --border-color: #e2e8f0;

    --container-width: 540px;
    --navigation-height: 78px;

    --small-shadow: 0 5px 15px rgba(37, 99, 235, 0.08);
    --card-shadow: 0 10px 28px rgba(30, 64, 175, 0.13);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: #dce7f8;
    color: var(--text-dark);
    font-family: Arial, Helvetica, sans-serif;
}

button,
a {
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}


/* ================= PRODUCT APP ================= */

.product-app {
    position: relative;
    width: 100%;
    max-width: var(--container-width);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #eff6ff 35%,
            #f8fafc 100%
        );
}


/* ================= PRODUCT HEADER ================= */

.product-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 95px;
    padding: 24px 18px 18px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.product-header h1 {
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 800;
}


/* ================= PRODUCT MAIN ================= */

.product-main {
    padding: 0 18px 125px;
}


/* ================= PRODUCT TABS ================= */

.product-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    margin-bottom: 12px;
    background: transparent;
}

.product-tab {
    position: relative;
    min-height: 70px;
    padding: 20px 5px;
    background: transparent;
    color: var(--text-light);
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.product-tab:active {
    transform: scale(0.95);
}

.product-tab.active {
    color: var(--primary-color);
}

.product-tab.active::after {
    position: absolute;
    right: 20%;
    bottom: 5px;
    left: 20%;
    height: 5px;
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
    content: "";
}


/* ================= PRODUCT PANELS ================= */

.product-panel {
    display: none;
}

.product-panel.active {
    display: block;
}

.product-list {
    display: flex;
    gap: 18px;
    flex-direction: column;
}


/* ================= PRODUCT CARDS ================= */

.product-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 22px 18px 18px;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

/* Short-term card background */
.short-term-card {
    background:
        linear-gradient(
            145deg,
            #e0f2fe 0%,
            #cffafe 48%,
            #ccfbf1 100%
        );
}

/* Long-term card background */
.long-term-card {
    background:
        linear-gradient(
            145deg,
            #eef2ff 0%,
            #dbeafe 55%,
            #e0f2fe 100%
        );
}

/* Special card background */
.special-product-card {
    background:
        linear-gradient(
            145deg,
            #f5f3ff 0%,
            #ede9fe 42%,
            #e0f2fe 100%
        );
}


/* ================= PRODUCT CARD HEADER ================= */

.product-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.product-heading {
    min-width: 0;
}

.product-heading h2 {
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.product-price {
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}


/* ================= PRODUCT BADGES ================= */

.product-badges {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
}

.hot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 3px 6px;
    border-radius: 5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    vertical-align: middle;
}

.return-badge,
.settlement-badge,
.commission-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: 800;
}

.return-badge {
    padding: 4px 7px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 13px;
}

.settlement-badge {
    padding: 4px 8px;
    background: #fce7f3;
    color: #ec4899;
    font-size: 13px;
}

.commission-badge {
    margin-top: 8px;
    padding: 4px 8px;
    border: 1px solid #7c3aed;
    background: rgba(255, 255, 255, 0.6);
    color: var(--accent-color);
    font-size: 12px;
}


/* ================= PRODUCT CARD BODY ================= */

.product-card-body {
    display: grid;
    grid-template-columns: minmax(105px, 34%) minmax(0, 66%);
    align-items: center;
    gap: 15px;
    margin-top: 34px;
}

.product-image-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 160px;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.28);
}

.product-image {
    width: 100%;
    height: 160px;
    object-fit: contain;
}

.special-product-image {
    border-radius: 14px;
    object-fit: cover;
}


/* ================= PRODUCT INFORMATION ================= */

.product-information {
    display: flex;
    min-width: 0;
    gap: 10px;
    list-style: none;
    flex-direction: column;
}

.product-information li {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.25;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.04);
}

.product-information li span {
    flex-shrink: 0;
    margin-right: 5px;
}

.product-information li strong {
    overflow: hidden;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ================= PRODUCT CARD FOOTER ================= */

.product-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(100, 116, 139, 0.16);
}


/* ================= PROGRESS BAR ================= */

.product-progress {
    display: flex;
    flex: 1;
    align-items: center;
    max-width: 235px;
    gap: 7px;
    flex-direction: column;
}

.progress-value {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border: none;
    border-radius: 20px;
    background: #e2e8f0;
    appearance: none;
    -webkit-appearance: none;
}

.progress-bar::-webkit-progress-bar {
    border-radius: 20px;
    background: #e2e8f0;
}

.progress-bar::-webkit-progress-value {
    border-radius: 20px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
}

.progress-bar::-moz-progress-bar {
    border-radius: 20px;
    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
}


/* ================= COUNTDOWN ================= */

.product-countdown {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
}

.product-countdown span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 43px;
    border-radius: 9px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

.product-countdown b {
    color: var(--text-dark);
    font-size: 19px;
}


/* ================= BUY BUTTON ================= */

.buy-button {
    display: flex;
    flex: 0 0 115px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 28px;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.buy-button:active {
    transform: scale(0.94);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}


/* ================= BOTTOM NAVIGATION ================= */

.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    max-width: var(--container-width);
    min-height: var(--navigation-height);
    padding: 9px 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.12);
    transform: translateX(-50%);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    flex-direction: column;
}

.nav-item > i {
    font-size: 21px;
}

.nav-item.active {
    color: var(--primary-color);
}

.vip-nav-item {
    justify-content: flex-end;
}

.vip-icon {
    position: absolute;
    top: -31px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--secondary-color)
        );
    color: #ffffff;
    font-size: 22px;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.vip-nav-item > span:last-child {
    margin-top: 31px;
}


/* ================= FOCUS STATES ================= */

.product-tab:focus-visible,
.buy-button:focus-visible,
.nav-item:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}


/* ================= RESPONSIVE ================= */

@media (min-width: 600px) {
    .product-app {
        box-shadow: 0 0 40px rgba(15, 23, 42, 0.15);
    }
}

@media (max-width: 440px) {
    .product-header {
        min-height: 82px;
    }

    .product-header h1 {
        font-size: 25px;
    }

    .product-main {
        padding-right: 13px;
        padding-left: 13px;
    }

    .product-tab {
        min-height: 65px;
        font-size: 15px;
    }

    .product-card {
        padding: 19px 14px 16px;
    }

    .product-heading h2 {
        font-size: 17px;
    }

    .product-price {
        font-size: 18px;
    }

    .hot-badge {
        font-size: 10px;
    }

    .product-card-body {
        grid-template-columns: minmax(90px, 35%) minmax(0, 65%);
        gap: 10px;
        margin-top: 28px;
    }

    .product-image-box,
    .product-image {
        height: 140px;
        min-height: 140px;
    }

    .product-information {
        gap: 8px;
    }

    .product-information li {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .product-card-footer {
        gap: 12px;
    }

    .buy-button {
        flex-basis: 96px;
        min-height: 45px;
        padding: 9px 14px;
        font-size: 15px;
    }

    .product-countdown {
        gap: 5px;
    }

    .product-countdown span {
        min-width: 36px;
        height: 39px;
        font-size: 14px;
    }

    .product-countdown b {
        font-size: 15px;
    }

    .progress-value {
        font-size: 14px;
    }
}

@media (max-width: 350px) {
    .product-main {
        padding-right: 9px;
        padding-left: 9px;
    }

    .product-tab {
        font-size: 13px;
    }

    .product-card {
        padding-right: 11px;
        padding-left: 11px;
    }

    .product-heading h2 {
        font-size: 15px;
    }

    .product-price {
        font-size: 16px;
    }

    .product-card-body {
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .product-information li {
        font-size: 11px;
    }
}

/* =========================================
   PRODUCT PURCHASE MODAL
========================================= */

body.product-modal-open {
    overflow: hidden;
}

.purchase-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.purchase-modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.purchase-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 20, 29, 0.68);
    backdrop-filter: blur(5px);
}

.purchase-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 420px);
    padding: 28px 22px 22px;
    border: 1px solid #d8edf3;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 43, 60, 0.28);
    transform: translateY(25px) scale(0.96);
    transition: transform 0.25s ease;
}

.purchase-modal.open .purchase-modal-dialog {
    transform: translateY(0) scale(1);
}

.purchase-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #edf8fb;
    color: #44616c;
    font-size: 17px;
    cursor: pointer;
}

.purchase-modal-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #16c8df, #087d9f);
    color: #ffffff;
    font-size: 27px;
    box-shadow: 0 10px 24px rgba(9, 154, 182, 0.27);
}

.purchase-modal-dialog h2 {
    margin: 0;
    color: #132f3a;
    text-align: center;
    font-size: 24px;
}

.purchase-modal-message {
    margin: 9px auto 20px;
    max-width: 310px;
    color: #718188;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
}

.purchase-product-name {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #effbfe;
}

.purchase-product-name span {
    color: #7b8b91;
    font-size: 12px;
}

.purchase-product-name strong {
    color: #087d9f;
    font-size: 17px;
}

.purchase-balance-details {
    overflow: hidden;
    border: 1px solid #e0edf1;
    border-radius: 15px;
}

.purchase-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 14px;
    border-bottom: 1px solid #e7f0f3;
}

.purchase-balance-row:last-child {
    border-bottom: 0;
}

.purchase-balance-row span {
    color: #6c7d84;
    font-size: 13px;
}

.purchase-balance-row strong {
    color: #1b3741;
    font-size: 15px;
}

.purchase-balance-row.shortfall-row strong {
    color: #ef4d4d;
}

.purchase-balance-row.remaining-row strong {
    color: #08a879;
}

.purchase-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 11px;
    margin-top: 20px;
}

.purchase-cancel-button,
.purchase-action-button {
    min-height: 50px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.purchase-cancel-button {
    border: 1px solid #d5e4e9;
    background: #ffffff;
    color: #60747c;
}

.purchase-action-button {
    border: 0;
    background: linear-gradient(135deg, #13c9df, #087d9f);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(8, 137, 165, 0.22);
}

.purchase-cancel-button:active,
.purchase-action-button:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .purchase-modal {
        align-items: end;
        padding: 12px;
    }

    .purchase-modal-dialog {
        width: 100%;
        padding: 26px 18px 18px;
        border-radius: 24px 24px 18px 18px;
    }
}


/* =========================================
   CATEGORY-FREE DUAL-CURRENCY PRODUCTS
========================================= */

.product-main {
    padding-top: 20px;
}

.product-panel,
.product-panel.active {
    display: block;
}

.product-currency-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #cfe0f5;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--small-shadow);
}

.product-currency-copy {
    display: grid;
    gap: 5px;
}

.product-currency-copy strong {
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 800;
}

.product-currency-copy span {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
}

.product-currency-switch {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 4px;
    border: 1px solid #d9e5f3;
    border-radius: 14px;
    background: #edf4fc;
}

.product-currency-option {
    min-width: 72px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.product-currency-option.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
}

.product-currency-option:active {
    transform: scale(0.96);
}

.product-currency-option:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

.product-card-blue {
    background:
        linear-gradient(
            145deg,
            #e0f2fe 0%,
            #ccfbf1 100%
        );
}

.product-card-indigo {
    background:
        linear-gradient(
            145deg,
            #eef2ff 0%,
            #dbeafe 100%
        );
}

.product-card-violet {
    background:
        linear-gradient(
            145deg,
            #f5f3ff 0%,
            #ede9fe 100%
        );
}

[data-product-price],
[data-product-total-income],
[data-product-daily-income] {
    transition: opacity 0.2s ease;
}

#purchaseCurrencyWallet {
    color: var(--primary-dark);
}

@media (max-width: 480px) {
    .product-main {
        padding-top: 16px;
    }

    .product-currency-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .product-currency-switch {
        width: 100%;
    }

    .product-currency-option {
        min-height: 42px;
    }
}


/* =========================================================
   MARATHON PRODUCT PAGE — RESPONSIVE POLISH

   FRONTEND ONLY
   Paste this COMPLETE block at the END of product.css.

   No product HTML, data attributes or product.js changes are required.
   Existing INR / USDT switching and Buy flow remain unchanged.
========================================================= */


/* ---------------- PAGE FRAME ---------------- */

body {
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(59, 130, 246, 0.16),
            transparent 34rem
        ),
        #dce7f8;
}

.product-app {
    width: min(100%, 1120px);
    max-width: 1120px;
    overflow: visible;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f3f7ff 34%,
            #f8fafc 100%
        );
}

.product-header {
    min-height: 74px;
    padding: 17px 20px 15px;
    border-bottom-color: rgba(37, 99, 235, 0.1);
    box-shadow: 0 5px 18px rgba(30, 64, 175, 0.05);
}

.product-header h1 {
    position: relative;
    font-size: clamp(23px, 2.5vw, 28px);
    letter-spacing: -0.025em;
}

.product-header h1::after {
    position: absolute;
    right: 28%;
    bottom: -9px;
    left: 28%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    content: "";
}

.product-main {
    width: 100%;
    max-width: 1070px;
    margin: 0 auto;
    padding: 18px 20px 122px;
}


/* ---------------- CURRENCY SELECTOR ---------------- */

.product-currency-card {
    position: relative;
    gap: 18px;
    margin-bottom: 18px;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(239, 246, 255, 0.96)
        );
    box-shadow:
        0 10px 28px rgba(30, 64, 175, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-currency-card::before {
    position: absolute;
    top: -36px;
    right: -24px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.08);
    content: "";
    pointer-events: none;
}

.product-currency-copy,
.product-currency-switch {
    position: relative;
    z-index: 1;
}

.product-currency-copy {
    gap: 4px;
}

.product-currency-copy strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.product-currency-copy span {
    line-height: 1.45;
}

.product-currency-switch {
    gap: 4px;
    padding: 4px;
    border-color: rgba(148, 163, 184, 0.25);
    border-radius: 13px;
    background: rgba(219, 234, 254, 0.66);
}

.product-currency-option {
    min-width: 76px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.product-currency-option.active {
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow:
        0 5px 13px rgba(37, 99, 235, 0.14),
        inset 0 0 0 1px rgba(96, 165, 250, 0.14);
}


/* ---------------- PRODUCT GRID ---------------- */

.product-list {
    gap: 16px;
}

.product-card {
    --product-accent-a: #2563eb;
    --product-accent-b: #06b6d4;
    --product-glow: rgba(37, 99, 235, 0.1);

    isolation: isolate;
    display: flex;
    min-width: 0;
    padding: 18px 17px 16px;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 21px;
    flex-direction: column;
    box-shadow:
        0 11px 27px rgba(30, 64, 175, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.product-card-blue {
    --product-accent-a: #0284c7;
    --product-accent-b: #14b8a6;
    --product-glow: rgba(6, 182, 212, 0.13);
}

.product-card-indigo {
    --product-accent-a: #4f46e5;
    --product-accent-b: #3b82f6;
    --product-glow: rgba(79, 70, 229, 0.12);
}

.product-card-violet {
    --product-accent-a: #7c3aed;
    --product-accent-b: #2563eb;
    --product-glow: rgba(124, 58, 237, 0.12);
}

.product-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: -1;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--product-accent-a),
        var(--product-accent-b)
    );
    content: "";
}

.product-card::after {
    position: absolute;
    top: -78px;
    right: -74px;
    z-index: -1;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--product-glow),
        transparent 69%
    );
    content: "";
    pointer-events: none;
}

.product-card-header {
    gap: 10px;
}

.product-heading h2 {
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.3;
    letter-spacing: -0.018em;
}

.product-price {
    padding-top: 1px;
    color: var(--product-accent-a);
    font-size: clamp(18px, 2vw, 21px);
    letter-spacing: -0.02em;
}

.product-badges {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.hot-badge,
.return-badge,
.settlement-badge,
.commission-badge {
    border-radius: 999px;
    line-height: 1;
}

.hot-badge {
    margin-left: 3px;
    padding: 4px 7px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.return-badge,
.settlement-badge {
    padding: 5px 8px;
    font-size: 12px;
}

.commission-badge {
    margin-top: 7px;
    padding: 5px 9px;
    background: rgba(255, 255, 255, 0.5);
}


/* ---------------- CARD CONTENT ---------------- */

.product-card-body {
    grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.product-image-box {
    position: relative;
    min-height: 142px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(255, 255, 255, 0.92),
            rgba(255, 255, 255, 0.32) 72%
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 7px 18px rgba(30, 64, 175, 0.06);
}

.product-image {
    height: 138px;
    filter: drop-shadow(0 9px 10px rgba(30, 64, 175, 0.14));
    transition: transform 0.25s ease;
}

.special-product-image {
    border-radius: 12px;
}

.product-information {
    gap: 7px;
}

.product-information li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 33px;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    box-shadow: 0 3px 9px rgba(30, 64, 175, 0.035);
}

.product-information li span {
    margin-right: 0;
}

.product-information li strong {
    color: #334155;
    text-align: right;
}


/* ---------------- CARD FOOTER ---------------- */

.product-card-footer {
    min-height: 62px;
    gap: 13px;
    margin-top: auto;
    padding-top: 15px;
}

.product-progress {
    max-width: none;
    gap: 6px;
}

.progress-value {
    align-self: flex-start;
    color: #475569;
    font-size: 13px;
}

.progress-bar {
    height: 9px;
    border-radius: 999px;
}

.product-countdown {
    gap: 5px;
}

.product-countdown span {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 6px 13px rgba(37, 99, 235, 0.18);
}

.product-countdown b {
    font-size: 15px;
}

.buy-button {
    flex: 0 0 104px;
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        var(--product-accent-a),
        var(--product-accent-b)
    );
    font-size: 15px;
    box-shadow:
        0 8px 17px color-mix(
            in srgb,
            var(--product-accent-a) 24%,
            transparent
        ),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}


/* ---------------- PURCHASE POPUP ---------------- */

.purchase-modal-dialog {
    width: min(100%, 410px);
    padding: 25px 21px 20px;
    border-color: rgba(96, 165, 250, 0.28);
    border-radius: 22px;
    box-shadow: 0 26px 75px rgba(15, 23, 42, 0.28);
}

.purchase-modal-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 13px;
    border-radius: 17px;
    font-size: 23px;
}

.purchase-modal-dialog h2 {
    font-size: 22px;
}

.purchase-modal-message {
    margin: 8px auto 16px;
}

.purchase-product-name {
    margin-bottom: 12px;
    padding: 12px 13px;
}

.purchase-balance-row {
    min-height: 45px;
    padding: 11px 13px;
}

.purchase-modal-actions {
    margin-top: 16px;
}

.purchase-cancel-button,
.purchase-action-button {
    min-height: 46px;
    border-radius: 12px;
}


/* ---------------- DESKTOP ---------------- */

@media (min-width: 900px) {
    .product-app {
        min-height: calc(100vh - 28px);
        margin-top: 14px;
        margin-bottom: 14px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 26px;
        box-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    }

    .product-header {
        top: 0;
        min-height: 76px;
        border-radius: 26px 26px 0 0;
    }

    .product-main {
        padding: 20px 24px 126px;
    }

    .product-currency-card {
        padding: 15px 18px;
    }

    .product-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 18px;
    }

    .product-card-body {
        grid-template-columns: minmax(118px, 34%) minmax(0, 1fr);
    }

    .bottom-navigation {
        width: min(calc(100% - 32px), 720px);
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-bottom: 0;
    }
}


/* ---------------- TABLET ---------------- */

@media (min-width: 600px) and (max-width: 899px) {
    .product-app {
        max-width: 760px;
    }

    .product-main {
        max-width: 720px;
    }

    .product-card-body {
        grid-template-columns: minmax(140px, 31%) minmax(0, 1fr);
    }
}


/* ---------------- MOBILE ---------------- */

@media (max-width: 599px) {
    .product-app {
        overflow: hidden;
    }

    .product-header {
        min-height: 70px;
        padding: 15px 16px 14px;
    }

    .product-header h1 {
        font-size: 23px;
    }

    .product-main {
        padding: 14px 13px 116px;
    }

    .product-currency-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        margin-bottom: 14px;
        padding: 12px;
        border-radius: 16px;
    }

    .product-currency-copy strong {
        font-size: 14px;
    }

    .product-currency-copy span {
        max-width: 190px;
        font-size: 11px;
    }

    .product-currency-option {
        min-width: 62px;
        min-height: 36px;
        padding: 7px 9px;
        font-size: 11px;
    }

    .product-list {
        gap: 13px;
    }

    .product-card {
        padding: 16px 13px 14px;
        border-radius: 18px;
    }

    .product-card::before {
        height: 4px;
    }

    .product-heading h2 {
        font-size: 16px;
    }

    .product-price {
        font-size: 17px;
    }

    .hot-badge {
        padding: 3px 6px;
        font-size: 9px;
    }

    .return-badge,
    .settlement-badge,
    .commission-badge {
        font-size: 10px;
    }

    .product-card-body {
        grid-template-columns: minmax(96px, 32%) minmax(0, 1fr);
        gap: 9px;
        margin-top: 16px;
    }

    .product-image-box {
        min-height: 124px;
        padding: 5px;
        border-radius: 13px;
    }

    .product-image {
        height: 120px;
    }

    .product-information {
        gap: 5px;
    }

    .product-information li {
        min-height: 28px;
        gap: 3px;
        padding: 5px 7px;
        border-radius: 9px;
        font-size: 10.5px;
    }

    .product-card-footer {
        min-height: 56px;
        gap: 9px;
        padding-top: 12px;
    }

    .product-countdown {
        gap: 3px;
    }

    .product-countdown span {
        min-width: 32px;
        height: 34px;
        border-radius: 8px;
        font-size: 12px;
    }

    .product-countdown b {
        font-size: 12px;
    }

    .buy-button {
        flex-basis: 88px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 13px;
    }

    .progress-value {
        font-size: 12px;
    }

    .progress-bar {
        height: 8px;
    }
}


/* Keep the selector usable on narrow phones without making cards tall. */
@media (max-width: 380px) {
    .product-main {
        padding-right: 9px;
        padding-left: 9px;
    }

    .product-currency-card {
        grid-template-columns: 1fr;
    }

    .product-currency-copy span {
        max-width: none;
    }

    .product-currency-switch {
        width: 100%;
    }

    .product-currency-option {
        min-width: 0;
    }

    .product-card-body {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .product-information li {
        font-size: 10px;
    }
}


/* ---------------- DESKTOP POINTER POLISH ---------------- */

@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        border-color: color-mix(
            in srgb,
            var(--product-accent-a) 34%,
            transparent
        );
        transform: translateY(-4px);
        box-shadow:
            0 17px 36px rgba(30, 64, 175, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.78);
    }

    .product-card:hover .product-image {
        transform: translateY(-2px) scale(1.035);
    }

    .buy-button:hover,
    .product-currency-option:hover {
        filter: brightness(1.035);
    }
}


/* ---------------- DARK THEME ---------------- */

html:is(.dark-theme, [data-marathon-theme="dark"]) body {
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(37, 99, 235, 0.18),
            transparent 34rem
        ),
        #020617;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .product-app {
    background:
        linear-gradient(
            180deg,
            #0b1220 0%,
            #0f172a 38%,
            #111827 100%
        ) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .product-header {
    background: rgba(15, 23, 42, 0.94) !important;
    border-color: rgba(71, 85, 105, 0.7);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-currency-card {
    background:
        linear-gradient(
            135deg,
            rgba(30, 41, 59, 0.98),
            rgba(15, 23, 42, 0.98)
        ) !important;
    border-color: rgba(71, 85, 105, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-currency-switch {
    background: rgba(2, 6, 23, 0.58);
    border-color: rgba(71, 85, 105, 0.72);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-currency-option.active {
    background: linear-gradient(135deg, #1e3a8a, #164e63);
    color: #e0f2fe;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-card-blue {
    background:
        linear-gradient(145deg, #172554, #0f3b46) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-card-indigo {
    background:
        linear-gradient(145deg, #25234f, #172554) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-card-violet {
    background:
        linear-gradient(145deg, #34215b, #1e293b) !important;
}

html:is(.dark-theme, [data-marathon-theme="dark"]) .product-card {
    border-color: rgba(100, 116, 139, 0.48);
    box-shadow:
        0 13px 31px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-image-box {
    border-color: rgba(148, 163, 184, 0.16);
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(51, 65, 85, 0.88),
            rgba(15, 23, 42, 0.48) 74%
        );
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-information li {
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.5);
    color: #cbd5e1;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-information li strong,
html:is(.dark-theme, [data-marathon-theme="dark"])
.progress-value {
    color: #f1f5f9;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.product-card-footer {
    border-top-color: rgba(148, 163, 184, 0.18);
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-modal-dialog {
    background: #111827;
    border-color: #334155;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-modal-dialog h2,
html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-balance-row strong {
    color: #f8fafc;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-product-name,
html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-modal-close {
    background: #1e293b;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-balance-details,
html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-balance-row {
    border-color: #334155;
}

html:is(.dark-theme, [data-marathon-theme="dark"])
.purchase-cancel-button {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}


/* ---------------- MOTION SAFETY ---------------- */

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image,
    .buy-button,
    .product-currency-option {
        transition: none;
    }
}



/* DESKTOP SIZE — MATCH HOME PAGE */

@media (min-width: 600px) {
    .product-app {
        width: 100%;
        max-width: 540px;
    }

    .product-main {
        max-width: 540px;
    }

    .product-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .bottom-navigation {
        width: 100%;
        max-width: 540px;
    }
}
