:root {
    --primary-color: #333;
    --secondary-color: #f4f4f4;
    --accent-color: #de323b;
    --text-color: #333;
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header y navegación */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2rem 0;
    position: relative;
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(34, 34, 34, 0.9);
    padding: 1rem 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
}

.logo-img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-light);
    transition: all 0.3s ease-in-out;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.bloom-effect {
    animation: bloom 2s ease-in-out;
}

@keyframes bloom {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.nombrerojo {
    color: var(--accent-color);
}

.explore-btn {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.explore-btn:hover {
    background-color: #b82730;
}

/* Productos */
.products {
    padding: 4rem 0;
    background-color: var(--text-light);
}

.products h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 calc(33.33% - 2rem);
    margin: 0 1rem;
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

.carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.carousel-item h3 {
    font-size: 1.2rem;
    margin: 1rem;
}

.carousel-item p {
    font-size: 0.9rem;
    margin: 0 1rem 1rem;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    z-index: 10;
}

.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

/* Contacto */
.contact {
    padding: 4rem 0;
    text-align: center;
}

.contact a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1100;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

body.loaded #preloader {
    display: none;
}

/* Media queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        padding: 1rem 0;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    #menu-toggle {
        display: block;
    }

    .carousel-item {
        flex: 0 0 calc(50% - 2rem);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    @media (max-width: 480px) {
        .hero h1 {
            font-size: 2.5rem;
        }
    
        .hero h2 {
            font-size: 1.5rem;
        }
    
        .carousel-item {
            flex: 0 0 calc(100% - 2rem);
        }
    
        .carousel-control {
            font-size: 1.5rem;
            padding: 0.3rem 0.8rem;
        }
    
        .explore-btn {
            padding: 0.6rem 1.5rem;
            font-size: 0.9rem;
        }
    }}
    /* STYLES.CSS OPTIMIZADO */

/* Variables y configuración base */
:root {
    --primary-color: #333;
    --secondary-color: #f4f4f4;
    --accent-color: #de323b;
    --text-color: #333;
    --text-light: #ffffff;
    --transition-speed: 0.3s;
    --spacing-unit: 1rem;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset y estilos base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Optimizaciones de rendimiento */
@media screen and (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

.container {
    width: min(90%, 1200px);
    margin-inline: auto;
    padding: var(--spacing-unit);
}

/* Utilidades */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header y navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(34, 34, 34, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* Sistema de Grid Moderno */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Carrusel */
.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.carousel-item {
    flex: 0 0 calc(33.33% - 2rem);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

/* Formulario de contacto */
.contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
        flex-direction: column;
        transform: translateY(-100%);
        transition: transform var(--transition-speed);
    }

    .nav-links.show {
        transform: translateY(0);
    }

    .carousel-item {
        flex: 0 0 calc(50% - 2rem);
    }
}

@media (max-width: 480px) {
    .carousel-item {
        flex: 0 0 100%;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #1a1a1a;
        --secondary-color: #2d2d2d;
        --text-color: #ffffff;
        --text-light: #ffffff;
    }
}
/* Variables y configuración base */
:root {
    --primary-color: #333;
    --secondary-color: #f4f4f4;
    --accent-color: #de323b;
    --text-color: #333;
    --text-light: #ffffff;
    --transition: all 0.3s ease;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* Reset y estilos base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

/* Utilidades */
.container {
    width: min(90%, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header y navegación */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(34, 34, 34, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
}

.logo-img {
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.explore-btn {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.explore-btn:hover {
    background-color: #b82730;
    transform: translateY(-2px);
}

/* Products Section */
.products {
    padding: 4rem 0;
    background-color: var(--text-light);
}

.carousel {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-container {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 calc(33.33% - 2rem);
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.carousel-item:hover {
    transform: translateY(-10px);
}

.carousel-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.carousel-item h3 {
    padding: 1rem;
    font-size: 1.25rem;
}

.carousel-item p {
    padding: 0 1rem 1rem;
    color: #666;
}

.product-btn {
    margin: 0 1rem 1rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.product-btn:hover {
    background-color: var(--accent-color);
    color: var(--text-light);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background-color: #f8f8f8;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(222, 50, 59, 0.2);
}

.submit-btn {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    /* ... (continuación del CSS anterior) */

.submit-btn:hover {
    background-color: #b82730;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-lightbox:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bloom {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    #menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }

    .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-light);
        margin: 5px 0;
        transition: var(--transition);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem 0;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .carousel-item {
        flex: 0 0 calc(50% - 2rem);
    }
}

@media (max-width: 480px) {
    .carousel-item {
        flex: 0 0 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Mejoras de rendimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
