* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body { background: #0a0a0a; color: #e5e5e5; }

/* HEADER Y NAV */
header { background: #111; padding: 30px; text-align: center; border-bottom: 2px solid #c9a44c; }
header h1 { color: #c9a44c; text-transform: uppercase; letter-spacing: 2px; }

nav { background: #0f0f0f; position: sticky; top: 0; z-index: 100; }
nav ul { display: flex; justify-content: center; list-style: none; }
nav li { margin: 15px; }
nav a { color: #aaa; text-decoration: none; font-weight: bold; transition: 0.3s; }
nav a:hover { color: #c9a44c; }

/* LAYOUT PRINCIPAL */
.main-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    padding: 40px;
}

/* PRODUCTOS */
.contenedor-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.producto {
    background: #121212;
    padding: 15px;
    border-radius: 15px;
    border: 1px solid #2a2a2a;
    transition: 0.3s;
    text-align: center;
}

.producto:hover { border-color: #c9a44c; transform: translateY(-5px); }
.producto img { width: 100%; border-radius: 10px; margin-bottom: 10px; }
.producto h3 { font-size: 0.9em; min-height: 40px; }
.precio { color: #c9a44c; font-weight: bold; margin: 10px 0; }

.btn-comprar {
    background: #c9a44c; border: none; padding: 10px; width: 100%;
    border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s;
}

.btn-comprar:hover { background: #e6c76b; }

/* CARRITO */
.carrito-sidebar {
    background: #111;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #c9a44c;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding: 10px 0;
    font-size: 0.85em;
}

.total-compra { margin-top: 20px; border-top: 2px solid #c9a44c; padding-top: 10px; }
.btn-finalizar {
    background: #28a745; color: white; border: none; width: 100%;
    padding: 12px; border-radius: 8px; margin-top: 15px; cursor: pointer; font-weight: bold;
}

.btn-vaciar {
    background: transparent; color: #ff4444; border: 1px solid #ff4444;
    width: 100%; padding: 8px; border-radius: 8px; margin-top: 10px; cursor: pointer;
}

footer { text-align: center; padding: 20px; background: #111; color: #777; margin-top: 40px; }

/* Responsive */
@media (max-width: 900px) {
    .main-container { grid-template-columns: 1fr; }
}