/* ====================================================
   HOME MAINTENANCES – Hero Search Section  v5.0
   2-field bar: Service + Location (with GPS + Voice)
   ==================================================== */

/* ── Hero wrapper ──────────────────────────────────── */
.hm-hero {
    background: linear-gradient(135deg, #051829 0%, #0a2540 50%, #0d3460 100%);
    padding: 60px 0 68px;
    position: relative;
    overflow: visible;
}
/* Contains blur-orbs without clipping the search dropdown */
.hm-hero-bg {
    position: absolute; inset: 0;
    overflow: hidden; pointer-events: none;
}
.hm-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 18% 50%, rgba(38,114,236,.13) 0%, transparent 50%),
        radial-gradient(circle at 82% 18%, rgba(253,201,0,.09) 0%, transparent 40%);
    pointer-events: none;
}

/* ── Floating orbs ─────────────────────────────────── */
.hm-hero-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none;
    animation: hmOrbFloat 8s ease-in-out infinite alternate;
}
.hm-hero-orb--1 { width:460px;height:460px;top:-160px;left:-100px;background:radial-gradient(circle,rgba(253,201,0,.16) 0%,transparent 70%);animation-delay:0s; }
.hm-hero-orb--2 { width:340px;height:340px;bottom:-120px;right:-60px;background:radial-gradient(circle,rgba(38,114,236,.16) 0%,transparent 70%);animation-delay:-3s; }
.hm-hero-orb--3 { width:200px;height:200px;top:40%;left:55%;background:radial-gradient(circle,rgba(253,201,0,.10) 0%,transparent 70%);animation-delay:-6s; }
@keyframes hmOrbFloat { from{transform:translateY(0) scale(1)} to{transform:translateY(22px) scale(1.06)} }

/* ── Eyebrow + subtitle ────────────────────────────── */
.hm-eyebrow {
    font-size: .74rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: #fdc900; margin-bottom: .75rem; opacity: .88;
}
.hm-subtitle {
    font-size: .98rem; color: rgba(255,255,255,.62);
    margin-top: .5rem; margin-bottom: 0; max-width: 600px; line-height: 1.65;
}

/* ── Rotating title ────────────────────────────────── */
.home_input_title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800; color: #fff;
    margin-bottom: .75rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px; line-height: 1.3;
}
.rotate-text { display: inline-block; overflow: hidden; height: 1.25em; line-height: 1.25em; vertical-align: middle; }
.rotate-text div { display: flex; flex-direction: column; }
.rotate-text span { color: #fdc900; white-space: nowrap; }

/* ══ MODE PILLS ════════════════════════════════════════ */
.hm-mode-pills {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; margin-bottom: 18px;
}
.hm-mode-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 20px; border-radius: 100px;
    background: rgba(255,255,255,.10);
    border: 1.5px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.72);
    font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.hm-mode-pill i { font-size: .88rem; }
