/* assets/css/search-map-view.css — Ticket #7
 * Map-open layout for the search-results page, aligned to the reference demo.
 * Authored LTR. Loaded only on the search page. Normal (closed) view untouched.
 */
.start_search .container .intextdiv{min-height:auto}

.search-res-n-map.map-opened .spa-box.map-selected{border: 1px solid #e91665;outline-offset:2px;border-radius:12px;transition:outline .15s}

			.search-flex-filters {
				display: flex;
				max-width: 100%;
			}

			.search-flex {width: 100%;}

			.search-flex .rr {
				width: 100%;
			}

			.search-flex {
				display: flex;
			}

			div#mobStrip {
				display: none;
			}

			.filters-selected {
				overflow: auto;
			}

			.block-res:first-child h3.gTitle{display:none}

			.search-flex.search-bar-sticky1 {z-index: 5;padding-top: 1px;padding-bottom: 5px;background: white;}

			.search-switch {display: inline-flex;border: 1px #ccc solid;border-radius: 10px;overflow: hidden;}

			.search-bar-sticky2 {display: flex;justify-content: space-between;background: white;padding: 10px 0;margin-bottom: 10px;}
			.sort-n-map {display: flex;align-items: center;gap: 10px;}
			.search-switch div {height: 44px;display: flex;align-items: center;padding: 0 10px;min-width: 110px;width: 50%;text-align: center;justify-content: center;color: #777;cursor: pointer;}
			.search-switch div.active {background: #d03769;color: white;pointer-events: none;}
			.search-p-btn {display: flex;background: #fff;color: #1f2733;border: 1px solid #CCC;height: 44px;align-items: center;padding: 0 10px;border-radius: 10px;gap: 10px;cursor:pointer}
			/* [#7] filters button — lucide funnel icon + selected-count badge */
			.fiters-btn i svg.lucide{fill:none;stroke:currentColor}
			.fiters-btn .fiters-count{display:none;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-inline-start:6px;border-radius:999px;background:#e31d68;color:#fff;font-size:12px;font-weight:700;line-height:1}
			.fiters-btn.has-count{width:auto;padding-inline-end:10px}
			.fiters-btn.has-count .fiters-count{display:inline-flex}
			/* [#7] map toggle button — map/list icon swap + open-state color */
			#open-spa-map .mb-ico{display:inline-flex;align-items:center}
			#open-spa-map .mb-ico svg{display:block}
			#open-spa-map .mb-ico-list{display:none}
			#open-spa-map .mb-ico-back{display:none}
			#open-spa-map.is-open .mb-ico-map{display:none}
			#open-spa-map.is-open .mb-ico-list{display:inline-flex}
			#open-spa-map.is-open {background: #122344;color: #fff;border-color: #122344;}

			.search-res-n-map {display: flex; transition:0.2s all}
			.search-res-n-map .promoted.new2026{transition:0.2s all}









			@media(min-width:993px){
				.filters-selected{flex-wrap:wrap}
				.search-flex.search-bar-sticky1{padding: 10px 0;}
				.search-bar-sticky2 {position: sticky;top: 68px;z-index: 10;}
				.search-res-n-map {flex-direction: row-reverse;gap: 10px;}
				.search-res-n-map.map-opened .the-map {width: 75%;max-height: calc(100vh - 180px);}
				.search-res-n-map.map-opened #the-search-res {width: 25%;}
				body .promoted.new2026 .spa-box.new2026{margin:0 !important}
			}

			@media(max-width:992px){
				.total-results{display:none !important}
				.search-bar-sticky2 {flex-direction: column;gap: 10px;padding: 10px;}
			}


/* Map placeholder hidden until the user opens the map. */
.search-res-n-map:not(.map-opened) .the-map { display: none; }

/* Results column: full width when the map is closed; smooth width change on open/close. */
.search-res-n-map #the-search-res {
  transition: 0.2s all;
  width: 100%;
}

/* --- Map OPEN: two columns — results (left) + map (right) --- */
.search-res-n-map.map-opened {
  display: grid;
  grid-template-columns: minmax(340px, 42%) minmax(0, 58%);
  gap: 0px;
  align-items: start;
}
.search-res-n-map.map-opened #the-search-res {
  order: 1;
  overflow: auto;
  max-height: 100%;
  padding:10px;
}
.search-res-n-map.map-opened .the-map {
  order: 2;
  position: sticky;
  top: 12px;
  height: 100%;
  /* min-height: 520px; */
  background: none !important;   /* drop the Canada placeholder image */
}
.search-res-n-map.map-opened #spa-map {width: 100%;height: 100%;position: relative;top: 0;bottom: 0;max-height: none;}

/* --- Card-on-map: clicking a marker shows the spa's card pinned to the map bottom --- */
.map-card-slot {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  display: none; pointer-events: none;
}
.map-card-slot.is-shown { display: block; }
.map-card-slot .spa-box {
  pointer-events: auto; position: relative;
  max-width: 420px; margin: 0 auto;
  background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.22);
  overflow: hidden;
}
/* Compact the cloned card so it doesn't swallow the map. */
.map-card-slot .spa-box .img { height: 130px !important; }
.map-card-slot .spa-box .slider { height: 130px; }
.map-card-slot .spa-box .slider img { width: 100%; height: 130px; object-fit: cover; }
.map-card-close {
  pointer-events: auto; position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 18px; line-height: 26px;
  text-align: center; cursor: pointer; padding: 0;
}

/* One card per row inside the narrow results column. */
.search-res-n-map.map-opened .promoted { grid-template-columns: 1fr !important; }

/* Cards horizontal: image + content side by side (spas AND packages — both .spa-box).
 * inline-flex activates the row layout for package boxes (which render as block). */
.search-res-n-map.map-opened .spa-box {
  display: inline-flex !important;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: none;
  padding: 0;
}
.search-res-n-map.map-opened .spa-box .img {
  flex: 0 0 42%;
  max-width: 160px;
  height: 160px;
  padding: 0 !important;
}
.search-res-n-map.map-opened .spa-box .spa-box-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
/* Hide the long description in the compact map-mode card. */
.search-res-n-map.map-opened .spa-box-content .desc { display: none; }
/* "X matching packages" (.count_packs) sits BELOW the price (.s-from). */
.search-res-n-map.map-opened .spa-box .count_packs { order: 99; margin-top: 6px; }

/* Toggle: show ONLY the selected section (spas OR packages). */
.search-res-n-map .block-res.is-hidden { display: none; }

/* Desktop fix: results column fills its grid cell. */
@media (min-width: 993px) {
  .search-res-n-map.map-opened #the-search-res { width: 100%; }
  .search-res-n-map.map-opened{height:calc(100vh - 150px);border:1px solid #ccc;border-radius:25px;overflow:hidden;align-items: start;box-shadow: 0 4px 16px #12234414;}
}

/* Tablet (601–992): stack — map on top, results below. */
@media (min-width: 601px) and (max-width: 992px) {
  .search-res-n-map.map-opened { grid-template-columns: 1fr; }
  .search-res-n-map.map-opened .the-map {
    order: 1; position: relative; top: 0; height: 60vh; min-height: 320px;
  }
  .search-res-n-map.map-opened #the-search-res { order: 2; max-height: none; }
}

/* Phone (≤600): map is a full-screen overlay toggled by a floating button;
   the results list stays in its normal vertical layout underneath. */
@media (max-width: 600px) {
  /* Sort ("popular") sits beside the Spas/Packages toggle on one row. */
  .search-bar-sticky2 { flex-direction: row; align-items: stretch; justify-content: space-between; }
  .search-switch { width: calc(100% - 60px); }
  /* Closed (list) view: the sort collapses to a chevron-only button. */
  .sort-n-map select[name=orderby] {-webkit-appearance:none;-moz-appearance:none;appearance:none;width:42px;height: 44px;border-radius: 10px;min-width:0;padding:0;color:transparent;border: 1px solid #cccccc;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232e3a59' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center #fff;box-shadow: 0 2px 10px rgb(18 35 68 / 4%);}
  /* Floating "map" button over the results (sticky bottom). */
  #open-spa-map {
    position: fixed !important; left: 50%; transform: translateX(-50%);
    bottom: 16px; z-index: 1100; margin: 0;
    background: #122344; color: #fff; border: 1px solid #122344;
    box-shadow: 0 6px 20px rgba(0,0,0,.28); border-radius: 999px;
    height: auto; padding: 12px 22px; white-space: nowrap;
  }
  /* Open state on phone: "Back to list" pinned top-right, with a back-arrow icon. */
  #open-spa-map.is-open { left: auto; right: 52px; top: 12px; bottom: auto; transform: none; border-radius: 10px; }
  #open-spa-map.is-open .mb-ico-list { display: none; }
  #open-spa-map.is-open .mb-ico-back { display: inline-flex; }
  /* Full-screen map when opened. */
  .search-res-n-map.map-opened .the-map {
    position: fixed !important; inset: 0 !important; top: 0 !important;
    width: 100vw !important; height: 100vh !important; max-height: none !important;
    margin: 0 !important; border-radius: 0 !important; z-index: 1000;
  }
  .search-res-n-map.map-opened #spa-map { width: 100% !important; height: 100% !important; }
  /* Undo the desktop horizontal (map-mode) card — keep normal vertical cards on phone. */
  .search-res-n-map.map-opened .spa-box { display: block !important; }
  .search-res-n-map.map-opened .spa-box .img {
    flex: none !important; max-width: none !important; height: auto !important; padding: 0 !important;
  }
  .search-res-n-map.map-opened .spa-box-content .desc { display: block; }
  .search-res-n-map.map-opened .spa-box .count_packs { order: 0; }
  /* Lift the map card above the floating button. */
  .map-card-slot { bottom: 12px; }
  /* The card-on-map stays horizontal (image + content side by side), even though
     the list cards above revert to vertical on phone. */
  .search-res-n-map.map-opened .map-card-slot .spa-box {
    display: inline-flex !important; flex-direction: row; align-items: stretch;
  }
  .search-res-n-map.map-opened .map-card-slot .spa-box .img {
    flex: 0 0 42% !important; max-width: 160px !important; height: 130px !important; padding: 0 !important;
  }
  .search-res-n-map.map-opened .map-card-slot .spa-box-content .desc { display: none; }
  body .promoted.new2026 .spa-box{margin:0 10px !important;max-width:calc(100% - 20px)}
  .fiters-btn.has-count {font-size: 0;}
  .fiters-btn.has-count .fiters-count {display: none;}
}

body .searchTop .container>.gTitle {
    margin-left: 0;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
}

/* [#7] "from" label in the price is muted grey; the price itself stays pink. */
.promoted_price .new { color: #757f92; font-size: 11px; }
.promoted_price .new strong { color: rgba(208,55,105,1); }

/* [page] Card image sizing via aspect-ratio (replaces the padding-bottom hack). */
.spa-box .slider.owl-carousel { height: auto; aspect-ratio: 1.2; }
.spa-box.ppp img { height: auto; aspect-ratio: 1.2; position: static; }
.spa-box.ppp .img { padding-bottom: 0 !important; }   /* cancel the inline padding-bottom:70% */

/* [page] price + rating-beside-name */
.spa-box.new2026 .s-from strong { font-size: 24px; line-height: 1; }
.rank-inline .spa-box-content { position: relative; }
.rank-inline .spa-box-content .rank {position: absolute;top: 10px;right: 5px;bottom: auto;left: auto;margin: 0;background: rgba(208,55,105,1);color:#fff;border-radius: 8px;font-size: 15px;font-weight: 700;line-height: 1;padding: 6px 9px;z-index: 3;}
.rank-inline .spa-box-content .rank i { display: none; }
.rank-inline .spa-box-content .pkg-name { padding-right: 46px; }

div#spa-map .spa-box.rank-inline .spa-box-content .rank {top: 50px;}

