/* ===== HardPC | CSS Industrial ===== */
body, h1, h2, h3, h4, h5, h6, p, ul, li, div, span, a, input, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
}

body {
    background-color: #f2f2f2;
}

/* ===== HEADER ===== */
header {
    background-color: #000;
    color: #fff;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #00ff99;
}

.search-container input {
    width: 300px;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    outline: none;
}

.header-actions {
    display: flex;
    gap: 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: #111;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
    padding: 10px 30px;
}

.nav-item {
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.nav-item:hover {
    text-decoration: underline;
}

/* ===== LAYOUT ===== */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 30px auto;
    gap: 20px;
    padding: 0 20px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    height: fit-content;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s, color 0.2s;
}

.category-item:hover {
    background-color: #f0f0f0;
    color: #00aa66;
}

/* ===== MAIN / PRODUCTS GRID ===== */
.catalog {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.product-image {
    height: 160px;
    border-radius: 4px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
}

.product-title {
    font-size: 14px;
    margin-bottom: 8px;
    flex: 1;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-stock {
    font-size: 14px;
    margin-bottom: 8px;
}

.product-stock.agotado {
    color: #cc0000;
    font-weight: bold;
}

/* ===== BUTTONS ===== */
.add-to-cart-btn {
    padding: 10px;
    background-color: #00aa66;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #008855;
}

.add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    color: #666;
}

/* ===== FOOTER ===== */
footer {
    margin-top: 50px;
    padding: 30px;
    background-color: #000;
    color: #aaa;
    text-align: center;
    font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
