/* =========================================================
   nueva store  - PREMIUM STYLES
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --purple-primary: #6b2cff;
    --purple-hover: #5a22d6;
    /* Slightly darker for hover */
    --purple-glow: rgba(107, 44, 255, 0.4);

    /* Accent */
    --accent: #00ffb3;
    --accent-hover: #00cc8f;

    /* Backgrounds - Deep, Rich Dark Theme */
    --bg-main: #0f0f14;
    --bg-secondary: #16161f;
    --bg-card: #20202b;
    --bg-card-hover: #262633;
    --bg-input: #12121a;

    /* Text */
    --text-main: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #7a7a8f;

    /* UI Elements */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --header-height: 90px;

    --border-color: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
    --bg-main: #f3f4f6;
    /* Lighter gray background for contrast */
    --bg-secondary: #ffffff;
    --bg-card: #eef2f6;
    --bg-card-hover: #e0e6ed;
    --bg-input: #ffffff;

    --text-main: #121212;
    --text-secondary: #4a4a4a;
    --text-muted: #666666;

    --border-color: rgba(0, 0, 0, 0.1);

    /* Shadows adjust for light mode */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter Tight', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ================= HEADER ================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-main);
    /* Supports theme now */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

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

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    width: clamp(60px, 10vw, 80px);
    /* Smaller icon since text is present */
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--purple-glow));
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--accent);
}

.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    border-radius: 99px;
    /* Pill shape */
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: var(--bg-input);
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 4px rgba(107, 44, 255, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    position: relative;
    font-size: 1.4rem;
    color: var(--text-main);
    transition: transform 0.2s;
}

