/* ================================================================
   public/assets/css/home/inicio.css
   Estilos para el módulo de inicio (Carrusel y secciones)
   ================================================================ */

/* Ocultar barra de scroll (scroll invisible) */
body::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;  /* IE y Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ── Carrusel Principal ── */
#homeCarousel {
    width: 100%;
    margin: 0;
    padding: 0;
}

.carousel-image-placeholder {
    height: 500px;
    background-color: #e30613; /* Rojo Rosver por defecto */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Efecto de sombra para que el texto resalte sobre la imagen */
.carousel-image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
}

.carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    left: 8%; /* Alineado fuertemente a la izquierda como en tu imagen */
    right: auto;
    padding-bottom: 0;
    z-index: 10;
    text-align: left;
}

.carousel-title {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    margin-bottom: 0.5rem;
    max-width: 600px;
    line-height: 1.1;
}

.carousel-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.carousel-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.carousel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.carousel-btn-custom {
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
    transition: filter 0.2s, transform 0.2s;
}

.carousel-btn-custom:hover {
    color: #fff;
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-primary-orange {
    background-color: #ff6600; /* Color Naranja */
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-orange:hover {
    background-color: #e65c00;
    color: #fff;
    transform: translateY(-2px);
}

/* Flechas de navegación (Blancas) */
.carousel-arrow-icon {
    color: #ffffff; /* Blanco */
    font-size: 3.5rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.6); /* Sombra oscura para contraste */
}
.carousel-control-prev, .carousel-control-next {
    width: 8%;
    opacity: 1;
}

/* Indicadores inferiores (Líneas) */
.carousel-indicators [data-bs-target] {
    width: 40px; /* Ancho para formar una línea */
    height: 5px; /* Altura de la línea */
    border-radius: 2px; /* Ligeramente redondeado en las puntas */
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 5px;
}
.carousel-indicators .active {
    background-color: #ffffff; /* Blanco sólido cuando está activo */
}

/* ── Sección de Calidad y Servicios ── */
.home-services-section {
    background-color: #ffffff;
    border-top: 1px solid #eee;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #222;
    font-size: 2.2rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* ================================================================
   RESPONSIVE MÓVIL
   ================================================================ */
@media (max-width: 768px) {
    .carousel-image-placeholder {
        height: 350px;
    }
    .carousel-title {
        font-size: 2rem;
    }
    .carousel-caption {
        left: 5%;
        right: 5%;
        text-align: center !important;
    }
    .carousel-image-placeholder::after {
        background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    }
}

/* =========================================
   Carrusel de Categorías (Horizontal Scroll)
   ========================================= */

.categorias-section {
    background-color: #ffffff;
    overflow: hidden;
}

.categorias-section .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.categorias-section .section-title {
    text-align: center;
    width: 100%;
}

/* Carrusel centrado en el viewport */
.categorias-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 3.25rem;
    box-sizing: border-box;
}

.categorias-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    justify-content: center;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categorias-viewport::-webkit-scrollbar {
    display: none;
}

.categorias-wrapper {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
    padding: 20px 12px;
    margin: 0 auto;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tarjeta de Categoría (Mismo Tamaño para todas) */
.categoria-card {
    flex: 0 0 280px; /* Ancho fijo idéntico para TODAS */
    height: 320px; /* Alto fijo idéntico para TODAS */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06); /* Sombra elegante por defecto */
    border: 1px solid #f0f0f0;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

/* Toque "Rosver" al hacer Hover */
.categoria-card:hover {
    transform: translateY(-8px); /* Elevación suave */
    box-shadow: 0 15px 30px rgba(227, 6, 19, 0.15); /* Sombra difuminada roja */
    border-color: rgba(227, 6, 19, 0.4); /* Borde sutil rojo */
}

/* Contenedor de la Imagen */
.categoria-img-container {
    height: 75%; /* La imagen ocupará el 75% del alto */
    width: 100%;
    background-color: #f8fafc;
    overflow: hidden;
}

.categoria-img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e2e8f0; /* Color gris si no carga la imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease; /* Transición lenta y suave para el zoom */
}

/* Efecto zoom in en la imagen al hacer hover en la tarjeta */
.categoria-card:hover .categoria-img-placeholder {
    transform: scale(1.08);
}

/* Texto inferior de la Categoría */
.categoria-info {
    height: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
    z-index: 2; /* Para quedar encima de la imagen si se necesita */
}

.categoria-nombre {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.categoria-card:hover .categoria-nombre {
    color: #e30613; /* El texto se pinta de rojo Rosver al pasar el ratón */
}

/* Flechas Flotantes de Navegación */
.cat-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #007bff; /* Azul como en tu referencia, cambia en hover */
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.cat-nav-btn:hover {
    background: #e30613; /* Rojo Rosver al hacer hover */
    color: #ffffff;
    border-color: #e30613;
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* Ocultar las flechas en móviles porque es más natural deslizar con el dedo */
@media (max-width: 768px) {
    .categorias-carousel {
        padding: 0 0.5rem;
    }

    .categoria-card {
        flex: 0 0 240px;
        height: 280px;
    }

    .categorias-wrapper {
        justify-content: flex-start;
        gap: 16px;
        padding: 16px 8px;
    }

    .categorias-viewport {
        justify-content: flex-start;
    }

    .cat-nav-btn {
        display: none;
    }
}

/* =========================================
   Separador Rosver Único
   ========================================= */
.rosver-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto; /* Espacio debajo del separador */
    width: 80%; /* Ocupa el 80% del contenedor */
    max-width: 350px; /* Que no sea demasiado largo en PC */
}

/* Las líneas degradadas */
.rosver-separator .line {
    flex: 1; /* Toman el espacio restante */
    height: 3px;
    background: linear-gradient(90deg, rgba(227,6,19,0) 0%, rgba(227,6,19,1) 100%);
    border-radius: 3px;
}

/* La segunda línea tiene el degradado invertido */
.rosver-separator .line:last-child {
    background: linear-gradient(90deg, rgba(227,6,19,1) 0%, rgba(227,6,19,0) 100%);
}

/* El pequeño rombo central */
.rosver-separator .dot {
    width: 10px;
    height: 10px;
    background-color: #e30613;
    margin: 0 15px;
    transform: rotate(45deg); /* Gira el cuadrado para hacerlo rombo */
    box-shadow: 0 0 8px rgba(227,6,19,0.5); /* Sombra brillante roja */
}

/* =========================================
   Grilla de Productos Destacados
   ========================================= */

.productos-section {
    background-color: #fafbfd; /* Fondo muy suave para que resalten las tarjetas blancas */
}

/* Tarjeta de Producto */
.producto-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer; /* Indicar que es clickeable */
}

/* El toque Rosver: Sombra difuminada roja y flotación al pasar el cursor */
.producto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(227, 6, 19, 0.12); /* Sombra roja sutil */
    border-color: rgba(227, 6, 19, 0.3); /* Borde rojizo sutil */
}

