:root {
    --primary: #1a1a1a;
    --accent: #ff4757;
    --text: #333;
    --light: #f4f4f4;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&q=80&w=1920') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* Buscador en Header */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--accent);
}

.search-bar-header {
    position: absolute;
    right: 40px;
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
    background: var(--white);
    border-radius: 50px;
}

.search-bar-header.active {
    width: 250px;
    border: 1px solid var(--light);
    padding: 5px 15px;
}

.search-bar-header input {
    width: 100%;
    border: none;
    outline: none;
    padding: 8px;
    font-size: 0.9rem;
}

/* Products */
.section-title {
    text-align: center;
    margin: 80px 0 40px;
    font-size: 2.5rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    height: 350px;
    width: 100%;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover img {
    scale: 1.1;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
}

.price {
    color: var(--accent);
    font-weight: 800;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 15px;
}

/* Contact */
.contact {
    margin-bottom: 80px;
}

.contact-card {
    background: var(--light);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

#contact-form input, #contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
}

#contact-form textarea {
    height: 150px;
}

/* Footer */
/* Carrito Lateral (Sidebar) */
.cart-modal {
    display: none; /* Se activa con JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cart-content {
    background-color: var(--white);
    position: fixed;
    right: -400px; /* Escondido a la derecha */
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 30px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    display: block;
}

.cart-modal.active .cart-content {
    right: 0; /* Aparece deslizándose */
}

.close-cart {
    font-size: 2.5rem;
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 20px;
}

#cart-items-list {
    flex-grow: 1;
    margin: 20px 0;
    overflow-y: auto;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--light);
}

.cart-total {
    text-align: right;
    font-size: 1.5rem;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid var(--primary);
}

.btn-whatsapp {
    width: 100%;
    margin-top: 20px;
    background: #25d366;
    font-size: 1.1rem;
}

.btn-whatsapp:hover {
    background: #128c7e;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Estilo para que el icono del carro sea clickeable */
.cart-icon {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--accent);
}

footer {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

/* Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}
