/* ==========================================================================
   Buscaditos UI · Página: Inicio (prefijo .home-)
   Requiere tokens.css + components.css (globales).
   ========================================================================== */

.home {
    background: var(--bd-bg);
}

.home__sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 48px;
}

@media (max-width: 767px) {
    .home__sections { gap: 28px; padding-top: 20px; }
}

/* ---------- Hero (carrusel Bootstrap 3) ---------- */
.home-hero {
    padding-top: 24px;
}

.home-hero__carousel {
    position: relative;
    border-radius: var(--bd-r-2xl);
    overflow: hidden;
    box-shadow: var(--bd-shadow-card);
    background: var(--bd-white);
}

.home-hero__carousel .item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1240 / 420;
    object-fit: cover;
}

.home-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--bd-ink);
    box-shadow: var(--bd-shadow-card);
    opacity: 0;
    transition: opacity .2s, background-color .15s;
}

.home-hero__arrow--prev { left: 16px; }
.home-hero__arrow--next { right: 16px; }

.home-hero__carousel:hover .home-hero__arrow,
.home-hero__arrow:focus { opacity: 1; }

.home-hero__arrow:hover { background: var(--bd-white); color: var(--bd-brand); }

.home-hero__dots.carousel-indicators {
    bottom: 12px;
    margin-bottom: 0;
}

.home-hero__dots li,
.home-hero__dots li.active {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    border: 0;
    border-radius: var(--bd-r-pill);
    background: rgba(255, 255, 255, .6);
    transition: width .2s;
}

.home-hero__dots li.active {
    width: 22px;
    background: var(--bd-white);
}

@media (max-width: 767px) {
    .home-hero { padding-top: 12px; }
    .home-hero__carousel { border-radius: var(--bd-r-xl); }
    .home-hero__arrow { display: none; }
}

/* ---------- Categorías ---------- */
.home-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 8px;
    border-radius: var(--bd-r-xl);
    color: var(--bd-ink);
    text-align: center;
    text-decoration: none;
    transition: background-color .15s;
}

.home-cat:hover,
.home-cat:focus {
    background: var(--bd-white);
    color: var(--bd-brand);
    text-decoration: none;
}

.home-cat__img {
    display: block;
    width: 100%;
    max-width: 108px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--bd-white);
    box-shadow: var(--bd-shadow-card);
    overflow: hidden;
    transition: transform .2s;
}

.home-cat:hover .home-cat__img { transform: translateY(-3px); }

.home-cat__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-cat__name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
}

/* ---------- Promociones de la semana (mosaico) ---------- */
.home-promos {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "main main" "sq1 sq2" "wide wide";
}

@media (min-width: 992px) {
    .home-promos {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-areas: "main sq1 sq2" "main wide wide";
    }
}

.home-promos__tile {
    position: relative;
    display: block;
    min-height: 160px;
    border-radius: var(--bd-r-xl);
    background: var(--bd-white);
    box-shadow: var(--bd-shadow-card);
    overflow: hidden;
}

.home-promos__tile--main { grid-area: main; }
.home-promos__tile--sq1  { grid-area: sq1; }
.home-promos__tile--sq2  { grid-area: sq2; }
.home-promos__tile--wide { grid-area: wide; }

.home-promos__tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.home-promos__tile:hover img { transform: scale(1.03); }

@media (min-width: 992px) {
    .home-promos__tile--main { min-height: 440px; }
    .home-promos__tile--sq1,
    .home-promos__tile--sq2,
    .home-promos__tile--wide { min-height: 212px; }
}

.home-promos__title {
    position: absolute;
    left: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: var(--bd-r-pill);
    background: rgba(15, 23, 42, .72);
    color: var(--bd-white);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Marcas ---------- */
.home-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    padding: 16px;
    border: 1px solid var(--bd-line);
    border-radius: var(--bd-r-xl);
    background: var(--bd-white);
    transition: border-color .15s, box-shadow .15s;
}

.home-brand:hover {
    border-color: var(--bd-brand);
    box-shadow: var(--bd-shadow-card);
}

.home-brand img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .75;
    transition: filter .2s, opacity .2s;
}

.home-brand:hover img { filter: none; opacity: 1; }

/* ---------- Artículos del blog ---------- */
.home-article {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--bd-r-xl);
    background: var(--bd-white);
    box-shadow: var(--bd-shadow-card);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform .2s;
}

.home-article:hover { transform: translateY(-3px); text-decoration: none; color: inherit; }

.home-article__img {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--bd-surface);
}

.home-article__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-article__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
}

.home-article__meta {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bd-brand);
}

.home-article__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--bd-ink);
}

.home-article__excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bd-muted);
}

/* ---------- Confianza: beneficios + info ---------- */
.home-trust {
    padding: 40px 0 48px;
    background: var(--bd-white);
    border-top: 1px solid var(--bd-line);
}

.home-benefits {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 576px) { .home-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .home-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.home-benefit {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border-radius: var(--bd-r-xl);
    background: var(--bd-surface);
}

.home-benefit .bd-icon-box { width: 52px; height: 52px; }
.home-benefit .bd-icon-box svg { width: 28px; height: 28px; }

.home-benefit__title {
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 800;
    color: var(--bd-ink);
}

.home-benefit__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--bd-muted);
}

.home-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 24px;
}

@media (min-width: 992px) { .home-info { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-info__card {
    padding: 22px;
    border: 1px solid var(--bd-line);
    box-shadow: none;
}

.home-info__title {
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 800;
    color: var(--bd-ink);
}

.home-info__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
}

.home-info__list li + li { margin-top: 8px; }

.home-info__list li,
.home-info__list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--bd-ink-2);
    word-break: break-word;
}

.home-info__list a:hover { color: var(--bd-brand); text-decoration: none; }

.home-info__list i {
    width: 16px;
    margin-top: 2px;
    color: var(--bd-brand);
    text-align: center;
}

.home-info__list--check li::before {
    content: "\f00c";
    width: 16px;
    margin-top: 1px;
    font-family: FontAwesome;
    color: var(--bd-success);
    text-align: center;
}
