:root {
    --primary: #7f00ff;
    --black: #0a0a0a;
    --dark-grey: #141414;
    --light-grey: #1f1f1f;
    --white: #ffffff;
    --text-muted: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--black);
    color: var(--white);
}

/* HEADER Y MENÚ */
header {
    background-color: var(--dark-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary);
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    padding: 0 15px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.25s, text-shadow 0.25s;
}

.nav-links a:hover {
    color: var(--primary);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 22px;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 12px;
}

/* CARRUSEL RECTANGULAR */
.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
}

.carousel {
    display: flex;
    width: 100%;
}

.slide {
    display: none;
    width: 100%;
}

.slide img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.slide.active {
    display: block;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
}

.next { right: 0; }
.prev { left: 0; }

/* GRILLA DE PRODUCTOS RESPONSIVE */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    margin-bottom: 20px;
    border-left: 5px solid var(--primary);
    padding-left: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
    width: 100%;
}

.product-card {
    background-color: #050505;
    border: 1px solid var(--light-grey);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(127, 0, 255, 0.2);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 12px;
    cursor: pointer;
}

.product-info {
    padding: 10px 0;
}

.price {
    color: var(--primary);
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
}

.btn-add {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-add:hover {
    background-color: #6600cc;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: var(--dark-grey);
    margin: 15% auto;
    padding: 30px;
    border: 2px solid var(--primary);
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
}

/* CARRITO LATERAL */
.sidebar-cart {
    position: fixed;
    right: -350px;
    top: 0;
    width: 320px;
    height: 100%;
    background-color: var(--dark-grey);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 150;
    transition: right 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-cart.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 10px;
}

.close-cart { cursor: pointer; }

#cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    background: var(--light-grey);
    padding: 10px;
    border-radius: 5px;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
    }
}

