/* --- HOBBY INVENTORY MASTER THEME --- */
:root {
    --primary: #ffcb05;    /* Pokemon Yellow */
    --secondary: #2a75bb;  /* Pokemon Blue */
    --accent: #ff4757;     /* One Piece Red */
    --dark: #0f0f0f;       /* Deep Black Background */
    --card-bg: #1a1a1a;    /* Slightly lighter grey for cards/sections */
    --text: #ffffff;
    --text-dim: #b3b3b3;
    --transition: all 0.3s ease;
}

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

/* This ensures every page starts with the dark theme */
html, body {
    background-color: var(--dark);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* --- SHARED NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(0, 0, 0, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--text);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links li a:hover { color: var(--primary); }

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text);
    margin: 4px 0;
}

/* --- SHARED LAYOUT ELEMENTS --- */
.container {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
    padding-left: 20px;
}

.cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
}

.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(255, 203, 5, 0.4); }

/* --- CARD & GRID SYSTEM --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid #333;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover { border-color: var(--primary); transform: translateY(-5px); }

.card-image { width: 100%; aspect-ratio: 3/4; background: #222; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 20px; }

/* --- PRICING TABLES --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.price-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #333;
    text-align: center;
}

.price-card.featured { border: 2px solid var(--primary); }

/* --- FORMS --- */
.form-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #333;
    max-width: 600px;
    margin: 0 auto;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #000;
        flex-direction: column;
        padding: 20px;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 15px 0; text-align: center; }
    .nav-links li a { margin: 0; }
}

/* --- E-COMMERCE & SLIDER ADDITIONS --- */
.category-slider-container {
    margin-bottom: 60px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Horizontal Scroll Slider for Mobile/Desktop */
.slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.slider::-webkit-scrollbar { display: none; } /* Hide scrollbar for Chrome/Safari */

.slider .card {
    min-width: 280px; /* Ensures cards don't shrink in the slider */
}

/* Cart Icon in Nav */
.cart-icon-container {
    position: relative;
    margin-left: 2rem;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Cart Page Styles */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #333;
}

.cart-item img {
    width: 80px;
    border-radius: 5px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: bold;
}

.cart-total {
    text-align: right;
    font-size: 1.5rem;
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* --- CUSTOM NOTIFICATIONS --- */

/* Toast Container (Top Right) */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--card-bg);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    border-left: 5px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.4s ease forwards, fadeOut 0.4s ease 2.5s forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Custom Modal (Center) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: 0.3s ease;
}

.modal-overlay.active { display: flex; }
.modal-overlay.active .modal-content { transform: scale(1); }

.modal-content h2 { color: var(--primary); margin-bottom: 15px; }
.modal-content p { margin-bottom: 25px; color: var(--text-dim); }

/* --- PAYMENT QR STYLES --- */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.payment-box {
    background: #222;
    padding: 15px 5px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #444;
    transition: var(--transition);
}

.payment-box:hover {
    border-color: var(--primary);
}

.payment-box.selected {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: bold;
}

.payment-box p {
    font-size: 0.8rem;
    margin: 0;
}

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