/* ===== ESTILOS GENERALES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
       --primary-color: #228B22; /* Verde oliva */
    --primary-dark: #1a6b1a;
    --secondary-color: #ffb300;
    --text-dark: #333;
    --text-light: #666;
    --background-light: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Corrección de centrado */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto; /* Centrado horizontal */
    padding: 0 20px; /* Espacio lateral */
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact span {
    margin-right: 20px;
}

.header-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
}

.header-links a:hover {
    text-decoration: underline;
}

.header-main {
    padding: 15px 0;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-light);
}

.search-bar {
    flex: 1;
    max-width: 500px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: var(--white);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

.header-nav {
    background: var(--background-light);
    border-top: 1px solid #eee;
    overflow-x: auto;
}

.main-nav {
    display: flex;
    list-style: none;
    padding: 10px 0;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: nowrap;
}

.main-nav li {
    margin-right: 20px;
    white-space: nowrap;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

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

.btn-cta-nav {
    background: var(--secondary-color);
    padding: 6px 15px;
    border-radius: 20px;
    color: var(--text-dark) !important;
}

.btn-cta-nav:hover {
    background: #ffa000;
}

/* ===== HERO BANNER ===== */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1200');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.hero-features {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.feature-icon {
    background: var(--secondary-color);
    color: var(--text-dark);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* ===== SECCIÓN CATEGORÍAS ===== */
.section-categories {
    padding: 40px 0;
    background: var(--background-light);
}

#categorias .section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
}

.categories-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    justify-content: center;
}

/* Sidebar */
.categories-sidebar {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

/* Acordeón */
.accordion {
    margin-bottom: 15px;
}

.accordion-item {
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 12px 15px;
    background: var(--white);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    font-size: 0.95rem;
}

.accordion-header:hover {
    background: #f0f0f0;
}

.accordion-header.active {
    background: var(--primary-color);
    color: var(--white);
}

.accordion-icon {
    font-size: 1.2rem;
}

.accordion-arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 8px;
    background: #f9f9f9;
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Subcategorías */
.subcategory-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    transition: background 0.2s;
}

.subcategory-item:hover {
    background: #e0e0e0;
}

.subcategory-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.subcategory-item label {
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
}

/* Previsualización de imágenes */
.image-preview-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: var(--white);
    border-radius: var(--border-radius);
    min-height: 100px;
    border: 1px solid #ddd;
}

.image-preview-large .preview-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-preview-large img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.image-preview-large .remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.file-input-large {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    width: 100%;
    font-size: 0.9rem;
}

/* ===== CARRUSEL ===== */
.categories-main {
    width: 100%;
    overflow: visible;
    min-width: 0;
}

.product-carousel-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-carousel-section.active {
    display: block;
}

.carousel-header {
    margin-bottom: 20px;
    padding: 0 10px;
}

.carousel-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.carousel-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-carousel {
    position: relative;
    width: 100%;
    padding: 0 45px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 0;
}

.carousel-nav.next {
    right: 0;
}

/* Contenedor con scroll */
.carousel-track-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 15px 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.carousel-track-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-track-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.carousel-track-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 5px;
    align-items: stretch;
}

.product-card {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-body h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.product-specs {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

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

.btn-contact-product {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.btn-contact-product:hover {
    background: var(--primary-dark);
}

/* ===== CÓMO FUNCIONA ===== */
.section-how {
    padding: 60px 0;
    background: var(--white);
}

.how-header {
    text-align: center;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
}

.how-toggle-btn, .contact-toggle-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.how-toggle-btn:hover, .contact-toggle-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.how-content {
    transition: all 0.5s ease;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.step-item:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.step-item h3 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* ===== OPINIONES ===== */
.section-reviews {
    padding: 60px 0;
    background: var(--white);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.review-card {
    background: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.review-stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.review-text {
    margin-bottom: 15px;
    font-style: italic;
}

.review-author strong {
    display: block;
    color: var(--text-dark);
}

.review-author span {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== CONTACTO ===== */
.section-contact {
    padding: 60px 0;
    background: var(--background-light);
}

.contact-header {
    text-align: center;
    margin-bottom: 20px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.form-response {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    text-align: center;
    display: none;
}

.form-response.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-response.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* Mensaje de éxito */
.success-message {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

/* ===== FOOTER ===== */
.footer {
    background: #1a1a1a;
    color: #999;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3, .footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #999;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--white);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.footer-legal {
    font-size: 0.85rem;
    margin-top: 10px;
}

/* ===== NOTIFICACIONES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #4caf50;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
    font-weight: 500;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== RESPONSIVE (MÓVIL) ===== */

/* Rendimiento: diferir renderizado de secciones fuera de pantalla */
.section-how,
.section-reviews,
.section-contact,
.footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

@media (max-width: 900px) {
    .categories-layout {
        grid-template-columns: 1fr;
    }

    .categories-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-main-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .menu-toggle {
        display: flex;
        order: 4;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .product-carousel {
        padding: 0 35px;
    }
    
    .product-card {
        width: 240px;
        scroll-snap-align: start;
    }

    .carousel-track-container {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

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