/* Contenedor de la Imagen */
.producto-img-container {
    height: 220px;
    overflow: hidden;
    background-color: #ffffff; /* Fondo blanco detrás de la imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative; /* Para la etiqueta absoluta */
}

/* Etiqueta de Oferta Saga/Falabella Premium */
.producto-tag-oferta {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e30613; /* Rojo Rosver */
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
    z-index: 10;
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* Micro-animación al pasar el mouse por la tarjeta */
.producto-card:hover .producto-tag-oferta {
    transform: scale(1.05);
}

/* La imagen */
.producto-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que la imagen no se recorte, igual al pantallazo */
    transition: transform 0.4s ease;
}

/* Zoom elegante a la imagen al hacer hover en la tarjeta */
.producto-card:hover .producto-img {
    transform: scale(1.06);
}

/* Información del producto (Textos y Precios) */
.producto-info {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Ocupa el espacio restante para que el footer baje */
    background: #ffffff;
}

/* Título */
.producto-titulo {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 8px;
    /* Truncar texto si es muy largo (máximo 2 líneas) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* El título se vuelve rojo al hacer hover */
.producto-card:hover .producto-titulo {
    color: #e30613;
}

/* Descripción */
.producto-desc {
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.4;
    /* Truncar texto (máximo 2 líneas) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Marca del producto */
.producto-marca {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    margin-bottom: 4px;
}

/* Estrellas de calificación */
.producto-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
}
.producto-rating .rating-count {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 4px;
}

/* Precio Principal (Rojo fuerte y grande) */
.producto-precio-principal {
    color: #e30613;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    margin-top: auto; /* Empuja siempre el precio hacia el fondo si el título o texto son cortos */
}

/* Sección de precios por mayor (Línea punteada encima) */
.producto-precios-mayor {
    border-top: 1px dashed #cbd5e1;
    padding-top: 12px;
}

/* Filas de precios al por mayor */
.precio-escala {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

/* Etiqueta de cantidad al por mayor (Ej: 10 Unid, Caja de 200) */
.precio-escala strong {
    font-weight: 700;
    color: #0f172a;
}

/* =========================================
   Paginación Rosver (Flechas y Hojas)
   ========================================= */

.rosver-pagination {
    gap: 5px; /* Espacio entre los botones */
}

/* Estilo base de los botones de hoja */
.rosver-pagination .page-link {
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* Cuadros redondeados modernos */
    font-weight: 600;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Hover: Se pintan con el borde rojo y texto rojo */
.rosver-pagination .page-link:hover {
    background-color: #fff1f1;
    color: #e30613;
    border-color: #e30613;
}

/* Botón Activo (La hoja actual): Fondo completamente rojo */
.rosver-pagination .page-item.active .page-link {
    background-color: #e30613;
    border-color: #e30613;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(227, 6, 19, 0.25); /* Sombra roja para el activo */
}

/* Botón deshabilitado (Ej: Flecha atrás cuando estás en la hoja 1) */
.rosver-pagination .page-item.disabled .page-link {
    color: #cbd5e1;
    background-color: #f8fafc;
    border-color: #f1f5f9;
    box-shadow: none;
}
