:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --accent-color: #ffe66d;
    --font-main: 'Outfit', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(15px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1rem 0;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    margin-left: 2rem;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/fondo.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: white;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Categories Filter */
.categories-filter {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 2rem auto 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.cat-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    background: white;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Products Grid */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-img-container {
    height: 250px;
    overflow: hidden;
    background: #fdf2f2;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #fff5f5;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.product-price {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.product-no-img {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    color: #aaa;
}

.product-desc {
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.stock-info {
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stock-info.available {
    color: #2ecc71;
}

.stock-info.out {
    color: #e74c3c;
}

.empty-category-msg {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
    color: #636e72;
}

/* Info Sections */
.info-section {
    padding: 5rem 0;
    background: white;
    border-radius: 30px;
    margin-bottom: 5rem;
    box-shadow: var(--shadow);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.map-container {
    margin-top: 2rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 350px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/* Carrito Flotante */
.cart-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    cursor: pointer;
    z-index: 2000;
    transition: var(--transition);
}

.cart-floating-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--dark-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* Panel del Carrito */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f5f6fa;
    padding-bottom: 1rem;
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
    color: #636e72;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.cart-item-info p {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
}

.cart-footer {
    padding-top: 2rem;
    border-top: 2px solid #f5f6fa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* Botón Añadir al Carrito en Card */
.btn-add {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
    background: #fff5f5;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--primary-color);
    color: white;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-contact-nav {
    padding: 0.6rem 1.5rem;
    margin-left: 2rem;
}

.btn-whatsapp {
    background: #25d366 !important;
    border: none !important;
}

.btn-whatsapp:hover {
    background: #20b358 !important;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3) !important;
}

.btn-full-width {
    width: 100%;
}

.btn-disabled {
    background: #eee !important;
    color: #aaa !important;
    cursor: not-allowed !important;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    display: block;
}

.footer-contact {
    margin: 2rem 0;
    color: #b2bec3;
}

.footer-copy {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 2rem;
}

.whatsapp-container {
    margin-top: 2rem;
}

.cart-item-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.btn-delete-item {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete-item:hover {
    transform: scale(1.2);
    color: #ff4747;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.4rem;
        width: 100%;
    }

    nav a {
        margin: 0 !important;
        font-size: 0.9rem;
    }

    .btn-contact-nav {
        margin: 0 !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

.badge-preorder {
    font-size: 0.7rem;
    background: #ff9f43;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 800;
}