/* HOME-CRITICAL.CSS - Essential styles only for initial render */
/* Target: ~3KB - Loaded synchronously to avoid render-blocking */

:root {
    --purple: #9b2d7d;
    --purple-light: #b8457a;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-text: #7a8794;
    --yellow: #F3E93F;
}

/* ========== BANNER CAROUSEL ========== */
.banner-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    min-height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--purple) 0%, #5a1f5c 100%);
}

.banner {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    text-align: center;
    color: var(--white);
    padding: 60px 40px;
}

.banner.active {
    opacity: 1;
}

.banner h1 {
    font-size: 60px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
}

.banner p {
    font-size: 19px;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.85);
    font-weight: 300;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.banner-btn {
    background-color: var(--white);
    color: var(--purple);
    padding: 15px 50px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.2);
    background-color: var(--yellow);
}

/* ========== STATS SECTION ========== */
.stats-section {
    background-color: var(--white);
    padding: 40px 60px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;   /* el título va arriba, centrado, y los números debajo */
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.stats-section .section-title {
    width: 100%;
    margin: 0 0 32px;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 120px;
    max-width: 1200px;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-number {
    font-size: 56px;
    font-weight: 700;
    color: var(--purple);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 15px;
    color: var(--gray-text);
    font-weight: 400;
    white-space: nowrap;
}

/* ========== HOW SECTION ========== */
.how-section {
    padding: 50px 60px;
    background-color: #fafbfc;
}

.section-title {
    text-align: center;
    font-size: 40px;
    color: #2c3e50;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--gray-text);
    margin-bottom: 35px;
    font-weight: 300;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.how-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.how-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(127,31,110,0.2);
}

.how-step h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.how-step p {
    font-size: 14px;
    color: var(--gray-text);
    font-weight: 300;
    line-height: 1.7;
}

/* ========== CATEGORY CARDS ========== */
.categories-section {
    padding: 50px 60px;
    background-color: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}

.category-card {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    color: var(--white);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(127,31,110,0.12);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(127,31,110,0.25);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.category-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
}

.category-card p {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
    line-height: 1.3;
}

/* ========== FEATURED PRODUCTS ========== */
.featured-products {
    padding: 50px 60px;
    background-color: #fafbfc;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1300px;
    margin: 0 auto 40px;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.product-image {
    font-size: 80px;
    text-align: center;
    padding: 40px 20px;
    background: var(--gray-light);
}

.product-info {
    padding: 20px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 16px;
}

.product-btn {
    width: 100%;
    padding: 12px;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: var(--purple-light);
    transform: scale(1.02);
}

.see-more-btn {
    display: inline-block;
    padding: 14px 40px;
    background: var(--purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.see-more-btn:hover {
    background: var(--purple-light);
    transform: translateY(-2px);
}

/* ========== TESTIMONIALS ========== */
.testimonials-section {
    padding: 50px 60px;
    background-color: var(--white);
}

.testimonials-title {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.testimonials-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--gray-text);
    margin-bottom: 25px;
}

.testimonials-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    max-width: 1300px;
    margin: 0 auto;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
}

@media (min-width: 1024px) {
    .testimonials-grid {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.testimonial-card {
    background: #fafbfc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 13px;
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ========== TABLET BREAKPOINT ========== */
@media (max-width: 768px) {
    .banner h1 {
        font-size: 40px;
    }

    .banner p {
        font-size: 16px;
    }

    .stats-grid {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 24px;
    }

    .stat-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .how-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-icon {
        font-size: 40px;
    }

    .how-step h3 {
        font-size: 15px;
    }

    .how-step p {
        font-size: 13px;
    }

    .featured-products,
    .how-section,
    .categories-section,
    .testimonials-section {
        padding: 30px 20px;
    }

    .section-title,
    .testimonials-title {
        font-size: 28px;
    }

    .testimonials-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .stats-section {
        padding: 30px 20px;
        min-height: auto;
    }
}

/* ========== MOBILE BREAKPOINT ========== */
@media (max-width: 480px) {
    .banner {
        padding: 30px 16px;
    }

    .banner h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .banner p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .banner-btn {
        padding: 10px 24px;
        font-size: 13px;
    }

    .stats-section {
        padding: 30px 16px;
        min-height: auto;
    }

    .stats-grid {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        align-items: flex-start;
    }

    .stat-item {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 !important;
    }

    .stat-divider {
        display: none !important;
    }

    .stat-number {
        font-size: 22px !important;
        height: auto !important;
        margin-bottom: 4px !important;
    }

    .stat-label {
        font-size: 10px !important;
        white-space: normal !important;
        line-height: 1.25;
    }

    .how-section,
    .categories-section,
    .featured-products,
    .testimonials-section {
        padding: 30px 16px;
    }

    .section-title,
    .testimonials-title {
        font-size: 18px !important;
        margin-bottom: 6px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        line-height: 1.3 !important;
    }

    .section-subtitle,
    .testimonials-subtitle {
        font-size: 11px !important;
        margin-bottom: 16px !important;
        font-weight: 300 !important;
        letter-spacing: 0.3px;
    }

    .product-name,
    .product-name-wrapper {
        font-size: 11px !important;
        margin-bottom: 3px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
    }

    .see-more-container {
        margin-top: 4px;
    }

    .see-more-btn {
        padding: 9px 18px !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        border-radius: 6px !important;
    }

    .product-price {
        font-size: 13px;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .product-btn {
        padding: 8px 12px;
        font-size: 11px;
        font-weight: 500;
    }

    .how-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .how-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .how-step h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .how-step p {
        font-size: 12px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .category-card {
        padding: 18px 12px !important;
        min-height: 96px !important;
    }

    .category-icon,
    .category-card-icon {
        font-size: 28px !important;
        margin-bottom: 6px !important;
    }

    .category-card h3,
    .category-card-name {
        font-size: 12px !important;
        margin-bottom: 0 !important;
        line-height: 1.2 !important;
    }

    .category-card p {
        display: none !important;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-image {
        min-height: 100px !important;
        max-height: 100px !important;
        padding: 20px 10px !important;
    }

    .product-info {
        padding: 8px !important;
    }

    .product-price {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .product-btn {
        padding: 6px !important;
        font-size: 10px !important;
    }

    .testimonials-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
    }

    .testimonial-card {
        padding: 12px !important;
        font-size: 11px !important;
        min-width: 240px !important;
        max-width: 240px !important;
        scroll-snap-align: start;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* ========== SCROLLING TEXT SECTION ========== */
.home-scrolling-text-section {
    padding: 8px 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.3;
    overflow: hidden;
}

/* En móvil forzamos el alto: el CMS manda el padding como estilo inline. */
@media (max-width: 768px) {
    .home-scrolling-text-section {
        padding: 6px 0 !important;
        font-size: 12px;
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .home-scrolling-text-section {
        padding: 4px 0 !important;
        font-size: 11px;
        font-weight: 400;
        line-height: 1.2;
    }
}

@media (max-width: 360px) {
    .home-scrolling-text-section {
        padding: 4px 0 !important;
        font-size: 10px;
        font-weight: 400;
        line-height: 1.2;
    }
}

/* ========== EXTRA SMALL MOBILE (360px and below) ========== */
@media (max-width: 360px) {
    .stat-number {
        font-size: 18px !important;
    }

    .stat-label {
        font-size: 9px !important;
    }

    .stats-grid {
        gap: 6px !important;
    }

    .how-grid {
        gap: 16px;
    }

    .how-icon {
        font-size: 32px;
    }

    .how-step h3 {
        font-size: 13px;
    }

    .how-step p {
        font-size: 11px;
    }
}
