/**
 * Phase 2 — Homepage composition (category tiles, trust strip, editorial).
 * Scoped to .almart-home-*; uses design tokens.
 */

.almart-home-section {
    position: relative;
}

.almart-home-eyebrow {
    font-size: var(--almart-type-utility-size);
    font-weight: var(--almart-font-weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bs-primary);
    margin-bottom: var(--almart-space-2);
}

/* ----- Shop by category tiles ----- */
.almart-home-categories {
    background: linear-gradient(180deg, var(--almart-color-surface) 0%, var(--almart-color-surface-muted) 100%);
}

.almart-home-cat-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 148px;
    padding: var(--almart-space-5);
    border-radius: var(--almart-radius-xl);
    border: 1px solid var(--almart-color-border-card);
    background: var(--almart-color-surface);
    box-shadow: var(--almart-shadow-card);
    text-decoration: none;
    color: var(--almart-color-text);
    transition: transform var(--almart-duration-base) var(--almart-easing-out),
        box-shadow var(--almart-duration-base) var(--almart-easing-out);
}

.almart-home-cat-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--almart-shadow-card-hover);
    color: var(--almart-color-text);
}

.almart-home-cat-tile__media {
    width: 56px;
    height: 56px;
    border-radius: var(--almart-radius-lg);
    overflow: hidden;
    background: var(--almart-color-surface-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--almart-space-3);
    flex-shrink: 0;
}

.almart-home-cat-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.almart-home-cat-tile__media i {
    font-size: 1.35rem;
    color: var(--bs-primary);
}

.almart-home-cat-tile__name {
    font-family: var(--almart-font-heading);
    font-weight: var(--almart-font-weight-bold);
    font-size: var(--almart-type-h3-size);
    line-height: var(--almart-type-h3-line);
    display: block;
    margin-bottom: var(--almart-space-1);
}

.almart-home-cat-tile__count {
    font-size: var(--almart-type-small-size);
    color: var(--almart-color-text-muted);
}

/* ----- Trust / difference (3-up) ----- */
.almart-home-difference {
    background: var(--almart-color-surface);
}

.almart-home-diff-card {
    height: 100%;
    padding: var(--almart-space-6) var(--almart-space-5);
    border-radius: var(--almart-radius-xl);
    border: 1px solid var(--almart-color-border);
    background: linear-gradient(165deg, var(--almart-color-surface-tint) 0%, var(--almart-color-surface) 55%);
    transition: border-color var(--almart-duration-base) var(--almart-easing-standard),
        box-shadow var(--almart-duration-base) var(--almart-easing-standard);
}

.almart-home-diff-card:hover {
    border-color: var(--almart-color-border-strong);
    box-shadow: var(--almart-shadow-tile-hover);
}

.almart-home-diff-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--almart-space-4);
    background: rgba(21, 101, 192, 0.1);
    color: var(--bs-primary);
    font-size: 1.35rem;
}

.almart-home-diff-card h3 {
    font-family: var(--almart-font-heading);
    font-size: var(--almart-type-h3-size);
    font-weight: var(--almart-font-weight-bold);
    margin-bottom: var(--almart-space-3);
    color: var(--almart-color-text);
}

.almart-home-diff-card p {
    font-size: var(--almart-type-small-size);
    line-height: var(--almart-type-body-line);
    color: var(--almart-color-text-muted);
    margin-bottom: var(--almart-space-4);
}

.almart-home-diff-card a {
    font-weight: var(--almart-font-weight-semibold);
    font-size: var(--almart-type-small-size);
    text-decoration: none;
}

/* ----- Editorial cards ----- */
.almart-home-editorial {
    background: linear-gradient(180deg, var(--almart-color-surface-muted) 0%, var(--almart-color-surface) 40%);
}

.almart-home-editorial-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--almart-space-6);
    border-radius: var(--almart-radius-xl);
    border: 1px solid var(--almart-color-border-card);
    background: var(--almart-color-surface);
    box-shadow: var(--almart-shadow-pill);
    text-decoration: none;
    color: inherit;
    transition: transform var(--almart-duration-base) var(--almart-easing-out),
        box-shadow var(--almart-duration-base) var(--almart-easing-out);
}

.almart-home-editorial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--almart-shadow-card);
    color: inherit;
}

.almart-home-editorial-card__tag {
    font-size: var(--almart-type-utility-size);
    font-weight: var(--almart-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary);
    margin-bottom: var(--almart-space-2);
}

.almart-home-editorial-card h3 {
    font-family: var(--almart-font-heading);
    font-size: var(--almart-type-h3-size);
    font-weight: var(--almart-font-weight-bold);
    color: var(--almart-color-text);
    margin-bottom: var(--almart-space-3);
}

.almart-home-editorial-card p {
    font-size: var(--almart-type-small-size);
    color: var(--almart-color-text-muted);
    line-height: var(--almart-type-body-line);
    flex: 1;
    margin-bottom: var(--almart-space-4);
}

.almart-home-editorial-card__cta {
    font-weight: var(--almart-font-weight-semibold);
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ----- Hero wrapper (spacing rhythm) ----- */
.almart-home-hero {
    border-bottom: 1px solid var(--almart-color-border-subtle);
}

/* ----- Section headers inside existing home blocks ----- */
.almart-home-product-head {
    max-width: 900px;
}

.almart-home-product-head .display-3 {
    font-size: clamp(1.65rem, 4vw, 2.65rem);
    line-height: var(--almart-type-display-line);
}

/* Homepage banners — responsive type (avoid oversized display-* on phones) */
@media (max-width: 575.98px) {
    .almart-home-banner__overlay .display-2 {
        font-size: clamp(2rem, 11vw, 3.1rem) !important;
        line-height: 1.1;
    }

    .almart-home-banner__overlay .display-5 {
        font-size: clamp(1.15rem, 4.5vw, 1.65rem) !important;
        line-height: 1.25;
    }

    .almart-home-offers .display-3 {
        font-size: clamp(1.45rem, 6vw, 2rem) !important;
        line-height: 1.2;
    }

    .container-fluid.product .col-lg-4 > h1 {
        font-size: clamp(1.5rem, 5.5vw, 2rem);
    }
}

.almart-home-tab-pill {
    font-size: var(--almart-type-small-size);
    font-weight: var(--almart-font-weight-semibold);
    text-decoration: none;
    min-height: 2.5rem;
}
