/* Fondo general para la página de inicio */
html, body {
    min-height: 100%;
    background: linear-gradient(135deg, #c5d4f3 0%, #cadaff 40%, #fdf6ff 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
}

/* ---------- BANNERS FULL WIDTH (RESPONSIVO, SIN DEFORMAR) ---------- */
#carouselExample{
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#carouselExample .carousel-inner{
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Altura responsiva: baja en mobile, sube en desktop */
#carouselExample .carousel-item{
  height: clamp(260px, 55vh, 800px) !important;
}

#carouselExample .carousel-item > img.banner-img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;        /* mantiene el estilo, pero recorta */
  object-position: center !important;
}

/* Extra: en teléfonos, un poco menos alto todavía */
@media (max-width: 576px){
  #carouselExample .carousel-item{
    height: 50vh !important;
    max-height: 520px !important;
  }
}


/* ---------- PRODUCTOS DESTACADOS (IMÁGENES BASE) ---------- */
/* Versión base, luego se sobreescribe más abajo con la versión final */
.productos-destacados img {
    width: 280px;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.productos-destacados img:hover {
    transform: scale(1.2);
}

/* ---------- LOGO FLOTANTE ---------- */
.logo-flotante {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 20;
    width: 80px;
    height: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-flotante img {
    width: 100%;
    height: auto;
}

.logo-flotante:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ---------- CATEGORÍAS ---------- */
.categorias img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ccc;
    padding: 0px;
    display: block;
    margin: auto;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.categorias a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.categorias img:hover {
    transform: scale(1.2);
}

.categorias h3,
.productos-destacados h3,
.ofertas h3 {
    font-family: 'Nerko One', cursive;
    font-size: 2rem;
    text-align: center;
}

.categorias p,
.productos-destacados p,
.ofertas p {
    font-family: 'Nerko One', cursive;
    font-size: 1.5rem;
    text-align: center;
}

/* ---------- LÍNEA DE PROMOCIÓN ---------- */
.linea-promocion {
    width: 100%;
    overflow: hidden;
    background-color: #f7e6ff;
    padding: 10px 0;
    text-align: center;
}

.linea-promocion p {
    display: inline-block;
    white-space: nowrap;
    font-size: 1.2rem;
    color: #ff007f;
    animation: desplazamiento 15s linear infinite;
}

.icono-nueva-coleccion {
    width: 130px;
    margin-right: 10px;
    vertical-align: middle;
}

.icono-oferta-especial {
    width: 50px;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes desplazamiento {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.separador {
    display: inline-block;
    width: 100px;
}

.precio-original {
    color: #888;
    text-decoration: line-through;
    margin-left: 10px;
}

.sticker-oferta {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #28a745;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 5px;
    font-weight: bold;
}

/* ---------- OFERTAS ---------- */
.ofertas h3 {
    font-family: 'Nerko One', cursive;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
}

.ofertas .row {
    justify-content: center;
}

.ofertas .col-md-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.ofertas .card {
    width: 100%;
    max-width: 250px;
    border: none;
    margin-bottom: 10px;
}

.ofertas img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.ofertas img:hover {
    transform: scale(1.05);
}

.ofertas .btn {
    width: 100%;
    border-radius: 5px;
    margin-top: 10px;
}

.ofertas .card-text {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

/* ---------- WHATSAPP FLOTANTE ---------- */
.whatsapp-flotante {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
}

.whatsapp-flotante img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Ajuste flex en ofertas */
.ofertas .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 250px;
    border: none;
    margin-bottom: 20px;
    height: 100%;
}

.ofertas .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    width: 100%;
}

.ofertas .btn {
    width: 100%;
    border-radius: 5px;
    margin-top: auto;
}

.ofertas .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

@media (max-width: 768px) {
    .ofertas img {
        height: 220px;
    }

    .ofertas .card {
        max-width: 100%;
    }
}

/* ========================================================= */
/* =============== PRODUCTOS DESTACADOS (FINAL) ============ */
/* ========================================================= */

/* Layout de la fila de productos destacados */
.productos-destacados .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

/* Imagen del producto (más baja para que la card no sea tan larga) */
.productos-destacados img {
    width: 100%;
    height: 260px;              /* más baja que antes */
    object-fit: contain;
    border-radius: 10px 10px 0 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

/* Tarjeta completa */
.productos-destacados .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* NO se estira el contenido hacia abajo */
    width: 100%;
    max-width: 250px;
    border: none;
    margin: 20px 10px;           /* más espacio entre una card y otra */
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    padding-bottom: 16px;        /* aire en la parte inferior */
}

/* Contenido de la tarjeta: título + descripción + precio + botón juntos */
.productos-destacados .card-body {
    width: 100%;
    padding: 12px 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;   /* separación uniforme entre descripción, precio y botón */
}

/* Botón Ver Detalles: cerca del precio, NO pegado al borde inferior */
.productos-destacados .card-body .btn,
.productos-destacados .card-body .btn-primary,
.productos-destacados .card-body .btn-detalles {
    width: 100%;
    border-radius: 5px;
    margin-top: 4px !important;     /* anulamos cualquier mt-auto */
    margin-bottom: 4px !important;
}

/* Descripción en 2 líneas máx. (si usás esta clase) */
.descripcion-producto {
    height: 3.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
}

/* Ajustes en mobile para que siga viéndose bien */
@media (max-width: 768px) {
    .productos-destacados img {
        height: 220px;
    }

    .productos-destacados .card {
        max-width: 100%;
    }

    .text-truncate-line-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 2.6em;
    }
}

/* ===== FIX FINAL DESTACADOS: botón + separación filas ===== */

/* Quitar el efecto de estirar hasta abajo y dar aire entre filas */
.productos-destacados .card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;  /* pisa justify-content-between de Bootstrap */
    align-items: center;
    margin-bottom: 32px !important;          /* espacio entre una fila y otra */
    border-radius: 16px;
}

/* El body NO se estira: texto y precio uno debajo de otro, pegados arriba */
.productos-destacados .card-body {
    flex-grow: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: 4px;  /* poca separación entre título y precio */
    padding-top: 8px;
    padding-bottom: 4px;
}

/* El footer queda pegado al body, no al fondo de la card */
.productos-destacados .card-footer {
    margin-top: 4px !important;
    padding-top: 4px !important;
    align-self: stretch;
    border-top: none;
}

/* Botón pegadito al precio, sin espacio raro extra */
.productos-destacados .card-footer .btn {
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Bajar un poco la imagen para que la card no sea tan larga */
.productos-destacados .card-img-top {
    height: 230px !important;
    object-fit: contain;
}

/* Por las dudas, también damos margen a las columnas de la grilla */
.productos-destacados .row > div {
    margin-bottom: 32px !important;
}

/* ===== ALINEAR BOTONES EN PRODUCTOS DESTACADOS ===== */
.productos-destacados .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;   /* prefijo webkit (Chrome, Edge, etc.) */
    line-clamp: 2;           /* propiedad estándar sugerida por el linter */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.2em;       /* reserva el alto de ~2 líneas */
}

.productos-destacados .card-body {
    min-height: 80px;
}

/* ===== OVERRIDE FINAL BANNER (GANA SIEMPRE) ===== */
/* Desktop: ratio exacto de tus banners 2560x1040 */
#carouselExample .carousel-item{
  height: auto !important;
  aspect-ratio: 2560 / 1040;   /* evita recortes en 15", 23", 25" */
  overflow: hidden;
}

#carouselExample .carousel-item picture{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

#carouselExample .carousel-item picture > img.banner-img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;       /* con ratio correcto: NO recorta */
  object-position: center !important;
}

/* Mobile: usa el ratio de tus banners mobile */
@media (max-width: 576px){
  #carouselExample .carousel-item{
    aspect-ratio: 4 / 5;      /* si tu banner mobile es 1080x1350 */
  }
}
