html.mp-search-open, body.mp-search-open { overflow: hidden !important; }
#mp-search-overlay { position: fixed; inset: 0; z-index: 2147483000; background: rgba(13,16,23,.74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility .22s ease; font-family: inherit; }
#mp-search-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
#mp-search-overlay * { box-sizing: border-box; }
.mp-search-shell { position: absolute; inset: 0; display: flex; flex-direction: column; background: #f6f7f9; transform: translateY(10px) scale(.995); transition: transform .25s ease; color: #17191f; }
#mp-search-overlay.active .mp-search-shell { transform: none; }
.mp-search-topbar { min-height: 104px; padding: 22px clamp(18px,4vw,62px); background: #fff; border-bottom: 1px solid #e7e9ee; display: grid; grid-template-columns: minmax(120px,210px) minmax(280px,1fr) minmax(100px,180px); gap: 24px; align-items: center; box-shadow: 0 8px 30px rgba(16,24,40,.05); position: relative; z-index: 3; }
.mp-search-brand { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 900; color: #7b818d; }
.mp-search-field-wrap { height: 60px; background: #f4f5f7; border: 1px solid #e1e4e9; border-radius: 18px; display: flex; align-items: center; padding: 0 16px 0 20px; transition: box-shadow .2s,border-color .2s,background .2s; }
.mp-search-field-wrap:focus-within { background: #fff; border-color: #22252b; box-shadow: 0 0 0 4px rgba(20,25,35,.07),0 12px 40px rgba(25,35,60,.09); }
.mp-search-icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; flex: 0 0 auto; color: #34383f; }
#mp-search-input { width: 100%; height: 58px; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; color: #17191f !important; font-size: clamp(17px,1.6vw,23px) !important; font-weight: 650; padding: 0 15px !important; margin: 0 !important; }
#mp-search-input::placeholder { color: #9298a3; font-weight: 500; }
#mp-search-input::-webkit-search-cancel-button { display: none; }
#mp-search-clear { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e7e9ed; color: #555b65; font-size: 25px; line-height: 1; cursor: pointer; transition: .18s; }
#mp-search-clear:hover { background: #dfe2e7; transform: rotate(8deg); }
#mp-search-close { justify-self: end; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #31353c; cursor: pointer; font-size: 14px; }
#mp-search-close b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #191b20; color: #fff; font-size: 25px; font-weight: 400; transition: transform .2s,background .2s; }
#mp-search-close:hover b { transform: rotate(90deg); background: #000; }
.mp-search-toolbar { padding: 16px clamp(18px,4vw,62px); display: flex; gap: 12px; align-items: end; flex-wrap: wrap; background: rgba(255,255,255,.95); border-bottom: 1px solid #e8eaee; position: relative; z-index: 2; }
.mp-filter-group { min-width: 180px; }
.mp-filter-group label { display: block; margin: 0 0 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; font-weight: 900; color: #858b95; }
.mp-filter-group select { height: 42px; min-width: 190px; border: 1px solid #dfe2e7; border-radius: 12px; background: #fff; color: #292d34; padding: 0 38px 0 13px; font-weight: 700; outline: none; cursor: pointer; }
.mp-filter-group select:focus { border-color: #23262c; box-shadow: 0 0 0 3px rgba(20,25,35,.06); }
.mp-mobile-filter-toggle { display:none; }
.mp-result-count { margin-left: auto; min-height: 42px; display: flex; align-items: center; color: #777e89; font-size: 13px; font-weight: 800; }
.mp-search-body { flex: 1 1 auto; overflow: auto; padding: 26px clamp(18px,4vw,62px) 50px; overscroll-behavior: contain; }
.mp-product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; max-width: 1720px; margin: 0 auto; }
.mp-product-card { min-width: 0; background: #fff; border: 1px solid #e6e8ec; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(21,31,50,.055); transition: transform .22s ease,box-shadow .22s ease,border-color .22s ease; }
.mp-product-card:hover { transform: translateY(-3px); border-color: #d6d9df; box-shadow: 0 18px 48px rgba(21,31,50,.12); }
.mp-product-image { position: relative; display: block; width: 100%; aspect-ratio: 1.35/1; overflow: hidden; background: #fff !important; isolation:isolate; }
.mp-product-image img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 10px; background: #fff !important; transition: transform .35s ease; }
.mp-product-card:hover .mp-product-image img { transform: scale(1.025); }
.mp-product-content { display: flex; flex-direction: column; flex: 1; padding: 17px; min-width: 0; }
.mp-category-pill { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; min-height: 28px; padding: 6px 11px; border-radius: 999px; background: #1f232a; color: #fff !important; text-decoration: none !important; font-size: 10px; line-height: 1.15; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; transition: .18s; }
a.mp-category-pill:hover { background: #000; transform: translateY(-1px); }
.mp-product-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 50px; margin: 13px 0 10px; color: #17191f !important; text-decoration: none !important; font-size: 17px; line-height: 1.42; font-weight: 800; }
.mp-product-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0 13px; border-top: 1px solid #f0f1f3; color: #787e88; font-size: 11px; }
.mp-product-meta b { color: #33373e; }
.mp-stock { padding: 5px 8px; border-radius: 8px; white-space: nowrap; font-size: 10px; font-weight: 900; }
.mp-stock.in-stock { background: #ecf8f0; color: #228147; }
.mp-stock.made-to-order { background: #fff4e7; color: #a66109; }
.mp-product-bottom { margin-top: auto; display: grid; gap: 12px; }
.mp-price { min-height: 36px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.mp-price strong { font-size: 21px; letter-spacing: -.02em; color: #15171b; }
.mp-price-old { color: #a2a7af; text-decoration: line-through; font-size: 13px; }
.mp-dimensions { min-height: 36px; display: flex; align-items: center; gap: 8px; color: #7a4b00; font-size: 13px; font-weight: 900; }
.mp-ruler { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #fff0d7; font-size: 17px; }
.mp-product-action { width: 100%; min-height: 46px; border-radius: 12px; border: 0; padding: 11px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #1a1d22; color: #fff !important; text-decoration: none !important; font-size: 12px; font-weight: 900; cursor: pointer; transition: transform .17s ease,background .17s ease,box-shadow .17s ease; }
.mp-product-action:hover { background: #000; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.mp-product-action.option-action { background: #8a5b13; }
.mp-product-action.option-action:hover { background: #70470b; }
.mp-product-action.added { background: #218049; }
.mp-product-action:disabled { opacity: .7; cursor: wait; transform: none; }
.mp-cart-symbol { font-size: 17px; font-weight: 500; }
.mp-search-welcome,.mp-search-empty,.mp-search-loading { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #7b818b; }
.mp-search-welcome h2,.mp-search-empty h3 { margin: 10px 0 6px; color: #20242a; font-size: clamp(24px,3vw,42px); letter-spacing: -.04em; }
.mp-search-welcome p,.mp-search-empty p { max-width: 650px; font-size: 14px; line-height: 1.7; }
.mp-welcome-icon,.mp-search-empty > div { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 24px; background: #fff; border: 1px solid #e4e6ea; box-shadow: 0 12px 35px rgba(20,30,50,.07); font-size: 42px; color: #262a30; }
.mp-loader { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #dfe2e7; border-top-color: #17191f; animation: mpSpin .65s linear infinite; margin-bottom: 14px; }
.mp-search-loading strong { color: #20242a; font-size: 17px; margin-bottom: 4px; }
.mp-search-loading span { font-size: 12px; }
.mp-mini-loader { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: mpSpin .6s linear infinite; }
@keyframes mpSpin { to { transform: rotate(360deg); } }
@media (max-width: 1250px) { .mp-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 920px) {
  .mp-search-topbar { min-height: auto; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 12px 14px; }
  .mp-search-brand { display: none; }
  .mp-search-field-wrap { height: 52px; border-radius: 16px; background:#fff; box-shadow:0 3px 16px rgba(20,28,45,.06); }
  #mp-search-input { height: 50px; font-size: 16px !important; }
  #mp-search-close span { display: none; }
  #mp-search-close b { width: 40px; height: 40px; }
  .mp-search-toolbar { padding: 11px 14px 13px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; align-items:stretch; background:#fff; overflow:visible; }
  .mp-filter-group { min-width:0; position:relative; padding:9px 9px 8px; border:1px solid #e3e6eb; border-radius:14px; background:#fff; box-shadow:0 3px 12px rgba(25,35,55,.045); }
  .mp-filter-group label { display:block; margin:0 0 5px; font-size:9px; letter-spacing:.08em; color:#7b818c; }
  .mp-filter-group select { width:100%; min-width:0; max-width:100%; height:34px; border:0; border-radius:9px; background:#f6f7f9; padding:0 26px 0 9px; font-size:11px; font-weight:800; text-overflow:ellipsis; }
  .mp-result-count { grid-column:1/-1; min-height:24px; margin:0; padding:0 2px; justify-content:flex-end; font-size:12px; }
  .mp-search-body { padding: 14px 14px 35px; }
  .mp-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
}
@media (max-width: 620px) {
  #mp-search-overlay { background:#fff; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .mp-search-shell { background:#f6f7f9; }
  .mp-search-topbar { position:sticky; top:0; z-index:8; padding:10px 11px; gap:8px; box-shadow:0 4px 16px rgba(20,28,45,.06); }
  .mp-search-field-wrap { height:50px; padding:0 10px 0 13px; border-radius:15px; background:#fff; }
  #mp-search-input { height:48px; font-size:16px !important; padding:0 9px !important; }
  .mp-search-icon { width:19px; height:19px; }
  #mp-search-clear { width:30px; height:30px; font-size:20px; }
  #mp-search-close b { width:40px; height:40px; font-size:22px; }

  /* Mobile filter drawer: one large trigger, then full-width controls. */
  .mp-search-toolbar {
    position:relative; top:auto; z-index:6; display:grid; grid-template-columns:1fr !important;
    gap:10px; width:100%; padding:12px 11px 13px; background:#fff;
    border-bottom:1px solid #e5e7eb; box-shadow:0 5px 16px rgba(20,28,45,.035); overflow:visible;
  }
  .mp-mobile-filter-toggle {
    grid-column:1/-1; width:100%; min-height:54px; border:1px solid #d9dde4; border-radius:14px;
    background:#fff; color:#20242a; padding:0 14px; display:flex; align-items:center; gap:12px;
    font-size:14px; font-weight:900; text-align:left; cursor:pointer; box-shadow:0 5px 18px rgba(20,28,45,.055);
    -webkit-tap-highlight-color:transparent;
  }
  .mp-mobile-filter-toggle:active { transform:scale(.995); }
  .mp-filter-toggle-icon { width:30px; height:30px; flex:0 0 30px; border-radius:9px; background:#f3f4f6; display:flex; flex-direction:column; justify-content:center; gap:4px; padding:0 7px; }
  .mp-filter-toggle-icon i { display:block; height:2px; border-radius:2px; background:#20242a; position:relative; }
  .mp-filter-toggle-icon i:nth-child(1)::after,.mp-filter-toggle-icon i:nth-child(3)::after { content:''; position:absolute; top:50%; width:5px; height:5px; border:2px solid #20242a; border-radius:50%; background:#fff; transform:translateY(-50%); }
  .mp-filter-toggle-icon i:nth-child(1)::after { left:3px; }
  .mp-filter-toggle-icon i:nth-child(3)::after { right:3px; }
  .mp-filter-toggle-text { flex:1 1 auto; }
  .mp-filter-toggle-arrow { width:28px; height:28px; display:grid; place-items:center; font-size:22px; line-height:1; transition:transform .22s ease; }
  .mp-search-toolbar.filters-open .mp-filter-toggle-arrow { transform:rotate(180deg); }
  .mp-filter-group, .mp-filter-group:first-child {
    grid-column:1 / -1 !important; width:100% !important; min-width:0 !important; max-width:none !important;
    padding:10px 11px; border:1px solid #dfe3e8; border-radius:14px; background:#fff;
    box-shadow:0 3px 12px rgba(25,35,55,.045); display:none;
  }
  .mp-search-toolbar.filters-open .mp-filter-group { display:block; }
  .mp-filter-group label { display:block; margin:0 0 7px; font-size:10px; line-height:1.2; letter-spacing:.09em; color:#6f7681; }
  .mp-filter-group select {
    display:block; width:100% !important; min-width:100% !important; max-width:100% !important; height:46px !important;
    border:1px solid #e1e4e9 !important; border-radius:11px; background:#f7f8fa !important;
    padding:0 38px 0 12px !important; font-size:14px !important; line-height:46px; font-weight:800; color:#20242a;
  }
  .mp-filter-group select:focus { background:#fff !important; border-color:#20242a !important; }
  .mp-result-count { grid-column:1/-1; width:100%; min-height:24px; margin:0; justify-content:flex-start; padding:1px 2px 0; font-size:12px; color:#6f7682; }

  .mp-search-body { padding:11px 10px 28px; }
  .mp-product-grid { grid-template-columns:1fr; gap:10px; }
  .mp-product-card { flex-direction:row; min-height:150px; border-radius:15px; box-shadow:0 5px 18px rgba(21,31,50,.05); background:#fff; }
  .mp-product-image { width:34%; flex:0 0 34%; min-height:150px; aspect-ratio:auto; background:#fff !important; border-right:1px solid #f0f1f3; }
  .mp-product-image img { padding:8px; background:#fff !important; }
  .mp-product-content { padding:11px; background:#fff; }
  .mp-category-pill { min-height:22px; font-size:8px; padding:4px 7px; }
  .mp-product-title { min-height:auto; margin:7px 0 6px; font-size:13px; line-height:1.32; -webkit-line-clamp:2; }
  .mp-product-meta { display:grid; grid-template-columns:1fr; gap:4px; padding:6px 0 7px; font-size:9.5px; }
  .mp-stock { justify-self:start; font-size:8.5px; padding:4px 6px; }
  .mp-product-bottom { gap:7px; }
  .mp-price { min-height:26px; }
  .mp-price strong { font-size:16px; }
  .mp-dimensions { min-height:26px; font-size:10.5px; gap:6px; }
  .mp-ruler { width:24px; height:24px; font-size:14px; }
  .mp-product-action { min-height:39px; padding:8px; border-radius:9px; font-size:10px; }
}
@media (max-width: 390px) {
  .mp-search-topbar { padding-left:8px; padding-right:8px; }
  .mp-search-toolbar { padding-left:8px; padding-right:8px; gap:9px; grid-template-columns:1fr !important; }
  .mp-product-card { min-height:138px; }
  .mp-product-image { width:31%; flex-basis:31%; min-height:138px; }
  .mp-product-content { padding:9px; }
  .mp-category-pill { max-width:100%; }
  .mp-product-title { font-size:12.5px; }
  .mp-product-action { font-size:9px; }
}


/* v1.6 - Load more */
.mp-load-more-wrap { width:100%; display:flex; justify-content:center; padding:26px 0 10px; }
.mp-load-more { min-width:260px; min-height:58px; border:1px solid #d9dde4; border-radius:16px; background:#fff; color:#20242a; padding:10px 18px; display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; column-gap:14px; align-items:center; text-align:left; cursor:pointer; box-shadow:0 8px 24px rgba(20,28,45,.07); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.mp-load-more:hover { transform:translateY(-1px); border-color:#b8bec8; box-shadow:0 12px 30px rgba(20,28,45,.11); }
.mp-load-more span { grid-column:1; grid-row:1; font-size:14px; font-weight:900; }
.mp-load-more small { grid-column:1; grid-row:2; margin-top:2px; font-size:10px; color:#7b818b; font-weight:700; }
.mp-load-more b { grid-column:2; grid-row:1/3; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:#f3f4f6; font-size:18px; }
@media (max-width:620px) {
  .mp-load-more-wrap { padding:16px 0 5px; }
  .mp-load-more { width:100%; min-width:0; min-height:56px; border-radius:14px; }
}


/* v1.7 - Full width highlighted Load More CTA */
.mp-load-more-wrap {
  width: 100% !important;
  display: block !important;
  padding: 22px 0 12px !important;
}
.mp-load-more {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 62px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #9a6200 0%, #b77905 100%) !important;
  color: #fff !important;
  padding: 12px 22px !important;
  box-shadow: 0 10px 26px rgba(154,98,0,.22) !important;
}
.mp-load-more:hover,
.mp-load-more:focus {
  background: linear-gradient(135deg, #875500 0%, #a66c00 100%) !important;
  color: #fff !important;
  box-shadow: 0 13px 32px rgba(154,98,0,.28) !important;
}
.mp-load-more span {
  color: #fff !important;
  font-size: 15px !important;
}
.mp-load-more small {
  color: rgba(255,255,255,.82) !important;
}
.mp-load-more b {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
}
@media (max-width: 767px) {
  .mp-load-more-wrap { padding: 14px 0 6px !important; }
  .mp-load-more { min-height: 58px !important; border-radius: 12px !important; }
}


/* ============================================================
   v19 HARD FIX — ZERO SEARCH FLASH ON PAGE/PRODUCT LOAD
   ============================================================ */

/* Our v19 overlay is absolutely impossible to show unless .active exists. */
html body #mp-search-overlay:not(.active),
html body .mp-search-overlay:not(.active){
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
}

/* Disable the SECOND/legacy MyPouf modal built by Journal3 search.js.
   v19 is now the only fullscreen AJAX search UI. */
html body #mypouf-search-modal,
html body .mypouf-search-modal{
    display:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
}

/* Only v19 active overlay may be visible. */
html body #mp-search-overlay.active{
    display:flex!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
}
