/* 
    Retro Chris Gaming - Frontend CSS (Light Theme)
    Style: Clean, Bright, Gaming-Inspired, Minimalistic
*/

:root {
    /* Light Mode Colors */
    --bg-dark: #f8f9fa; /* Main background */
    --bg-surface: #ffffff; /* Card background */
    --bg-surface-elevated: #e9ecef;
    
    --neon-purple: #4338ca; /* Deep blue/purple */
    --neon-purple-glow: rgba(67, 56, 202, 0.2);
    --neon-cyan: #0284c7; /* Sky blue */
    --neon-cyan-glow: rgba(2, 132, 199, 0.2);
    --neon-pink: #e11d48; /* Retro Pink/Red */
    
    --text-main: #1f2937; /* Dark text */
    --text-muted: #6b7280;
    
    --border-subtle: rgba(0, 0, 0, 0.08);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Utilities */
.gradient-text {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 5s linear infinite;
    font-weight: 900;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.cart-icon {
    position: relative;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.3s;
}

.cart-icon:hover {
    color: var(--neon-cyan);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--neon-pink);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem 2rem;
    position: relative;
}

.hero-content {
    flex: 1;
    z-index: 10;
}

.pill-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--neon-purple-glow);
    border: 1px solid var(--neon-purple);
    border-radius: 50px;
    color: var(--neon-purple);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 80%;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-cyan));
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 10px 20px var(--neon-purple-glow);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--neon-cyan-glow);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.btn-secondary:hover {
    background: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

/* Hero Visuals */
.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.glow-circle-purple {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--neon-purple);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    top: 50px;
    left: 50px;
    animation: drift 10s infinite alternate;
    z-index: 1;
}

.glow-circle-cyan {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--neon-cyan);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    bottom: 0px;
    right: 50px;
    animation: drift 8s infinite alternate-reverse;
    z-index: 1;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 40px); }
}

.hero-image-placeholder {
    position: relative;
    z-index: 5;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    animation: float 6s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-image-placeholder img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: white; /* Ensure white background for logo */
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Products Section */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.filter-tabs {
    display: flex;
    gap: 1rem;
}

.tab {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.tab:hover, .tab.active {
    color: var(--text-main);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--neon-cyan);
    border-radius: 3px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-img-wrapper {
    height: 250px;
    background: var(--bg-surface-elevated);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discount-badge-store {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--neon-pink);
    color: white;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 50px;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}

.price-strike {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 8px;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.product-action {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-action:hover {
    background: var(--neon-purple);
}

.product-card:hover .product-action {
    bottom: 20px;
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--neon-purple);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-main);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 2rem 2rem 2rem;
    margin-top: 4rem;
    background: #ffffff;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: var(--neon-pink);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Skeleton Loading CSS */
.skeleton {
    cursor: default;
}
.skeleton-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-surface-elevated) 25%, #f1f5f9 50%, var(--bg-surface-elevated) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
.skeleton-text {
    height: 1rem;
    background: var(--bg-surface-elevated);
    margin-bottom: 0.5rem;
    border-radius: 4px;
}
.skeleton-text.title { width: 80%; height: 1.2rem;}
.skeleton-text.price { width: 40%; height: 1.5rem; margin-top: 1rem;}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cart Overlay & Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: absolute;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: var(--bg-surface);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.cart-overlay.show .cart-sidebar {
    right: 0;
}

.cart-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.cart-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.cart-close-btn:hover {
    color: var(--neon-pink);
    transform: scale(1.1);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--neon-cyan);
    font-weight: 800;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.qty-btn {
    background: var(--bg-surface-elevated);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--neon-cyan);
    color: white;
}

.remove-btn {
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
}
.remove-btn:hover { color: var(--neon-pink); text-decoration: underline;}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-dark);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

#cartTotalPrice {
    font-size: 1.8rem;
    color: var(--text-main);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-surface);
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--neon-pink);
    transform: scale(1.1);
}

.product-modal-box {
    max-width: 900px;
    padding: 2rem;
}

.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-modal-img {
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--neon-purple);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { flex-direction: column; text-align: center; padding-top: 8rem;}
    .hero-title { font-size: 3rem; }
    .hero-subtitle { max-width: 100%; margin: 0 auto 2rem auto; }
    .hero-buttons { justify-content: center; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1.5rem;}
    .product-modal-grid { grid-template-columns: 1fr; }
}
