: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: 'Wix Madefor Text', '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;
}

/* For the right-side filters which are visually different in the mockup */
.nav-pill-right {
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 16px;
}

.nav-pill-right .nav-tab {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
}

.nav-pill-right .nav-tab.active {
    background: #FFFFFF;
    color: #000000;
}

/* --- 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: 600;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

/* --- 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);
    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: 600;
    margin-bottom: 8px;
    letter-spacing: -1px;
    line-height: 1;
}

.p-price {
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.cookie-icon {
    width: 28px;
    height: 28px;
}

.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;
    flex-direction: column;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* slight border */
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 40px;
}

.options-box.open {
    display: flex;
}

.ob-header {
    color: #888;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
}

.ob-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    width: 100%;
}

#blogListContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
    background: transparent;
}

.blog-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.trard-pay-btn {
    background: var(--text-primary);
    color: var(--bg-dark);
    width: 100%;
    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;
}

/* --- TRARDPAY MODAL (DARK THEME) --- */
.trardpay-container.dark-theme {
    width: 100%;
    max-width: 440px;
    background: #1e1e1e;
    border-radius: 28px;
    padding: 32px;
    color: #FFFFFF;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .trardpay-container.dark-theme {
    transform: translateY(0);
}

.tp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.tp-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 20px;
}

.tp-close {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: 0.2s;
}

.tp-close:hover {
    opacity: 1;
}

.tp-item-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: transparent;
    margin-bottom: 24px;
}

.tp-item-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #242424;
    border-radius: 16px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tp-item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tp-item-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tp-price-row {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-icon-small {
    width: 16px;
    height: 16px;
}

.tp-section {
    margin-bottom: 24px;
}

.tp-label {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 12px;
}

.tp-blog-badge {
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 15px;
}

.tp-blog-avatar-small {
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
}

.tp-total-section {
    margin-bottom: 32px;
    margin-top: 32px;
}

.tp-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
}

.tp-price-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;
}

.tp-price-display img {
    width: 28px;
    height: 28px;
}

.tp-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 32px;
}

.tp-slide-track {
    background: #ececec;
    border-radius: 30px;
    height: 64px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.tp-slider-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
}

.tp-slide-thumb {
    width: 52px;
    height: 52px;
    background: #111111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 6px;
    cursor: grab;
    transition: background 0.2s;
}

.tp-slide-thumb:active {
    cursor: grabbing;
    background: #333333;
}

/* --- 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: 900px) {
    .top-nav {
        padding: 16px 20px;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        height: auto;
    }

    .pill-group {
        width: 100%;
        justify-content: center;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .store-main {
        padding: 0 16px 48px 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        height: 440px;
        min-height: auto;
        padding: 24px;
    }

    .card-title {
        font-size: 20px;
    }

    .p-image-box {
        bottom: -10px;
        right: -10px;
        width: 90%;
        height: 280px;
    }

    /* Modals need more padding on top so they don't get hidden under mobile bars */
    .tp-result-container,
    .item-detail-container {
        width: calc(100% - 32px);
        margin: 16px;
    }
}

.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;
}

/* --- TRARDPAY RESULT MODAL --- */
.tp-result-container {
    width: 100%;
    max-width: 360px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    padding: 32px;
    color: #ffffff;
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .tp-result-container {
    transform: translateY(0);
}

.tp-result-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.tp-result-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tp-result-header {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    /* white text since background might be slightly darker in the area or they use a dark overlay */
}

.tp-result-icon {
    margin-top: 48px;
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tp-result-text {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}