:root {
    --bg-dark: #0A0A0A;
    --surface-dark: #121212;
    --accent-blue: #0081FF;
    --accent-orange: #FF9F0A;
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --radius-pill: 100px;
    --radius-card: 40px;
    --radius-modal: 48px;
    --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

/* --- DUAL PILL NAVIGATION --- */
.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 48px;
    position: sticky;
    top: 0;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through to empty space? No, pills are interactive */
}

.nav-left-anchor {
    position: absolute;
    left: 48px;
    pointer-events: auto;
}

.pill-group {
    display: flex;
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    padding: 6px;
    gap: 4px;
    pointer-events: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-pill-right {
    position: absolute;
    right: 48px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
}

.nav-tab.active {
    background: #FFFFFF;
    color: #000000;
}

.nav-tab:hover:not(.active) {
    color: #FFFFFF;
}

/* --- STORE CONTAINER --- */
.store-main {
    flex: 1;
    padding: 0 48px 80px 48px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.category-header {
    margin: 48px 0 32px 0;
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* --- DYNAMIC GRID --- */
.grid-system {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* --- PREMIUM PRODUCT CARD --- */
.product-card {
    background: var(--surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-card);
    padding: 32px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 480px;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
    background: #181818;
}

.card-content {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.p-tag {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.p-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1;
}

.p-price {
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.p-price-suffix {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.p-image-box {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 90%;
    height: 340px;
    z-index: 1;
}

.p-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

/* Wide card style */
.card-wide {
    grid-column: span 2;
    background: linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
}

.card-wide .p-image-box {
    width: 50%;
    right: 0;
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- SPLIT SCREEN MODAL --- */
.m-split-container {
    width: 94%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
    background: var(--bg-dark);
    border-radius: var(--radius-modal);
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.m-left {
    flex: 1.4;
    background: #0D0D0D;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.m-right {
    flex: 1;
    padding: 64px 48px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #111111;
}

.m-hero {
    width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.8));
}

.m-close-box {
    position: absolute;
    top: 32px;
    left: 32px;
}

.round-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

.round-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.m-badge {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.m-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 12px;
}

.m-desc {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.m-price-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 48px;
}

.m-section-label {
    font-weight: 700;
    margin-bottom: 16px;
    display: block;
}

/* Dropdown */
.m-dropdown {
    background: #1A1A1A;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 40px;
    transition: 0.2s;
}

.m-dropdown:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.options-box {
    display: none;
    border: none;
    border-radius: 30px;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.trard-pay-btn:hover {
    background: #0070e0;
    transform: translateY(-2px);
}

.trard-pay-btn span {
    font-weight: 800;
    font-family: sans-serif;
}


/* --- TRARDPAY MODAL (WHITE/LIGHT) --- */
.trardpay-container {
    width: 100%;
    max-width: 500px;
    background: #FFFFFF;
    border-radius: 32px;
    padding: 40px;
    color: #111;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .trardpay-container {
    transform: translateY(0);
}

.tp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.tp-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
}

.tp-close {
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-item-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tp-item-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.tp-item-meta h4 {
    font-size: 20px;
    margin-bottom: 4px;
}

.tp-vendor {
    color: #888;
    font-size: 14px;
}

.tp-target-blog {
    margin-bottom: 40px;
}

.tp-target-blog label {
    color: #888;
    font-size: 13px;
    margin-bottom: 12px;
    display: block;
}

.tp-blog-badge {
    background: #222;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tp-blog-avatar {
    width: 24px;
    height: 24px;
    background: #FF9F0A;
    border-radius: 50%;
}

.tp-total-section {
    margin-bottom: 60px;
}

.tp-total-section label {
    color: #888;
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

.tp-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tp-amount img {
    width: 28px;
    height: 28px;
}

.tp-subtitle {
    color: #888;
    font-size: 14px;
}

.tp-slider-container {
    text-align: center;
}

.tp-slider-container p {
    color: #888;
    font-size: 14px;
    margin-bottom: 16px;
}

.tp-slide-track {
    background: #8e8e93;
    border-radius: 40px;
    height: 64px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 4px;
    overflow: hidden;
}

.tp-slide-thumb {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 4px;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

.tp-slide-thumb:active {
    cursor: grabbing;
    background: #f0f0f0;
}


/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toast {
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 20px 24px;
    min-width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.hiding {
    animation: slideOut 0.3s forwards;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: white;
}

.toast-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- MOBILE RESPONSIVENESS (Premium) --- */
@media (max-width: 1200px) {
    .grid-best {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-all {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .grid-all {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .top-nav {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nav-center {
        width: 100%;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tab {
        padding: 8px 16px;
        flex-shrink: 0;
    }

    .nav-right {
        width: 100%;
        justify-content: flex-end;
    }

    .store-main {
        padding: 0 16px 48px 16px;
    }

    .grid-best,
    .grid-all {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-large {
        grid-column: span 1;
        flex-direction: column;
        height: auto;
        min-height: 480px;
    }

    .product-card {
        height: 440px;
        padding: 24px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-subtitle {
        font-size: 14px;
        max-width: 100%;
    }

    .product-image-container {
        height: 220px;
        bottom: -10px;
        left: 5%;
        right: 5%;
        width: 90%;
    }

    .item-detail-container {
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .item-detail-image-wrapper {
        min-height: 200px;
    }

    .item-detail-info {
        padding: 24px;
    }
}

.price-suffix {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.product-info {
    z-index: 5;
    background: linear-gradient(to bottom, var(--surface-dark) 60%, transparent);
    padding-bottom: 20px;
}