/* ==========================================================================
   Qemmah — Stores on the map (locationmodule::map.index)
   A framed atelier: dark store panel + warm-styled Google map.
   ========================================================================== */

.qm-map { padding-bottom: 48px; }

.qm-map__frame {
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    height: clamp(560px, calc(100vh - 230px), 820px);
    overflow: hidden;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 0 0 1px rgba(161, 120, 92, .14), 0 40px 80px -50px rgba(26, 18, 16, .7);
}

/* ----- panel ----- */
.qm-map__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 26px 22px 0;
    color: #fff;
    background:
        radial-gradient(420px 260px at 100% -10%, rgba(226, 193, 156, .28), transparent 60%),
        linear-gradient(160deg, #1a1210 0%, #2b1a14 55%, #3d251b 100%);
    isolation: isolate;
}

.qm-map__panel::after {
    content: "";
    position: absolute;
    top: 22px;
    inset-inline-end: 22px;
    z-index: -1;
    width: 74px;
    height: 104px;
    border: 1px solid rgba(226, 193, 156, .22);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

.qm-map__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--qm-gold-2, #e2c19c); }
.qm-map__head h1 {
    margin: 0;
    padding-bottom: .12em;
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 800;
    background: var(--qm-gloss-gold, linear-gradient(180deg, #ecd0ad 0%, #cfa47b 42%, #a1785c 56%, #7d5238 100%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.qm-map__head p:last-child { max-width: 230px; margin: 6px 0 0; font-size: 13px; line-height: 1.75; color: rgba(255, 255, 255, .66); }

.qm-map__search { position: relative; display: block; margin: 20px 0 12px; }
.qm-map__search i { position: absolute; top: 50%; inset-inline-start: 16px; font-size: 13px; color: var(--qm-gold-2, #e2c19c); transform: translateY(-50%); pointer-events: none; }
.qm-map__search input {
    width: 100%;
    height: 48px;
    padding: 0 16px !important;
    padding-inline-start: 42px !important;
    font-size: 14px;
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(226, 193, 156, .25);
    border-radius: 14px;
    outline: none;
    transition: border-color .2s, background-color .2s;
}
.qm-map__search input::placeholder { color: rgba(255, 255, 255, .45); }
.qm-map__search input:focus { background: rgba(255, 255, 255, .1); border-color: var(--qm-gold-3, #c79a72); }

.qm-map__count { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: rgba(255, 255, 255, .5); }

.qm-map__list {
    flex: 1;
    min-height: 0;
    margin: 0 -10px;
    padding: 0 10px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(226, 193, 156, .3) transparent;
}

.qm-map__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    color: #fff;
    text-align: start;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: background-color .2s, border-color .2s;
}
.qm-map__item + .qm-map__item { margin-top: 4px; }
.qm-map__item:hover { background: rgba(255, 255, 255, .06); }
.qm-map__item.is-active { background: rgba(226, 193, 156, .12); border-color: rgba(226, 193, 156, .35); }
.qm-map__item img { flex: none; width: 44px !important; height: 44px; object-fit: cover; background: #fff; border: 2px solid rgba(226, 193, 156, .5); border-radius: 50%; }
.qm-map__item-body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.qm-map__item-body b { overflow: hidden; font-size: 14px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.qm-map__item-body small { overflow: hidden; font-size: 12px; color: rgba(255, 255, 255, .55); white-space: nowrap; text-overflow: ellipsis; }
.qm-map__item > i { flex: none; font-size: 12px; color: var(--qm-gold-3, #c79a72); opacity: 0; transition: opacity .2s; }
.qm-map__item:hover > i,
.qm-map__item.is-active > i { opacity: 1; }
.qm-ar .qm-map__item > i { transform: scaleX(-1); }

.qm-map__state { display: grid; flex: 1; place-content: center; justify-items: center; gap: 10px; padding: 30px 10px; text-align: center; color: rgba(255, 255, 255, .6); }
.qm-map__state[hidden] { display: none; }
.qm-map__state i { font-size: 28px; color: var(--qm-gold-3, #c79a72); }
.qm-map__state p { margin: 0; font-size: 13px; }
.qm-map__spinner { width: 28px; height: 28px; border: 2px solid rgba(226, 193, 156, .25); border-top-color: var(--qm-gold-2, #e2c19c); border-radius: 50%; animation: qm-map-spin .8s linear infinite; }
@keyframes qm-map-spin { to { transform: rotate(360deg); } }

/* ----- map ----- */
.qm-map__canvas { position: relative; min-width: 0; background: #f5efe8; }
#map { width: 100%; height: 100%; }

.qm-map__controls { position: absolute; bottom: 22px; inset-inline-end: 22px; display: grid; gap: 10px; justify-items: center; }
.qm-map__ctl-group { display: grid; overflow: hidden; background: #fff; border-radius: 14px; box-shadow: 0 10px 24px -12px rgba(26, 18, 16, .45), 0 0 0 1px rgba(161, 120, 92, .14); }
.qm-map__ctl { display: grid; place-items: center; width: 44px; height: 44px; font-size: 14px; color: var(--qm-ink, #1a1210); background: #fff; border: 0; transition: background-color .2s, color .2s; }
.qm-map__ctl-group .qm-map__ctl + .qm-map__ctl { border-top: 1px solid rgba(161, 120, 92, .16); }
.qm-map__ctl:hover { color: var(--qm-brown, #7d5238); background: #fbf5ee; }
.qm-map__locate { border-radius: 50%; box-shadow: 0 10px 24px -12px rgba(26, 18, 16, .45), 0 0 0 1px rgba(161, 120, 92, .14); }

/* info window (custom.css paints Google's popup dark brown site-wide; this one is white) */
.qm-map .gm-style .gm-style-iw-c,
.qm-map .gm-style .gm-style-iw-d::-webkit-scrollbar-track,
.qm-map .gm-style .gm-style-iw-d::-webkit-scrollbar-track-piece { background: #fff !important; color: var(--qm-ink, #1a1210) !important; }
.qm-map .gm-style .gm-style-iw-tc::after { background-color: #fff !important; }
.qm-map .gm-style .gm-style-iw-c { padding: 0 !important; border-radius: 16px !important; box-shadow: 0 20px 40px -18px rgba(58, 34, 25, .55) !important; }
.qm-map .gm-style .gm-style-iw-d { overflow: auto !important; max-height: 260px !important; padding: 0 !important; }
.qm-map .gm-style .gm-style-iw-chr { position: absolute; top: 0; inset-inline-end: 0; z-index: 2; }

.qm-map__card { display: grid; gap: 2px; min-width: 220px; padding: 8px; font-family: dinNext, sans-serif; }
.qm-map__card-shop { display: flex; align-items: center; gap: 10px; padding: 7px 8px; color: #3a2219; text-decoration: none; border-radius: 10px; transition: background-color .2s; }
.qm-map__card-shop:hover { background: #faf3ec; }
.qm-map__card-shop img { flex: none; width: 38px; height: 38px; object-fit: cover; border: 2px solid #e2c19c; border-radius: 50%; }
.qm-map__card-shop span { display: grid; gap: 1px; min-width: 0; }
.qm-map__card-shop b { overflow: hidden; font-size: 13.5px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.qm-map__card-shop small { font-size: 11.5px; font-weight: 700; color: var(--qm-gold-4, #a1785c); }

@media (max-width: 991px) {
    .qm-map__frame { grid-template-columns: 1fr; grid-template-rows: 56vh auto; height: auto; }
    .qm-map__canvas { grid-row: 1; }
    .qm-map__panel { padding-bottom: 8px; }
    .qm-map__list { max-height: 420px; }
}

@media (max-width: 575px) {
    .qm-map__frame { border-radius: 20px; }
    .qm-map__panel { padding: 20px 16px 6px; }
}
