/* ========== DESIGN SYSTEM & VARIABLES ========== */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099ff;
    --secondary: #9b59b6;
    --accent: #f39c12;
    --bg-dark: #0a0a0b;
    --bg-card: #16161a;
    --bg-header: rgba(10, 10, 11, 0.95);
    --text-main: #ffffff;
    --text-muted: #a0a0a5;
    --border: #2d2d35;
    --success: #27ae60;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glass: rgba(255, 255, 255, 0.03);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== LIGHT THEME OVERRIDES ========== */
[data-theme="light"] {
    --bg-dark: #f0f2f5;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.98);
    --text-main: #1c1e21;
    --text-muted: #4b4f56;
    --border: #dddfe2;
    --white: #000000;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --glass: rgba(0, 0, 0, 0.05);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

/* ========== HEADER (Mercado Libre Style) ========== */
.header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 10px 0;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 60px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 2px;
    letter-spacing: -1.5px;
    position: relative;
    padding-right: 15px;
}

.logo-net {
    color: var(--white);
    text-transform: uppercase;
    font-style: italic;
}

.logo-salen {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 2px;
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

.logo:hover .logo-dot {
    background: var(--white);
    box-shadow: 0 0 20px var(--white);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.cart-bump {
    animation: cart-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cart-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

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

.search-container input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    padding-right: 50px;
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

.currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}

.currency-selector:hover {
    border-color: var(--primary);
}

.rate-indicator {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(39, 174, 96, 0.2);
    white-space: nowrap;
}

.currency-selector select {
    background: none;
    border: none;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.currency-selector select option {
    background: var(--bg-card);
    color: var(--white);
}

.theme-toggle {
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.cart-btn {
    position: relative;
    font-size: 1.4rem;
    color: var(--white);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== SECONDARY NAV (Categories) ========== */
.nav-sub {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 5px;
    padding-bottom: 5px;
}

.category-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-link:hover {
    color: var(--white);
}

/* ========== HERO BANNER ========== */
.hero-carousel {
    margin: 20px 0;
    height: 340px;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.hero-slide-content {
    max-width: 500px;
}

.hero-slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-slide-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.badge-offer {
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

/* ========== MAIN CONTENT LAYOUT ========== */
.store-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin-top: 30px;
    padding-bottom: 80px;
}

/* ========== FILTERS SIDEBAR ========== */
.filters-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
}

.filter-checkbox:hover {
    color: var(--white);
}

/* ========== PRODUCT GRID ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-img {
    height: 160px;
    background: #25252b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

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

.card-img i {
    transition: var(--transition);
}

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

.card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
}

.card-installments {
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 12px;
}

.card-shipping {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add-cart {
    margin-top: 15px;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    width: 100%;
}

.btn-add-cart:hover {
    background: var(--white);
}

/* ========== CART SIDEBAR ========== */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1100;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: var(--transition);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: #25252b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

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

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
}

.cart-footer {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.btn-checkout {
    width: 100%;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 15px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1050;
    display: none;
}

.overlay.active {
    display: block;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .store-layout {
        grid-template-columns: 1fr;
    }
    .filters-sidebar {
        display: none;
    }
    .nav-main {
        gap: 15px;
    }
    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-link.hide-mobile, .nav-sub {
        display: none;
    }
    .hero-carousel {
        height: 200px;
        padding: 0 20px;
    }
    .hero-slide-content h2 {
        font-size: 1.5rem;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: var(--bg-dark);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 1.2rem;
}