.hm-mode-pill:hover { background: rgba(255,255,255,.17); color: #fff; border-color: rgba(255,255,255,.35); }
.hm-mode-pill--active { background: #fdc900; color: #051829; border-color: #fdc900; }
.hm-mode-pill--active:hover { background: #f0c000; }

/* ══ SEARCH BAR ════════════════════════════════════════ */
.hm-sbar {
    display: flex;
    background: #fff;
    border-radius: 60px;
    box-shadow: 0 20px 60px rgba(5,24,41,.34), 0 4px 16px rgba(0,0,0,.12);
    position: relative;
    overflow: visible;
    z-index: 999; /* Above orbs but below dropdowns/panels */
}
.hm-sbar[hidden] { display: none; }

.hm-sb-panel {
    display: flex; width: 100%; align-items: stretch;
}
.hm-sb-panel[hidden] { display: none; }

/* ── Single field ──────────────────────────────────── */
.hm-sb-field {
    display: flex; align-items: center; gap: 12px;
    flex: 1; padding: 14px 20px; position: relative;
    min-width: 0; transition: background .18s;
}

.hm-sb-wide { flex: 1.4; }
.hm-sb-sep  { border-right: 1.5px solid #e4ecf4; }
.hm-sb-rel  { position: relative; }

/* ── Location field: holds GPS + Voice btns ────────── */
.hm-sb-loc {
    flex: 1; padding-right: 8px; position: relative;
}

/* ── Icon ─────────────────────────────────────────── */
.hm-sb-ico { font-size: .92rem; color: #fdc900; flex-shrink: 0; margin-top: 2px; }

/* ── Inner label+input stack ──────────────────────── */
.hm-sb-inner { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hm-sb-lbl {
    font-size: .63rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .09em; color: #1a2535; pointer-events: none; white-space: nowrap;
}

.hm-sb-inp,
.hm-sb-sel {
    border: none; outline: none; background: transparent;
    font-size: .875rem; color: #4a6080; padding: 5px; margin: 0;
    font-family: inherit; width: 100%;
}
.hm-sb-inp::placeholder { color: #b0bfcf; }
.hm-sb-sel { appearance: none; -webkit-appearance: none; cursor: pointer; }
.hm-sb-sel:disabled { opacity: .5; cursor: not-allowed; }

/* ── GPS / Voice icon buttons inside location field ── */
.hm-loc-icon-btn {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e0e8f0;
    background: #f5f8fc;
    color: #5a7090;
    font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s;
}
.hm-loc-icon-btn:hover { border-color: #fdc900; background: #fffbea; color: #051829; }
.hm-loc-icon-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Voice button active state ────────────────────── */
.hm-voice-btn.hm-voice-btn--active {
    background: #f43f5e; border-color: #f43f5e; color: #fff;
    animation: hmPulse .8s infinite;
}
@keyframes hmPulse { 0%,100%{box-shadow:0 0 0 0 rgba(244,63,94,.4)} 50%{box-shadow:0 0 0 8px rgba(244,63,94,0)} }

/* ── Search button ────────────────────────────────── */
.hm-sb-btn {
    flex: 0 0 auto;
    background: linear-gradient(135deg, #fdc900 0%, #e4b500 100%);
    color: #051829; border: none; padding: 0 30px; min-width: 128px;
    font-size: .92rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; white-space: nowrap;
    border-radius: 0 60px 60px 0;
    transition: filter .2s, transform .15s;
    box-shadow: inset 0 0 0 1.5px rgba(253,201,0,.3);
}
.hm-sb-btn:hover  { filter: brightness(1.07); }
.hm-sb-btn:active { transform: scale(.98); }

/* ── Category dropdown ────────────────────────────── */
.hm-cat-dd {
    position: absolute; top: calc(100% + 10px); left: -4px; right: -4px;
    background: #fff; border: 1.5px solid #d4e0ee;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(5,24,41,.16);
    z-index: 2000; max-height: 260px; overflow-y: auto; scrollbar-width: thin;

}
.hm-cat-dd[hidden] { display: none; }
.hm-cat-dd-item {
    padding: 10px 18px; font-size: .875rem; color: #1a2535;
    cursor: pointer; border-bottom: 1px solid #f0f5fb;
    transition: background .12s; outline: none;
}
.hm-cat-dd-item:last-child { border-bottom: none; }
.hm-cat-dd-item:hover, .hm-cat-dd-item:focus { background: #fffbea; }
/* Group label inside dropdown */
.hm-cat-dd-group {
    padding: 7px 18px 4px;
    font-size: .62rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em;
    color: #94a3b8; background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    pointer-events: none;
}
/* Product badge (category name) beside the product */
.hm-cat-dd-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hm-cat-dd-item--loc { justify-content: flex-start; align-items: flex-start; }
.hm-loc-dd-badge {
    flex-shrink: 0;
    font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
    padding: 2px 7px; border-radius: 999px;
    background: #f0f5fb; color: #64748b; margin-left: 8px; margin-top: 2px;
}
.hm-cat-dd-empty {
    padding: 12px 18px; font-size: .9rem; color: #94a3b8; text-align: center;
}
.hm-cat-dd-item__badge {
    flex-shrink: 0;
    font-size: .65rem; font-weight: 600;
    background: #f0f5ff; color: #3b5fc0;
    border-radius: 20px; padding: 2px 8px;
    white-space: nowrap;
}

/* ── Shake on empty submit ────────────────────────── */
.hm-sb-inp--err { animation: hmShake .3s ease; border-bottom: 1.5px solid #f43f5e !important; }
@keyframes hmShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ══ QUICK ROW ══════════════════════════════════════ */
.hm-quick-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 14px; flex-wrap: nowrap; min-width: 0;
}
.hm-quick-row[hidden] { display: none; }
.hm-quick-or {
    flex-shrink: 0; font-size: .75rem; font-weight: 700;
    color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em;
}

/* ══ QUICK ROW ══════════════════════════════════════ */
.hm-quick-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 14px; flex-wrap: nowrap; min-width: 0;
}
.hm-quick-row[hidden] { display: none; }
.hm-quick-or {
    flex-shrink: 0; font-size: .75rem; font-weight: 700;
    color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em;
}

/* Scrollable chip rail */
.hm-pop-scroll-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding-bottom: 7px;
}
.hm-pop-scroll-wrap:not(.hm-pop-scroll-wrap--scrollable) .hm-pop-scroll-hint,
.hm-pop-scroll-wrap:not(.hm-pop-scroll-wrap--scrollable) .hm-pop-scroll-edge,
.hm-pop-scroll-wrap:not(.hm-pop-scroll-wrap--scrollable) .hm-pop-scroll-nudge {
    display: none !important;
}

.hm-pop-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    min-width: 0;
    padding: 4px 6px 8px;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    cursor: grab;
    touch-action: pan-x;
}
.hm-pop-scroll::-webkit-scrollbar { display: none; }
.hm-pop-scroll:active { cursor: grabbing; }
.hm-pop-scroll-wrap--teasing .hm-pop-scroll {
    scroll-behavior: auto;
    cursor: default;
}

.hm-pop-scroll-edge {
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 36px;
    pointer-events: none;
    z-index: 2;
    transition: opacity .25s ease;
}
.hm-pop-scroll-edge--left {
    left: 0;
    background: linear-gradient(90deg, rgba(5, 24, 41, .92) 0%, transparent 100%);
}
.hm-pop-scroll-edge--right {
    right: 0;
    background: linear-gradient(270deg, rgba(5, 24, 41, .92) 0%, transparent 100%);
}
.hm-pop-scroll-wrap--start .hm-pop-scroll-edge--left,
.hm-pop-scroll-wrap--end .hm-pop-scroll-edge--right {
    opacity: 0;
}

.hm-pop-scroll-nudge {
    position: absolute;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(253, 201, 0, .45);
    background: rgba(5, 24, 41, .78);
    color: #fdc900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.hm-pop-scroll-nudge:hover {
    background: rgba(253, 201, 0, .22);
    transform: scale(1.08);
}
.hm-pop-scroll-nudge--left { left: 2px; }
.hm-pop-scroll-nudge--right { right: 2px; }
.hm-pop-scroll-wrap--start .hm-pop-scroll-nudge--left,
.hm-pop-scroll-wrap--end .hm-pop-scroll-nudge--right {
    opacity: 0;
    pointer-events: none;
}

.hm-pop-scroll-hint {
    position: absolute;
    right: 10px;
    bottom: -2px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: rgba(253, 201, 0, .18);
    border: 1px solid rgba(253, 201, 0, .35);
    color: #fdc900;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    pointer-events: none;
    animation: hmSwipeHintBounce 1.8s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(253, 201, 0, .2);
}
.hm-pop-scroll-hint__hand {
    animation: hmSwipeHandWiggle 1.2s ease-in-out infinite;
    transform-origin: bottom center;
}
.hm-pop-scroll-hint__arrows {
    animation: hmSwipeArrowsNudge 1s ease-in-out infinite;
}
.hm-pop-scroll-wrap--teasing .hm-pop-scroll-hint,
.hm-pop-scroll-wrap--interacted .hm-pop-scroll-hint,
.hm-pop-scroll-wrap--teased .hm-pop-scroll-hint {
    animation: hmSwipeHintFade  .6s ease forwards;
}
.hm-pop-scroll-wrap--teasing .hm-pop-scroll-edge--right {
    animation: hmEdgePulse 1.2s ease-in-out infinite;
}

@keyframes hmSwipeHintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes hmSwipeHandWiggle {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(-12deg) translateX(-3px); }
    75% { transform: rotate(8deg) translateX(4px); }
}
@keyframes hmSwipeArrowsNudge {
    0%, 100% { transform: translateX(0); opacity: .7; }
    50% { transform: translateX(4px); opacity: 1; }
}
@keyframes hmSwipeHintFade {
    to { opacity: 0; transform: translateY(6px); visibility: hidden; }
}
@keyframes hmEdgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

.hm-pop-cat {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.09);
    border: 1.5px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.80);
    border-radius: 100px; padding: 6px 16px;
    font-size: .75rem; font-weight: 600;
    cursor: pointer; transition: all .18s; white-space: nowrap;
}
.hm-pop-scroll-wrap--teasing .hm-pop-cat:first-child {
    animation: hmChipPeekPop .9s ease-in-out 1;
}
@keyframes hmChipPeekPop {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(253, 201, 0, .25); }
}
.hm-pop-cat i { color: #fdc900; font-size: .72rem; }
.hm-pop-cat:hover { background: rgba(253,201,0,.18); border-color: #fdc900; color: #fff; }
.hm-pop-cat--active { background: #fdc900; border-color: #fdc900; color: #051829; }
.hm-pop-cat--active i { color: #051829; }

/* ══ SCRAP PANEL ════════════════════════════════════ */
.hm-scrap-panel {
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.13);
    border-radius: 20px; padding: 26px 28px; text-align: center;
}
.hm-scrap-panel[hidden] { display: none; }
.hm-scrap-intro { font-size: .9rem; color: rgba(255,255,255,.68); margin-bottom: 20px; }
.hm-scrap-intro i { color: #fdc900; margin-right: 6px; }
.hm-scrap-intro strong { color: #fff; font-weight: 700; }
.hm-scrap-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 18px; }
.hm-scrap-cat {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.12);
    border-radius: 14px; padding: 16px 22px; text-decoration: none; min-width: 110px;
    transition: all .2s;
}
.hm-scrap-cat:hover { background: rgba(253,201,0,.15); border-color: #fdc900; transform: translateY(-3px); text-decoration: none; }
.hm-scrap-cat__icon { font-size: 1.6rem; color: #fdc900; }
.hm-scrap-cat__name { font-size: .76rem; font-weight: 600; color: rgba(255,255,255,.88); }
.hm-scrap-footer {
    display: flex; align-items: center; justify-content: center;
    gap: 24px; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid rgba(255,255,255,.10);
}
.hm-scrap-link, .hm-scrap-call {
    font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.62);
    text-decoration: none; transition: color .2s; display: flex; align-items: center; gap: 6px;
}
.hm-scrap-link:hover, .hm-scrap-call:hover { color: #fdc900; text-decoration: none; }

/* ══ STATS BAR ══════════════════════════════════════ */
.hm-stats-bar {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px; padding: 16px 20px; margin-top: 28px; backdrop-filter: blur(8px);
}
.hm-stat {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    flex: 1 1 100px; padding: 8px 12px; border-right: 1px solid rgba(255,255,255,.10); text-align: center;
}
.hm-stat:last-child { border-right: none; }
.hm-stat .num { font-size: 1.5rem; font-weight: 800; color: #fdc900; line-height: 1.1; }
.hm-stat .lbl { font-size: .7rem; color: rgba(255,255,255,.58); white-space: nowrap; }

/* ══ RESPONSIVE ═════════════════════════════════════ */
@media (max-width: 991px) {
    .hm-sb-wide { flex: 1.2; }
    .hm-sb-btn { min-width: auto; padding: 0 20px; }
    .hm-sb-btn span { display: none; }
    .hm-sb-btn i { font-size: 1.15rem; }
}
@media (max-width: 767px) {
    .hm-hero { padding: 44px 0 56px; }
    .hm-sbar { border-radius: 18px; box-shadow: 0 12px 40px rgba(5,24,41,.3); }
    .hm-sb-panel { flex-direction: column; }
    .hm-sb-field {
        border-right: none !important;
        border-bottom: 1.5px solid #e4ecf4;
        border-radius: 0; padding: 13px 18px;
    }
    .hm-sb-field:first-child { border-radius: 18px 18px 0 0; }
    .hm-sb-btn {
        border-radius: 0 0 18px 18px; width: 100%;
        justify-content: center; padding: 15px; font-size: .98rem; min-width: auto;
    }
    .hm-sb-btn span { display: inline; }
    .hm-quick-row { flex-wrap: nowrap; align-items: flex-start; }
    .hm-pop-scroll-wrap { width: 100%; flex: 1; min-width: 0; }
    .hm-pop-scroll-hint { bottom: -6px; right: 6px; font-size: .62rem; }
    .hm-scrap-cat { min-width: 90px; padding: 14px; }
    .hm-mode-pill { padding: 7px 14px; }
}
@media (max-width: 480px) {
    .hm-stats-bar { flex-direction: column; gap: 6px; }
    .hm-stat {
        border-right: none; border-bottom: 1px solid rgba(255,255,255,.1);
        width: 100%; flex-direction: row; justify-content: center; gap: 10px;
    }
    .hm-stat:last-child { border-bottom: none; }
    .hm-mode-pill span { display: none; }
    .hm-mode-pill { padding: 8px 14px; }
}
