:root {
    --hm-bg: #ffffff;
    --hm-surface: #ffffff;
    --hm-surface-alt: #f8fafc;
    --hm-text: #0f172a;
    --hm-muted: #475569;
    --hm-border: #e2e8f0;
    --hm-primary: #0a58ca;
    --hm-primary-dark: #083f90;
    --hm-success: #0f766e;
    --hm-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
    --hm-shadow-hover: 0 22px 44px rgba(15, 23, 42, 0.15);
}

* {
    box-sizing: border-box;
}

body.home-marketplace {
    margin: 0;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    color: var(--hm-text);
    background: var(--hm-bg);
}

.home-shell {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.home-hero {
    position: relative;
    min-height: clamp(420px, 70vh, 660px);
    color: #fff;
    display: grid;
    align-items: end;
    background:
        radial-gradient(circle at 15% 20%, rgba(10, 88, 202, 0.42), transparent 42%),
        linear-gradient(120deg, rgba(4, 11, 29, 0.78), rgba(4, 30, 74, 0.58) 48%, rgba(10, 88, 202, 0.2)),
        url('/assets/images/new/index-hero.jpg') center/cover no-repeat;
}

.home-hero__inner {
    padding: clamp(3.5rem, 11vw, 7rem) 0 clamp(2rem, 7vw, 3.5rem);
}

.home-kicker {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.44rem 0.86rem;
}

.home-hero h1 {
    margin: 1rem 0 0.85rem;
    max-width: 16ch;
    font-size: clamp(2rem, 5.3vw, 3.8rem);
    line-height: 1.08;
}

.home-hero p {
    margin: 0;
    max-width: 64ch;
    color: rgba(248, 250, 252, 0.95);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.home-search {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--hm-text);
    border-radius: 20px;
    box-shadow: var(--hm-shadow);
    padding: 1rem;
}

.home-search__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.home-field {
    display: grid;
    gap: 0.35rem;
}

.home-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hm-muted);
}

.home-field select {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--hm-border);
    padding: 0.55rem 0.8rem;
    font: inherit;
    color: var(--hm-text);
    background: #fff;
}

.home-search__submit {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hm-primary), #0b5fd8);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-search__submit:hover,
.home-search__submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(10, 88, 202, 0.32);
}

.home-search__hint {
    margin: 0.65rem 0 0;
    color: #334155;
    font-size: 0.83rem;
}

.home-section {
    padding: clamp(2.4rem, 6vw, 4.2rem) 0;
}

.home-section__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.home-section h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    line-height: 1.15;
}

.home-section p {
    margin: 0;
    color: var(--hm-muted);
}

.home-carousel {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.home-card {
    background: var(--hm-surface);
    border: 1px solid var(--hm-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--hm-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hm-shadow-hover);
}

.home-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.home-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.home-card:hover .home-card__media img {
    transform: scale(1.06);
}

.home-card__rating {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--hm-success);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.3rem 0.62rem;
}

.home-card__content {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.home-card__title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.home-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--hm-border);
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.28rem 0.6rem;
}

.home-badge--price {
    color: var(--hm-primary-dark);
    border-color: rgba(10, 88, 202, 0.35);
    background: rgba(10, 88, 202, 0.08);
}

.home-card__departures {
    margin: 0;
    color: var(--hm-muted);
    font-size: 0.82rem;
}

.home-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(10, 88, 202, 0.34);
    color: var(--hm-primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.home-card__cta:hover,
.home-card__cta:focus-visible {
    background: var(--hm-primary);
    color: #fff;
    border-color: var(--hm-primary);
}

.home-empty {
    margin: 0;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #334155;
}

.home-categories {
    background: var(--hm-surface-alt);
}

.home-category-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.home-category-tile {
    position: relative;
    min-height: 220px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: var(--hm-shadow);
    display: grid;
    align-items: end;
    padding: 1rem;
}

.home-category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 12, 29, 0.15), rgba(2, 12, 29, 0.75));
}

.home-category-tile > span,
.home-category-tile > strong {
    position: relative;
    z-index: 1;
}

.home-category-tile > span {
    font-size: 0.86rem;
    opacity: 0.95;
}

.home-category-tile > strong {
    margin-top: 0.35rem;
    display: block;
    font-size: 1.35rem;
}

.home-category-tile--quad {
    background: url('/assets/images/new/index-quad-desert.jpg') center/cover no-repeat;
}

.home-category-tile--buggy {
    background: url('/assets/images/new/index-buggy-desert.jpg') center/cover no-repeat;
}

.home-category-tile--activites {
    background: url('/assets/images/external/petit-desert-en-4X4-Agadir.jpg') center/cover no-repeat;
}

.home-trust-row {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.home-trust-item {
    border: 1px solid var(--hm-border);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    font-weight: 600;
    color: #1e293b;
}

.home-trust-item span {
    font-size: 1rem;
    margin-right: 0.45rem;
}

.home-steps {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

.home-step {
    border: 1px solid var(--hm-border);
    border-radius: 16px;
    padding: 1rem;
    background: #fff;
}

.home-step__index {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(10, 88, 202, 0.1);
    color: var(--hm-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.home-step h3 {
    margin: 0 0 0.4rem;
    font-size: 1.08rem;
}

.home-step p {
    margin: 0;
    color: var(--hm-muted);
    font-size: 0.92rem;
}

.home-cta {
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(2, 10, 29, 0.92), rgba(7, 38, 94, 0.7)),
        url('/assets/images/new/index-buggy-beach.jpg') center/cover no-repeat;
    color: #fff;
    box-shadow: var(--hm-shadow);
}

.home-cta__inner {
    padding: clamp(1.5rem, 5vw, 2.5rem);
    display: grid;
    gap: 1rem;
}

.home-cta h2 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.3rem);
}

.home-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.home-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.home-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0.58rem 1rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.home-cta__btn--primary {
    background: #fff;
    color: #0a58ca;
}

.home-cta__btn--secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
    .home-section__header {
        flex-direction: column;
        align-items: start;
    }

    .home-carousel {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(83%, 1fr);
        overflow-x: auto;
        padding-bottom: 0.4rem;
        scroll-snap-type: x mandatory;
    }

    .home-carousel .home-card {
        scroll-snap-align: start;
    }
}

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

    .home-carousel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .home-category-grid,
    .home-trust-row,
    .home-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .home-carousel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-trust-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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