/* ======================================================
   HERO CAROUSEL
====================================================== */
.home-page .hero-carousel-container,
.home-page .hero-carousel,
.home-page .hero-carousel .carousel-inner,
.home-page .hero-carousel .carousel-item {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: 700px;
    min-height: 520px;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    overflow: hidden;
    background: #111 !important;
}

.home-page .hero-image {
    width: 100vw !important;
    height: 700px !important;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0 !important;
    background: #111 !important;
}

.home-page .carousel-overlay {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100%;
    background: linear-gradient(
        to top right,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.home-page .hero-caption {
    position: absolute;
    z-index: 2;
    right: 60px; /* ✅ dentro del hero */
    bottom: 80px; /* ✅ dentro del hero */
    max-width: 600px;
    text-align: right;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.home-page .hero-title {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 12px;
    text-transform: uppercase;
    animation: slideInRight 0.8s;
    color: #fff !important; /* ✅ ESTE ERA EL FALTA */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.85);
}

.home-page .hero-desc {
    font-size: 1.15rem;
    margin-bottom: 20px;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    animation: slideInRight 1s;
    color: #fff !important;
}

.home-page .btn-hero {
    background: var(--orange, #ff7428);
    color: #fff;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    border: none;
    transition: 0.2s;
}
.home-page .btn-hero:hover {
    background: #fff;
    color: var(--orange, #ff7428);
    text-decoration: none;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE HERO ===== */
@media (max-width: 991px) {
    .home-page .hero-carousel-container,
    .home-page .hero-carousel,
    .home-page .hero-carousel .carousel-inner,
    .home-page .hero-carousel .carousel-item,
    .home-page .hero-image {
        height: 350px !important;
        min-height: 260px !important;
    }

    .home-page .hero-caption {
        right: 16px !important;
        left: auto !important;
        bottom: 18px !important;
        top: auto !important;
        max-width: 85% !important;
        text-align: right !important;
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .home-page .hero-title {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
        color: #fff !important;
    }

    .home-page .hero-desc {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
        color: #fff !important;
    }

    .home-page .btn-hero {
        font-size: 0.95rem !important;
        padding: 8px 14px !important;
    }
}

@media (max-width: 600px) {
    .home-page .hero-carousel-container,
    .home-page .hero-carousel,
    .home-page .hero-carousel .carousel-inner,
    .home-page .hero-carousel .carousel-item,
    .home-page .hero-image {
        height: 300px !important;
        min-height: 160px !important;
    }

    .home-page .hero-caption {
        right: 12px !important;
        left: auto !important;
        bottom: 38px !important;
        max-width: 85% !important;
        text-align: right !important;
        align-items: flex-end !important;
    }

    .home-page .hero-title {
        font-size: 1.15rem !important;
        color: #fff !important;
    }

    .home-page .hero-desc {
        font-size: 0.9rem !important;
        color: #fff !important;
    }

    .home-page .btn-hero {
        font-size: 0.9rem !important;
        padding: 7px 12px !important;
    }
}

/* ======================================================
   SECTIONS TITLES / SPACING
====================================================== */

.home-page .section-title {
    font-weight: 800;
    color: #111827;
}

.home-page .section-divider {
    height: 3px;
    width: 40px;
    background: var(--orange, #ff7428);
    border-radius: 99px;
    margin: 8px 0 18px;
}

@media (max-width: 575px) {
    .home-page .section-title {
        margin-top: 14px !important;
        margin-bottom: 6px !important;
        font-size: 1.15rem !important;
        line-height: 1.2 !important;
        text-align: center;
    }

    .home-page .section-title.mt-5,
    .home-page .section-title.mt-4 {
        margin-top: 14px !important;
    }

    .home-page .section-divider {
        margin: 4px auto 10px !important;
    }

    .home-page .products-row {
        margin-bottom: 10px !important;
    }
}

/* ======================================================
   CATEGORY SCROLL (MENÚ GENERAL)
====================================================== */
.home-page .category-scroll-container {
    overflow-x: auto;
    padding: 6px 0 10px;
    margin-bottom: 10px;
}

.home-page .category-scroll {
    display: inline-flex;
    gap: 10px;
    white-space: nowrap;
}

.home-page .cat-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: 0.2s;
}

.home-page .cat-btn.active {
    background: var(--orange, #ff7428);
    color: #fff;
    border-color: var(--orange, #ff7428);
    box-shadow: 0 6px 14px rgba(255, 116, 40, 0.25);
}

/* ======================================================
   PRODUCT CARD (tu diseño)
====================================================== */
.home-page .product-card {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
    transition: 0.2s;
}

.home-page .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
}

@media (max-width: 575px) {
    .home-page .product-card:active {
        transform: scale(0.98);
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
    }
}

/* Imagen */
.home-page .prod-img-container {
    position: relative !important;
    width: 100% !important;
    height: 230px;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 14px 14px 0 0 !important;
}

.home-page .prod-img {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

@media (max-width: 991px) {
    .home-page .prod-img-container {
        height: 200px;
    }
}
@media (max-width: 575px) {
    .home-page .prod-img-container {
        height: 140px !important;
    }
}

/* Body de la card */
.home-page .prod-details-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    height: auto; /* ✅ evita inflar altura */
}

.home-page .prod-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.home-page .prod-desc {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 10px;
    min-height: 36px;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* Corta el texto en la 2da línea */
    -webkit-box-orient: vertical;
    overflow: hidden; /* Oculta el resto del texto */
    text-overflow: ellipsis;
}

.home-page .price-box {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
}

.home-page .price-main {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
}

.home-page .price-old {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: var(--orange, #ff7428);
    opacity: 0.8;
}

/* botón agregar */
.home-page .btn-add {
    width: 100%;
    margin-top: 12px;
    background: var(--orange, #ff7428);
    color: #fff;
    border: none;
    padding: 11px 0;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px 0 14px 14px;
    gap: 6px;
    box-shadow: 0 10px 26px rgba(255, 116, 40, 0.45);
    cursor: pointer;
    transition: 0.15s;
}

.home-page .btn-add:hover {
    background: #fff;
    color: var(--orange, #ff7428);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

@media (max-width: 575px) {
    .home-page .prod-details-body {
        padding: 8px 10px !important;
    }
    .home-page .prod-title {
        font-size: 0.92rem !important;
    }
    .home-page .prod-desc {
        font-size: 0.8rem !important;
        min-height: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
    .home-page .btn-add {
        margin-top: 8px !important;
        padding: 8px 0 !important;
        font-size: 0.88rem !important;
        border-radius: 14px 0 14px 14px;
    }
}

/* Badges */
.home-page .badge-offer {
    position: absolute;
    left: -1px;
    top: -1px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0 0 14px 0;
    color: #fff;
    background: var(--orange, #ff7428);
    z-index: 3;
}

.home-page .prod-chip {
    position: absolute;
    right: 1px;
    bottom: 0;
    padding: 6px 12px;
    border-radius: 14px 0 0 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: #fff;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    z-index: 2;
}

/* Favorito */
.home-page .btn-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(17, 24, 39, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    color: #fff !important; /* Fuerza el color blanco */
    transition: all 0.2s ease;
}

/* Estado LIKEADO (Cuando tiene la clase .liked) */
.home-page .btn-favorite.liked {
    background: rgba(17, 24, 39, 0.25);
    color: #ff0000 !important; /* Corazón rojo */
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.home-page .btn-favorite.liked i {
    transform: scale(1.05); /* Un pelín más grande */
}

/* Opcional: Efecto al pasar el mouse (Hover) */
.home-page .btn-favorite:hover {
    background: #fff;
    color: var(--orange, #ff7428) !important; /* Se pone naranja al tocarlo */
    background: rgba(17, 24, 39, 0.25);
    position: absolute;
    pointer-events: auto;
}

/* ======================================================
   INFO CARDS
====================================================== */
.home-page .info-cards-row {
    display: flex;
    gap: 20px;
    margin: 0 auto 42px;
    justify-content: center;
    flex-wrap: wrap;
}

.home-page .info-card {
    background: #fff;
    padding: 27px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
    min-width: 180px;
    max-width: 280px;
    flex: 1 1 220px;
    transition: 0.2s;
}
.home-page .info-card:hover {
    box-shadow: 0 16px 40px rgba(255, 116, 40, 0.12);
    transform: translateY(-3px) scale(1.015);
}
.home-page .card-icon {
    font-size: 2.3rem;
    margin-bottom: 14px;
    color: var(--orange, #ff7428);
}
.home-page .info-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.home-page .info-card p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}
@media (max-width: 991px) {
    .home-page .info-cards-row {
        flex-direction: column;
        gap: 12px;
        margin: 20px 0;
    }
    .home-page .info-card {
        max-width: 100%;
        padding: 18px 12px;
    }
}

/* ======================================================
   SWEET ALERT TOAST (HOME)
====================================================== */
.home-page .swal2-toast-custom {
    font-size: 0.85rem !important;
    border-radius: 10px !important;
    padding: 0.6rem 0.9rem !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18) !important;
}
.home-page .swal2-toast-custom .swal2-title {
    margin: 0 !important;
    font-weight: 700 !important;
}

/* ======================================================
   BACK TO TOP
====================================================== */
.home-page .back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: none;
    background: var(--orange, #ff7428);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s;
}
.home-page .back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ======================================================
   FIX MOBILE CARDS SIZE + SPACING (HOME)
   deja las cards compactas como antes
====================================================== */
@media (max-width: 575px) {
    /* 1) menos aire entre columnas y filas */
    .home-page .products-row {
        margin-left: -6px !important;
        margin-right: -6px !important;
        row-gap: 10px !important; /* menos separación vertical */
    }

    .home-page .products-row > [class*="col-"] {
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-bottom: 0 !important; /* mata el mb-4 visualmente */
    }

    /* 2) card más bajita */
    .home-page .product-card {
        border-radius: 12px;
    }

    /* 3) imagen más baja */
    .home-page .prod-img-container {
        height: 120px !important; /* compacto */
    }

    /* 4) cuerpo más compacto */
    .home-page .prod-details-body {
        padding: 8px 10px !important;
        gap: 0;
    }

    .home-page .prod-title {
        font-size: 0.9rem !important;
        margin-bottom: 3px !important;
        line-height: 1.1 !important;
    }

    .home-page .prod-desc {
        font-size: 0.78rem !important;
        margin-bottom: 5px !important;
        line-height: 1.2 !important;

        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* 5) precios más pequeños */
    .home-page .price-main {
        font-size: 0.92rem !important;
    }
    .home-page .price-old {
        font-size: 0.75rem !important;
    }

    /* 6) botón agregar más bajito */
    .home-page .btn-add {
        margin-top: 7px !important;
        padding: 7px 0 !important;
        font-size: 0.85rem !important;
        border-radius: 10px;
        box-shadow: 0 6px 16px rgba(255, 116, 40, 0.35);
        border-radius: 14px 0 14px 14px;
    }
}

/* =========================================
   TITULOS A LA IZQUIERDA + SIN RAYITA (MOBILE)
========================================= */
@media (max-width: 575px) {
    /* Títulos alineados a la izquierda */
    .home-page .section-title {
        text-align: left !important;
        margin-left: 2px; /* mini ajuste */
    }

    /* Quitamos la rayita/divider */
    .home-page .section-divider {
        display: none !important;
    }
}

/* =========================================
   BACK TO TOP MAS SEPARADO DERECHA
========================================= */
.back-to-top {
    right: 28px !important;
    bottom: 18px !important;
}

@media (max-width: 575px) {
    .back-to-top {
        right: 35px !important;
        bottom: 20px !important;
    }
}

/* ===== INFO CARDS BIEN COMPACTAS EN MOVIL ===== */
@media (max-width: 575px) {
    /* la fila en columna, sin que las cards crezcan */
    .info-cards-row {
        flex-direction: column !important;
        gap: 8px !important;
        margin: 8px 0 14px !important;
        align-items: center !important;
    }

    /* card más bajita y sin “estirarse” por flex */
    .info-card {
        flex: 0 0 auto !important; /* NO crecer */
        width: 100% !important; /* un pelín más angosta */
        max-width: 380px !important;
        padding: 30px 30px !important; /* menos alto */
        border-radius: 12px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .card-icon {
        font-size: 1.5rem !important;
        margin-bottom: 4px !important;
        line-height: 1 !important;
    }

    .info-card h3 {
        font-size: 0.9rem !important;
        margin: 0 0 4px 0 !important;
        line-height: 1.2 !important;
    }

    .info-card p {
        font-size: 0.78rem !important;
        margin: 0 !important; /* quita aire extra */
        line-height: 1.25 !important;
    }
}

/* ===== MENOS ESPACIO A LOS LADOS EN HOME (MÓVIL) ===== */
@media (max-width: 575px) {
    /* 1) Quita padding fuerte del container solo en home */
    .home-page .container {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* 2) Reduce gutters laterales del row */
    .home-page .products-row {
        margin-left: -4px !important;
        margin-right: -4px !important;
    }

    /* 3) Reduce padding de cada columna (col-6) */
    .home-page .products-row > div[class*="col-"] {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}

/* ===========================
   WHATSAPP FLOAT GLOBAL (con show)
=========================== */
.whatsapp-float {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
        opacity 0.2s ease, visibility 0.2s ease;
    text-decoration: none !important;

    /* oculto por defecto */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.whatsapp-float.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-float i {
    font-size: 1.35rem;
    line-height: 1;
}

/* Hover desktop */
.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.3);
    background: #1ebe5a;
    color: #fff !important;
}

/* Mobile tweak */
@media (max-width: 575px) {
    .whatsapp-float {
        left: 35px;
        bottom: 20px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-float i {
        font-size: 1.2rem;
    }
}
