:root {
    --bg-color: #050c1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #00d2ff;
    --text-color: #ffffff;
}

/* --- Base --- */
html, body {
    overflow-x: hidden;
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #050c1a 0%, #0a1f44 100%);
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* --- Header & Logo --- */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    flex-wrap: wrap;
}

.site-logo {
    height: 80px; /* Ajustado para não quebrar no mobile */
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 2.2rem;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
}

.logo span {
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-color);
    font-style: italic;
}

/* --- Layout Estrutural --- */
.main-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 210, 255, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
    z-index: 10;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-btn {
    width: 100%;
    text-align: left;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

#searchInput {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    color: white;
    border-radius: 25px;
    outline: none;
    box-sizing: border-box;
}

/* --- Grid de Produtos --- */
.product-grid {
    flex-grow: 1;
    display: grid;
    /* Notebook 14": 4 colunas equilibradas */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
}

/* --- Card de Produto --- */
.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s;
}

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

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.product-card h3 {
    font-size: 1.1rem;
    min-height: 2.5rem;
    margin: 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price {
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: auto;
    margin-bottom: 15px;
}

.buy-btn {
    background: #25d366;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

/* --- Responsividade Crítica (iPhone/Mobile) --- */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        padding: 10px;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        box-sizing: border-box;
    }

    .product-grid {
        /* No iPhone: 2 colunas se couber, senão 1 */
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 10px 0;
    }

    .logo-container {
        height: auto;
        padding: 10px;
    }

    .site-logo {
        height: 60px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-color), #005f73);
    border-radius: 10px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--accent-color);
    padding: 30px; border-radius: 20px;
    max-width: 500px; width: 90%;
    position: relative; text-align: center;
}

.close-btn {
    position: absolute; top: 10px; right: 20px;
    background: none; border: none; color: white;
    font-size: 30px; cursor: pointer;
}

.modal-description {
    margin: 20px 0; opacity: 0.8; line-height: 1.6;
}

.modal-price {
    font-size: 1.5rem; color: var(--accent-color);
    font-weight: bold; margin-bottom: 20px;
}