.cart-icon:hover {
    transform: scale(1.1);
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ================= HERO SECTION ================= */

.hero {
    height: 400px;
    /* background-image: url('../img/hero_banner.png'); REMOVED to avoid 404 */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, var(--bg-main) 0%, rgba(15, 15, 20, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
    animation: heroFadeIn 0.8s ease-out;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
    /* Solid Neon Color */
    /* Strong drop shadow + Neon glow */
    text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(0, 255, 179, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: #000;
    /* Black text */
    margin-bottom: 2rem;
    /* White glow for contrast against dark/complex backgrounds */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
    font-weight: 600;
    /* Slightly bolder for black text */
}

.btn-hero {
    display: inline-block;
    background: var(--purple-primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-hero:hover {
    background: var(--purple-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--purple-glow);
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Responsive Styles */
@media (max-width: 768px) {
    .hero {
        height: 300px;
        margin-top: calc(var(--header-height) - 10px);
        /* Adjust for mobile header if needed */
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-hero {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
}

.cart-wrapper {
    position: relative;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    z-index: 1001;
    margin-top: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.cart-dropdown.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.item-info {
    flex: 1;
}

.item-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn-checkout {
    width: 100%;
    background: var(--accent);
    color: black;
    padding: 0.8rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    transition: opacity 0.2s;
}

.btn-checkout:hover {
    opacity: 0.9;
}

/* ================= LAYOUT ================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.container main {
    width: 100%;
    min-width: 0;
}

.container.home-layout {
    grid-template-columns: 1fr;
    max-width: 1400px;
}

/* ================= SIDEBAR ================= */

aside {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    /* Ensure sidebar doesn't get too wide/narrow */
    min-width: 250px;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

.filter-control {
    width: 100%;
    background-color: var(--bg-body);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.filter-control:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.filter-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(107, 44, 255, 0.2);
}

.filter-control option {
    background-color: #1a1a2e;
    /* Dark background to match theme */
    color: white;
    /* Ensure text is visible */
    padding: 10px;
}

.view-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: -3rem;
    /* Pull up further for Home */
    position: relative;
    z-index: 100;
    /* High z-index to ensure clickability */
}

/* Extra spacing for pages with overlay issues (games/windows) */
.view-toggle.extra-spacing {
    margin-top: 3rem;
    /* Large spacing to clear header overlap completely */
}

.btn-view {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view:hover,
.btn-view.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ... existing styles ... */

/* ... existing styles ... */

/* ... existing styles ... */

.games-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    /* Default: Mobile first (1-2 columns depending on size) */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Home Grid Specifics */
.games-grid.home-grid {
    /* Base responsive behavior for small screens */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Desktop pattern: STRICT 3 columns as requested */
@media (min-width: 1024px) {
    .games-grid.home-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Force Dark Cards in Light Mode (Contrast Fix) */
[data-theme="light"] .game-card {
    background-color: #16161f;
    /* Dark background similar to dark mode */
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: white;
}

[data-theme="light"] .game-card .game-title {
    color: white;
}

[data-theme="light"] .game-card .badge {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}




/* Variant Selector in Cards */
.variant-wrapper {
    padding: 0 1.2rem;
    margin-bottom: 0.8rem;
}

.price-variant-selector {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
    background-color: var(--bg-body);
    /* Solid background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.2s;
}

.price-variant-selector:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.price-variant-selector:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 44, 255, 0.3);
}

.price-variant-selector option {
    background: #1a1a2e;
    padding: 8px;
}

/* ================= LIST VIEW STYLES ================= */
.games-grid.list-view {
    display: flex;
    /* Switch to flex column for list view to avoid grid constraints */
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    /* Center list items */
}

.games-grid.list-view .game-card {
    flex-direction: row;
    width: 100%;
    max-width: 800px;
    /* Reasonable max width for list item */
    height: auto;
    min-height: 160px;
}

.games-grid.list-view .card-image-wrapper {
    width: 240px;
    padding-top: 0;
    flex-shrink: 0;
    /* Prevent image squishing */
    height: auto;
    position: relative;
}

.games-grid.list-view .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.games-grid.list-view .card-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.5rem;
}

/* ... rest of list view styles generally okay, but ensure no fixed heights cause overlap ... */


.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 10;
    border-color: rgba(107, 44, 255, 0.3);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 130%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image {
    transform: scale(1.1);
}

.card-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--text-main);
    /* Truncate text */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 600;
}

.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 1.4rem;
    font-weight: 500;
    /* Medium weight */
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 255, 179, 0.2);
}

.btn-buy {
    background: var(--purple-primary);
    color: white;
    font-weight: 500;
    /* Medium weight */
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-buy:hover {
    background: var(--purple-hover);
    box-shadow: 0 0 15px var(--purple-glow);
    transform: translateY(-2px);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-cart-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-cart-icon:hover {
    background: var(--accent);
    color: black;
    transform: translateY(-2px);
}

/* ================= FOOTER ================= */

footer {
    margin-top: 4rem;
    padding: 3rem 1.5rem;
    background: var(--bg-input);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ================= SEARCH DROPDOWN ================= */
.search-container {
    position: relative;
    /* Ensure dropdown is relative to this */
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    display: none;
    /* Hidden by default */
    border-top: 2px solid var(--purple-primary);
}

.search-results.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s, transform 0.2s;
    /* Add transform transition */
}

.search-item.clicked {
    animation: clickZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background: var(--purple-glow);
    z-index: 10;
    position: relative;
    border-radius: var(--border-radius-sm);
}

@keyframes clickZoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px var(--purple-primary);
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* ================= HIGHLIGHT EFFECT ================= */
.highlight-card {
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px var(--accent);
    animation: highlightPulse 2s ease-out forwards;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.05);
    }

    20% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.05);
    }

    40% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.03);
    }
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-item.empty {
    color: var(--text-muted);
    justify-content: center;
    padding: 1.5rem;
}

.search-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.search-info {
    flex: 1;
}

.search-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.search-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.search-type {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.search-price {
    color: var(--accent);
    font-weight: 700;
}

/* ================= CHAT WIDGET ================= */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    /* Menu on top of button */
    align-items: flex-end;
    gap: 1rem;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    background: var(--purple-primary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(107, 44, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(-10deg);
    background: var(--purple-hover);
}

.chat-icon-svg {
    width: 30px;
    height: 30px;
}

.chat-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 200px;
    /* Reduced width */
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 0.8rem;
    /* Reduced padding */
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    transform-origin: bottom right;
    animation: scaleIn 0.2s ease-out;
}

.chat-menu.active {
    display: flex;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-option.discord:hover {
    background: #5865F2;
    /* Discord Color */
    color: white;
}

.chat-option.whatsapp:hover {
    background: #25D366;
    /* WhatsApp Color */
    color: white;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    aside {
        position: static;
        margin-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .header-inner {
        padding: 0 1rem;
        gap: 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .search-input {
        padding: 0.6rem 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .cart-dropdown {
        width: 90vw;
        right: -1rem;
        /* Adjust for container padding */
    }
}

/* ================= TOAST NOTIFICATIONS ================= */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2000;
}

.toast {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 300px;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success {
    border-color: var(--accent);
}

.toast.info {
    border-color: var(--purple-primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ================= SKELETON LOADING ================= */

.skeleton {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    height: 380px;
    /* Approx height of card */
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ================= LIST VIEW TOGGLE ================= */
.view-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.btn-view {
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-view:hover,
.btn-view.active {
    background: var(--purple-primary);
    color: white;
    border-color: var(--purple-primary);
}

/* ================= LIST VIEW STYLES ================= */
.games-grid.list-view {
    grid-template-columns: 1fr;
}

.games-grid.list-view .game-card {
    flex-direction: row;
    height: 160px;
    /* Fixed height for consistency */
}

.games-grid.list-view .card-image-wrapper {
    width: 240px;
    /* Fixed width for image */
    padding-top: 0;
    height: 100%;
}

.games-grid.list-view .card-image {
    position: static;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.games-grid.list-view .card-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.5rem;
}

.games-grid.list-view .game-info-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.games-grid.list-view .game-meta {
    margin-bottom: 0;
}

.games-grid.list-view .card-footer {
    margin-top: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

/* Mobile List View Override */
@media (max-width: 600px) {
    .games-grid.list-view .game-card {
        flex-direction: column;
        height: auto;
        max-width: 100%;
        /* Full width on mobile */
    }

    .games-grid.list-view .card-image-wrapper {
        width: 100%;
        height: 0;
        padding-top: 60%;
        /* Aspect ratio for mobile list image */
        position: relative;
    }

    .games-grid.list-view .card-image {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
    }

    .games-grid.list-view .card-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .games-grid.list-view .card-footer {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
    }

    .view-toggle {
        display: none;
    }

    .cart-dropdown {
        width: 300px;
        right: -20px;
    }
}

/* ================= CAROUSEL STYLES ================= */
.carousel {
    position: relative;
    width: 100%;
    margin: 2rem auto;
    padding: 0 var(--container-padding);
    max-width: 1200px;
    height: 300px;
    /* Slightly taller for cards */
    overflow: hidden;
}

.carousel-track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 0.4s ease-in-out;
    cursor: grab;
    display: flex;
    /* CRITICAL for horizontal alignment */
    width: 100%;
}

.carousel-track.grabbing {
    cursor: grabbing;
    transition: none;
}

.carousel-slide {
    position: relative;
    /* Changed from absolute to relative/flex */
    flex: 0 0 100%;
    /* Show 1 slide by default */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

/* Slides Content */
.slide-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    color: #fff;
    text-align: left;
}

.slide-content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: var(--primary-color);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: absolute;
    bottom: 1px;
    width: 100%;
    z-index: 10;
}

.carousel-nav button {
    border: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    margin: 0 6px;
    cursor: pointer;
}

.carousel-nav button.current-slide {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Promo Gradients */
.promo-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.promo-2 {
    background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
}

.promo-3 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

@media (max-width: 768px) {
    .carousel {
        height: 350px;
        padding: 0;
    }

    .carousel-track-container {
        border-radius: 0;
    }


}

/* Sidebar Dropdown */
.sidebar-dropdown {
    display: flex;
    flex-direction: column;
}

.dropdown-toggle {
    justify-content: space-between;
    width: 100%;
}

.chevron {
    transition: transform 0.3s ease;
}

.sidebar-dropdown.open .chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 1rem;
}

.sidebar-dropdown.open .sidebar-submenu {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.sidebar-link.sub-link {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.sidebar-link.sub-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--purple-primary);
}

.sidebar-link.sub-link.active {
    background: rgba(107, 44, 255, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}