/**
 * MARROQUE Curated Shop Filter Sidebar, Sharp 90-Degree Price Slider,
 * Full-Bleed Category Hero Framing, Clean Mobile Typography & Slim Toast (v7.8.1)
 */

/* ==========================================================================
   1. Full-Bleed Category Hero Photo Framing & Balanced Typography
   ========================================================================== */
.term-description > .mq-cat-hero > h2,
.term-description > .mq-cat-hero > .mq-cat-specs > div > div {
  text-wrap: balance;
}
.term-description > .mq-cat-hero > p:nth-of-type(2) {
  text-wrap: normal;
}
.term-description > .mq-cat-hero > p:nth-of-type(2) > .mq-th-clause {
  display: inline-block;
  max-width: 100%;
}

/* Reflow Desktop Category Descriptions naturally on non-locked categories so lines > 520px never leave 1-word orphan stubs before manual \n */
body:not(.term-cargo):not(.term-indiana):not(.term-milo) .term-description > .mq-cat-hero > p:nth-of-type(4),
body:not(.term-cargo):not(.term-indiana):not(.term-milo) .term-description > .mq-cat-hero > p:nth-of-type(5) {
  white-space: normal !important;
  text-wrap: pretty;
}


.term-description > .mq-cat-hero.mq-cat-hero--packshot::after,
body:is(.term-wendy-25, .term-wendy, .term-mini-wendy, .term-mini-bag, .term-mini-bags) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero)::after {
  background-size: cover, cover !important;
  background-position: center 68%, center center !important;
}
.term-description > .mq-cat-hero.mq-cat-hero--lifestyle::after {
  background-size: cover, cover !important;
  background-position: center 42%, center center !important;
}

/* ==========================================================================
   1B. Mobile Category / Archive / Special Offers Hero Polish (<= 849px)
       - Removes duplicate English hook & long English paragraph on phones
         so shoppers reach the bags immediately without a wall of text.
       - Collapses desktop manual `\n` breaks (`white-space: normal`) and
         applies `text-wrap: balance` so zero orphan words (`เต็ม`, `กก.`) occur.
       - Streamlines the 3-column spec bar to crisp Thai labels + minimal icons.
   ========================================================================== */
