/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --card-bg: #16161f;
    --card-hover: #1c1c28;
    --text: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #0070d8;
    --accent-light: #3b9eff;
    --accent-glow: rgba(0, 112, 216, 0.15);
    --success: #279a4f;
    --border: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --gradient-ps: linear-gradient(135deg, #0070d8, #00439c);
    --gradient-hero: linear-gradient(135deg, #0070d8 0%, #6d28d9 50%, #ec4899 100%);
    --max-width: 1200px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
a { color: inherit; text-decoration: none; }

body::before {
    content: '';
    position: fixed;
    top: -40%; left: -20%;
    width: 80%; height: 80%;
    background: radial-gradient(circle, rgba(0,112,216,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav { display: flex; gap: 8px; align-items: center; }
.nav a {
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.nav a:hover, .nav a.active {
    color: var(--text);
    background: var(--accent-glow);
}
.nav-spacer { flex: 1; }
.nav-tg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 26px !important;
    background: var(--gradient-ps) !important;
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-weight: 700 !important;
    font-size: 15px !important;
}
.nav-tg:hover { opacity: 0.9; }
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--text-secondary) !important;
    padding: 0 !important;
    transition: all 0.2s;
}
.nav-icon:hover, .nav-icon.active {
    color: var(--text) !important;
    background: var(--accent-glow);
}
.nav-icon svg { flex-shrink: 0; }

/* ===== HERO ===== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 80px 24px 60px;
    text-align: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(0,112,216,0.15), transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    position: relative;
}
.hero h1 span {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}
.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gradient-ps);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,112,216,0.3); }

/* ===== SECTION ===== */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
}
.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.section-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--border-light);
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628 0%, #0d2137 50%, #0a0f1a 100%);
    position: relative;
    overflow: hidden;
}
.product-img-fallback::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,112,216,0.15) 0%, transparent 60%);
}
.product-img-fallback .pf-nominal {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,112,216,0.4);
}
.product-img-fallback .pf-currency {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-light);
    position: relative;
    z-index: 1;
    margin-top: 2px;
}
.product-img-fallback .pf-ps-logo {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,0.08);
    letter-spacing: 2px;
    font-size: 32px;
}
.product-region {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    z-index: 2;
}
.product-region.tr { background: rgba(233,30,99,0.6); color: #fff; }
.product-region.in { background: rgba(255,152,0,0.6); color: #fff; }
.product-region.us { background: rgba(0,112,216,0.6); color: #fff; }
.product-region.default { background: rgba(255,255,255,0.15); color: #fff; }
.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text);
}
.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.product-price {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.product-price .pp-currency { font-size: 14px; font-weight: 600; color: var(--accent-light); }
.product-price-usd {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.product-stock {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.stock-available {
    color: var(--success);
    border-radius: 20px;
}
.stock-out {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-radius: 20px;
}

/* ===== PRODUCT CARD HOVER OVERLAY ===== */
.product-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}
.product-card:hover .product-card-overlay {
    opacity: 1;
}
.product-card-overlay-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}
.product-card-overlay-btn:hover {
    background: var(--accent);
    transform: scale(1.12);
}
.product-card-overlay-btn.added {
    background: rgba(76, 175, 80, 0.3);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}
.product-card-overlay-btn.wishlisted {
    color: #f472b6;
}
.product-card-overlay-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== CARD HOVER ACTIONS ===== */
.card-shell {
    position: relative;
}
.card-hover-actions {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.card-hover-actions--two {
    grid-template-columns: 1fr 1fr;
}
.card-shell:hover .card-hover-actions,
.card-shell:focus-within .card-hover-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.card-action-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.card-action-btn--primary {
    background: var(--gradient-ps);
    color: #fff;
}
.card-action-btn--primary:hover {
    filter: brightness(1.07);
}
.card-action-btn--ghost {
    background: rgba(10, 10, 15, 0.76);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
}
.card-action-btn--ghost:hover {
    background: rgba(10, 10, 15, 0.92);
    border-color: rgba(255, 255, 255, 0.3);
}
.card-action-btn--ghost.active {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.55);
    background: rgba(244, 114, 182, 0.14);
}

/* ===== LEGACY WISHLIST BUTTON ===== */
.wish-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
}
.wish-btn:hover {
    background: rgba(0,0,0,0.7);
    color: #e91e63;
    transform: scale(1.1);
}
.wish-btn.active {
    color: #e91e63;
    background: rgba(233,30,99,0.2);
}

/* ===== RAFFLE CARDS ===== */
.raffle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.raffle-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.raffle-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-hero);
}
.raffle-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.raffle-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.raffle-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.raffle-stats { display: flex; gap: 16px; }
.raffle-stat { display: flex; flex-direction: column; gap: 2px; }
.raffle-stat-val { font-size: 16px; font-weight: 700; color: var(--accent-light); }
.raffle-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== PRODUCT DETAIL ===== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.detail-img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.detail-info h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}
.detail-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 4px;
}
.detail-price-usd {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.detail-flag {
    font-size: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}
.detail-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.detail-row-label { color: var(--text-secondary); }
.detail-row-val { font-weight: 600; }
.btn-buy {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    background: var(--gradient-ps);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,112,216,0.3); }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px 0;
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 13px;
    flex-wrap: wrap;
}
.breadcrumbs a {
    color: var(--text-muted);
    transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--text-secondary); }