@media only screen and (max-width: 849px) {
  .term-description > .mq-cat-hero.mq-cat-hero--packshot::after,
  body:is(.term-wendy-25, .term-wendy, .term-mini-wendy, .term-mini-bag, .term-mini-bags) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero)::after {
    background-size: cover, cover !important;
    background-position: center 66%, center center !important;
  }
  .term-description > .mq-cat-hero.mq-cat-hero--lifestyle::after {
    background-size: cover, cover !important;
    background-position: center 42%, center center !important;
  }

  /* Compact single-line Eyebrow (`— DESIGNED BY THAI DESIGNERS —`) */
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(1) {
    gap: 8px !important;
    margin: 2px auto 8px !important;
    white-space: nowrap !important;
    font-size: 9px !important;
    letter-spacing: 2.1px !important;
  }
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(1)::before,
  body:not(.term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(1)::after {
    width: 18px !important;
  }

  /* Balanced single-line or symmetrical Title (`ALL COLLECTIONS`, `WENDY 28 NEW ROAD`) */
  body:not(.term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > h2,
  body.term-milo :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > h2::after {
    font-size: clamp(22px, 6.2vw, 28px) !important;
    letter-spacing: 4.5px !important;
    line-height: 1.2 !important;
    text-wrap: balance !important;
  }
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > h2 {
    padding-left: 4.5px !important;
    margin: 0 auto 8px !important;
  }

  /* Symmetrical 2-line Thai Hook above the bag photo (zero orphan word) */
  body:not(.term-cargo):not(.term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(2),
  body:is(.term-cargo, .term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(2)::after {
    font-size: 15.5px !important;
    font-weight: 400 !important;
    line-height: 1.48 !important;
    max-width: 344px !important;
    margin: 0 auto 14px !important;
    white-space: normal !important;
    text-wrap: normal !important;
  }

  /* Hide duplicate English Hook (`p:nth-of-type(3)`) & long English Body (`p:nth-of-type(5)`) on Mobile */
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(3),
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(5) {
    display: none !important;
  }

  /* Clean Hero Photo spacing on Mobile */
  body :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero)::after {
    margin: 0 auto 16px !important;
    min-height: 230px !important;
    max-height: 340px !important;
  }

  /* Reflow Thai Description (`p:nth-of-type(4)`) naturally without desktop `\n` orphan breaks */
  body:not(.term-cargo):not(.term-indiana):not(.term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(4),
  body:is(.term-cargo, .term-indiana, .term-milo) :is(.term-description > div[style*="max-width"], .term-description > .mq-cat-hero) > p:nth-of-type(4)::after {
    white-space: normal !important;
    text-wrap: balance !important;
    font-size: 13px !important;
    font-weight: 300 !important;
    line-height: 1.66 !important;
    color: #433f39 !important;
    max-width: 358px !important;
    padding: 0 8px !important;
    margin: 0 auto 2px !important;
  }

  /* Streamlined 3-Column Spec Bar: Minimal Icon + Balanced Thai Label Only (No English Sub-Line Clutter) */
  :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) {
    margin: 18px auto 0 !important;
    padding: 13px 0 12px !important;
  }
  :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) > div {
    padding: 2px 6px !important;
  }
  body:not(.term-cargo):not(.term-indiana):not(.term-milo) :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) > div > div[lang="th"],
  body:is(.term-cargo, .term-indiana, .term-milo) :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) > div > div[lang="th"]::after {
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.36 !important;
    letter-spacing: 0.05px !important;
    margin-bottom: 0 !important;
    text-wrap: balance !important;
  }
  :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) > div > div[lang="en"],
  :is(.term-description > div[style*="max-width"] > div[style*="display"], .term-description > .mq-cat-hero > .mq-cat-specs) > div > div[lang="en"]::after {
    display: none !important;
  }
}

/* ==========================================================================
   2. Safeguard: Hide Any Cached Links to Retired / Discontinued Categories
   ========================================================================== */
li.menu-item:has(> a[href*="/product-category/london"]),
li.menu-item:has(> a[href*="/product-category/maxine"]),
li.menu-item:has(> a[href*="/product-category/emily"]),
li.menu-item:has(> a[href*="/product-category/olivia"]),
li.menu-item:has(> a[href*="/product-category/zadie"]),
li.menu-item:has(> a[href*="/product-category/franken"]),
li.menu-item:has(> a[href*="/product-category/poh"]),
li.cat-item:has(> a[href*="/product-category/london"]),
li.cat-item:has(> a[href*="/product-category/maxine"]),
li.cat-item:has(> a[href*="/product-category/emily"]),
li.cat-item:has(> a[href*="/product-category/olivia"]),
li.cat-item:has(> a[href*="/product-category/zadie"]),
li.cat-item:has(> a[href*="/product-category/franken"]),
li.cat-item:has(> a[href*="/product-category/poh"]) {
  display: none !important;
}

/* ==========================================================================
   3. Off-Canvas & Shop Sidebar Container Polish (#shop-sidebar / #product-sidebar)
   ========================================================================== */
.mfp-content #shop-sidebar,
.mfp-content #product-sidebar,
#shop-sidebar.sidebar-inner {
  background-color: #ffffff !important;
}
.mfp-content #shop-sidebar .sidebar-inner,
.mfp-content #product-sidebar .sidebar-inner {
  padding: 28px 24px 38px !important;
}
#shop-sidebar .widget,
#product-sidebar .widget {
  margin-bottom: 28px !important;
}
#shop-sidebar .widget:last-child,
#product-sidebar .widget:last-child {
  margin-bottom: 0 !important;
}
#shop-sidebar .widget .is-divider,
#product-sidebar .widget .is-divider {
  display: none !important;
}

/* ==========================================================================
   4. Sharp 90-Degree Single-Line FILTER BY PRICE (.widget_price_filter)
   ========================================================================== */
#shop-sidebar .widget_price_filter,
#product-sidebar .widget_price_filter,
.widget_price_filter {
  padding-bottom: 24px !important;
  border-bottom: 1px solid #eae7e1 !important;
}
.widget_price_filter span.widget-title {
  display: block !important;
  font-family: var(--mq-font-en) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 2.4px !important;
  line-height: 1.4 !important;
  color: #141414 !important;
  text-transform: uppercase !important;
  margin: 0 0 18px !important;
}

/* Price Slider Rail & Sharp Square Handles */
.widget_price_filter .price_slider {
  margin: 0 6px 18px !important;
  height: 2px !important;
  background-color: #e3dfd7 !important;
  border-radius: 0 !important;
}
.widget_price_filter .ui-slider .ui-slider-range {
  background-color: #141414 !important;
  height: 2px !important;
  border-radius: 0 !important;
}
.widget_price_filter .ui-slider .ui-slider-handle {
  width: 12px !important;
  height: 12px !important;
  top: -5px !important;
  background-color: #141414 !important;
  border: 1px solid #141414 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: ew-resize !important;
  transition: background-color 0.2s ease, transform 0.15s ease !important;
}
.widget_price_filter .ui-slider .ui-slider-handle:hover,
.widget_price_filter .ui-slider .ui-slider-handle.ui-state-active {
  background-color: #7a684e !important;
  border-color: #7a684e !important;
  transform: scale(1.12) !important;
}

/* Single-Line Button + Price Range Row (Zero Line Wrapping) */
.widget_price_filter .price_slider_amount {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  margin-top: 16px !important;
  padding: 0 !important;
}
.widget_price_filter .price_slider_amount::before,
.widget_price_filter .price_slider_amount::after {
  display: none !important;
  content: none !important;
}
.widget_price_filter .price_slider_amount .button {
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 8px 16px !important;
  background-color: #141414 !important;
  color: #ffffff !important;
  border: 1px solid #141414 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--mq-font-en) !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
  letter-spacing: 2px !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}
.widget_price_filter .price_slider_amount .button:hover {
  background-color: #7a684e !important;
  border-color: #7a684e !important;
  color: #ffffff !important;
}
.widget_price_filter .price_slider_amount .price_label {
  float: none !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  font-family: var(--mq-font-en) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0.15px !important;
  line-height: 1.3 !important;
  color: #6e685f !important;
  white-space: nowrap !important;
  text-align: right !important;
  flex: 0 1 auto !important;
}
.widget_price_filter .price_slider_amount .price_label span {
  color: #141414 !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   5. Curated 2-Group Filter Navigation (BY STYLE & BY COLLECTION)
   ========================================================================== */
.mrq-filter-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 28px !important;
}
.mrq-filter-group {
  margin: 0 !important;
  padding: 0 !important;
}
.mrq-filter-group__head {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 0 0 10px !important;
  margin: 0 0 4px !important;
  border-bottom: 1px solid #181715 !important;
}
.mrq-filter-group__en {
  font-family: var(--mq-font-en) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  letter-spacing: 2.4px !important;
  line-height: 1.3 !important;
  color: #141414 !important;
  text-transform: uppercase !important;
}
.mrq-filter-group__th {
  font-family: var(--mq-font-th) !important;
  font-size: 11.5px !important;
  font-weight: 300 !important;
  letter-spacing: 0.2px !important;
  line-height: 1.3 !important;
  color: #7c756c !important;
}