.breadcrumbs .bc-sep {
    color: var(--text-muted);
    margin: 0 8px;
    font-size: 11px;
}
.breadcrumbs .bc-current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== ALERTS ===== */
.alert {
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 24px;
}
.alert-inner {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.alert-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
}
.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a { color: var(--text-secondary); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.footer-legal a { color: var(--text-muted); font-size: 12px; transition: color 0.2s; }
.footer-legal a:hover { color: var(--text-secondary); }

/* ===== MOBILE ===== */
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; padding: 4px; }

@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .card-hover-actions {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
    .product-card-overlay {
        display: none;
    }
    .menu-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        background: rgba(10,10,15,0.95);
        backdrop-filter: blur(20px);
        padding: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 16px; }
    .hero { padding: 50px 16px 40px; }
    .section { padding: 40px 16px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .raffle-grid { grid-template-columns: 1fr; }
}

/* ===== SHARED CAROUSEL ARROWS ===== */
.section-carousel {
    position: relative;
}
.car-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}
.car-arrow:hover {
    background: rgba(255,255,255,0.18);
}
.car-arrow.prev { left: -22px; }
.car-arrow.next { right: -22px; }

@media (max-width: 1240px) {
    .car-arrow.prev { left: 4px; }
    .car-arrow.next { right: 4px; }
}
@media (max-width: 640px) {
    .car-arrow { width: 36px; height: 36px; font-size: 16px; }
}

/* ===== RECENTLY ADDED ===== */
.recent-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.recent-header {
    margin-bottom: 20px;
}
.recent-title {
    font-size: 28px;
    font-weight: 800;
}
.recent-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    /* scroll-behavior controlled by JS */
    cursor: grab;
    padding: 4px 0;
}
.recent-track::-webkit-scrollbar { display: none; }
.recent-track.grabbing { cursor: grabbing; }
.recent-card {
    flex-shrink: 0;
    width: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}
.recent-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-light);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.recent-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-secondary);
}
.recent-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.recent-card:hover .recent-card-img img { transform: scale(1.05); }
.recent-ps {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.recent-ps.ps5 { background: rgba(0,112,216,0.7); color: #fff; }
.recent-ps.ps4 { background: rgba(109,40,217,0.7); color: #fff; }
.recent-ps.ps4_ps5 { background: rgba(34,197,94,0.7); color: #fff; }
.recent-card-body {
    padding: 8px 10px;
}
.recent-card-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recent-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
}
.recent-price {
    font-size: 14px;
    font-weight: 800;
}
.recent-price-old {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}

@media (max-width: 640px) {
    .recent-section { padding: 24px 16px 40px; }
    .recent-title { font-size: 22px; }
    .recent-card { width: 170px; }
}