.mrq-filter-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mrq-filter-list > li.mrq-filter-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f1eee8 !important;
}
.mrq-filter-list > li.mrq-filter-item > a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 8.5px 2px !important;
  font-family: var(--mq-font-en), var(--mq-font-th) !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px !important;
  line-height: 1.4 !important;
  color: #2b2926 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, padding-left 0.2s ease !important;
}
.mrq-filter-list > li.mrq-filter-item > a:hover {
  color: #7a684e !important;
  padding-left: 5px !important;
}
.mrq-filter-list > li.mrq-filter-item.is-active > a {
  color: #141414 !important;
  font-weight: 500 !important;
  padding-left: 9px !important;
  border-left: 2px solid #141414 !important;
}

/* Expandable Sub-Family Accordions (Wendy, Balloon, Wallets & Small Goods) */
.mrq-filter-accordions {
  margin-top: 2px !important;
}
details.mrq-filter-acc {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f1eee8 !important;
}
summary.mrq-filter-acc__summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 9.5px 2px !important;
  cursor: pointer !important;
  font-family: var(--mq-font-en) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.25px !important;
  line-height: 1.4 !important;
  color: #181715 !important;
  user-select: none !important;
  transition: color 0.2s ease !important;
}
summary.mrq-filter-acc__summary::-webkit-details-marker {
  display: none !important;
}
summary.mrq-filter-acc__summary::marker {
  content: "" !important;
}
summary.mrq-filter-acc__summary:hover {
  color: #7a684e !important;
}
.mrq-filter-acc__icon::before {
  content: "+" !important;
  display: inline-block !important;
  font-family: var(--mq-font-en) !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  color: #7c756c !important;
}
details.mrq-filter-acc[open] .mrq-filter-acc__icon::before {
  content: "\2212" !important;
  color: #141414 !important;
}

.mrq-filter-list.mrq-filter-list--sub {
  padding: 2px 0 10px 12px !important;
  margin: 0 0 4px 2px !important;
  border-left: 1px solid #e4e0d8 !important;
}
.mrq-filter-list.mrq-filter-list--sub > li.mrq-filter-item {
  border-bottom: none !important;
}
.mrq-filter-list.mrq-filter-list--sub > li.mrq-filter-item > a {
  padding: 5.5px 2px !important;
  font-size: 13px !important;
  color: #57524b !important;
}
.mrq-filter-list.mrq-filter-list--sub > li.mrq-filter-item > a:hover {
  color: #141414 !important;
  padding-left: 4px !important;
}
.mrq-filter-list.mrq-filter-list--sub > li.mrq-filter-item.is-active > a {
  color: #141414 !important;
  font-weight: 500 !important;
  padding-left: 8px !important;
  border-left: 2px solid #141414 !important;
}

/* ==========================================================================
   6. Sleek Architectural 90-Degree Coupon Notification Toast (.mrq-url-coupon-toast)
      - Fixes CSS shrink-to-fit `left: 50%` 50vw compression so toast expands
        into a slim horizontal single-line ribbon on Desktop & wide 1–2 line bar on Mobile.
   ========================================================================== */
.mrq-url-coupon-toast {
  width: max-content !important;
  max-width: min(680px, calc(100vw - 32px)) !important;
  padding: 10px 18px !important;
  gap: 11px !important;
  background-color: #141414 !important;
  border: 1px solid #2e2b27 !important;
  border-radius: 0 !important;
  box-shadow: 0 12px 32px rgba(20, 19, 17, 0.2) !important;
  box-sizing: border-box !important;
}

.mrq-url-coupon-toast__text {
  flex: 1 1 auto !important;
  font-size: 12.5px !important;
  font-weight: 300 !important;
  letter-spacing: 0.2px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

button.mrq-url-coupon-toast__close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 22px !important;
  height: 22px !important;
  min-height: 0 !important;
  margin: 0 0 0 4px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 17px !important;
  line-height: 1 !important;
  color: #9e988e !important;
}

@media only screen and (max-width: 640px) {
  .mrq-url-coupon-toast {
    bottom: 16px !important;
    width: calc(100vw - 24px) !important;
    max-width: 440px !important;
    padding: 10px 14px !important;
    gap: 9px !important;
  }
  .mrq-url-coupon-toast__text {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}
