/* Zosouq mobile search overlay */

.zs-search {
  display: none;
}

@media (max-width: 1023px) {
  body.zs-search-on {
    overflow: hidden;
  }

  body.zs-search-on header.sticky,
  body.zs-search-on .zs-bn,
  body.zs-search-on .zs-cats,
  body.zs-search-on .zs-mweb-tabs,
  body.zs-search-on .zs-plp-filters {
    display: none !important;
  }

  .zs-search {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: #fff;
    font-family: "Noto Sans", Inter, sans-serif;
  }

  .zs-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: #fff;
    flex-shrink: 0;
  }

  .zs-search-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    color: #2d2d2d;
    background: #fff;
    flex-shrink: 0;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
  }

  .zs-search-ico svg {
    display: block;
  }

  html[dir="rtl"] .zs-search-ico[data-back] svg {
    transform: scaleX(-1);
  }

  .zs-search-field {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 36px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0 4px 0 0;
    background: #fff;
  }

  .zs-search-field svg {
    flex-shrink: 0;
    margin: 0 10px;
  }

  .zs-search-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-size: 16px;
    padding: 0;
    height: 34px;
    background: transparent;
    color: #2d2d2d;
    font-family: inherit;
  }

  .zs-search-body {
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid #ececec;
    padding: 15px 15px 24px;
    -webkit-overflow-scrolling: touch;
  }

  .zs-search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .zs-search-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #000;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .zs-search-clear {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #000;
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
  }

  .zs-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }

  .zs-search-chip {
    border: 0;
    cursor: pointer;
    color: #424242;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 5px 10px;
    border-radius: 5px;
    background: #f0eee8;
    font-family: inherit;
  }

  .zs-search-chip.trend {
    font-size: 12px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #f4f4f4 0%, #e8e8e8 100%);
  }

  .zs-search-banner {
    display: block;
    margin: 16px 0 0;
  }

  .zs-search-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
  }

  .zs-search-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 20px -6px 0;
  }

  .zs-search-card {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    box-sizing: border-box;
    padding: 0 6px 16px;
    text-decoration: none;
    color: inherit;
  }

  .zs-search-card figure {
    margin: 0;
    position: relative;
    background: #f4f4f4;
    border-radius: 10px;
    overflow: hidden;
  }

  .zs-search-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }

  .zs-search-bag {
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .zs-search-price {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2d2d2d;
    letter-spacing: 0.04em;
  }

  .zs-search-price del {
    margin-left: 5px;
    font-size: 10px;
    font-weight: 400;
    color: #9a9a9a;
  }

  .zs-search-off {
    display: inline-block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    color: #d64045;
    background: rgba(214, 64, 69, 0.1);
    padding: 1px 4px;
    text-transform: uppercase;
  }

  .zs-search-more {
    display: block;
    width: 100%;
    margin: 8px auto 20px;
    background: none;
    border: 0;
    font-size: 10px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
  }

  /* Search results header + filter pills */
  body.zs-plp-on header.sticky > div[class*="max-w"] {
    display: grid !important;
    grid-template-columns: 32px 32px minmax(0, 1fr) 32px 32px !important;
    grid-template-areas: "back menu search wish bag" !important;
    align-items: center;
    column-gap: 8px !important;
    row-gap: 0 !important;
    padding: 15px !important;
    border-bottom: 1px solid #ececec;
  }

  body.zs-plp-on .zs-mweb-tabs,
  body.zs-plp-on .zs-mh-logo,
  body.zs-plp-on header a[href="/"] img[alt="Zosouq"] {
    display: none !important;
  }

  body.zs-plp-on .zs-plp-back {
    grid-area: back;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    padding: 0;
    cursor: pointer;
    color: #2d2d2d;
  }

  html[dir="rtl"] body.zs-plp-on .zs-plp-back svg {
    transform: scaleX(-1);
  }

  body.zs-plp-on header .zs-mh-search form > div.relative,
  body.zs-plp-on header div[class*="sm:hidden"] form > div.relative {
    height: 32px !important;
    border-radius: 8px !important;
    background: #f3f1ec !important;
    border: 1px solid #e4dfd4 !important;
    padding: 0 12px 0 10px !important;
  }

  body.zs-plp-on header div[class*="sm:hidden"] input[type="text"] {
    height: 32px !important;
    font-size: 14px !important;
  }

  body.zs-plp-on header .justify-end > a[href="/cart"],
  body.zs-plp-on header a[href="/cart"] {
    grid-area: bag;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #2d2d2d !important;
    position: relative !important;
    justify-self: end;
  }

  body.zs-plp-on header a[href="/cart"] svg {
    width: 18px !important;
    height: 18px !important;
  }

  body.zs-plp-on header a[href="/cart"] span {
    position: absolute !important;
    top: -4px;
    right: -4px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 50%;
    background: #e85d4c !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 500;
    line-height: 15px;
    text-align: center;
  }

  .zs-plp-filters {
    position: sticky;
    top: 62px;
    z-index: 25;
    background: #fff;
    padding: 10px 0;
    font-family: "Noto Sans", Inter, sans-serif;
  }

  .zs-plp-pills {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 12px 6px;
    gap: 0;
  }

  .zs-plp-pills::-webkit-scrollbar {
    display: none;
  }

  .zs-plp-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 22px;
    margin: 0 4px;
    padding: 0 8px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    color: #000;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 16px;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
  }

  .zs-plp-pill.is-on {
    border-color: #2d2d2d;
    font-weight: 600;
  }

  .zs-plp-pill svg {
    margin-left: 8px;
    margin-bottom: 1px;
  }

  html[dir="rtl"] .zs-plp-pill svg {
    margin-left: 0;
    margin-right: 8px;
  }

  .zs-plp-drop {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid #ececec;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-height: 50vh;
    overflow-y: auto;
    padding: 8px 0;
    z-index: 26;
  }

  .zs-plp-filters.is-open .zs-plp-drop {
    display: block;
  }

  .zs-plp-opt {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 12px 16px;
    font-size: 13px;
    color: #2d2d2d;
    cursor: pointer;
    font-family: inherit;
  }

  .zs-plp-opt.is-on {
    font-weight: 600;
    background: #f7f7f7;
  }

  body.zs-plp-on .max-w-7xl.mx-auto {
    padding-top: 8px !important;
    padding-bottom: 88px !important;
  }

  body.zs-plp-on .max-w-7xl.mx-auto > .mb-8 {
    display: none !important;
  }

  body.zs-plp-on .zs-bn,
  body.zs-plp-on nav.mobile-bottom-nav {
    display: none !important;
  }

  body.zs-plp-on {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.zs-search-on .zs-plp-dock,
  body.zs-search-on .zs-plp-sheet {
    display: none !important;
  }

  .zs-plp-dock {
    position: fixed;
    left: 50%;
    bottom: calc(25px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 70;
    width: auto;
    max-width: 95%;
    pointer-events: none;
  }

  .zs-plp-dock-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    border-radius: 27px;
    padding: 7px 20px;
    min-width: 220px;
  }

  .zs-plp-dock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: 0;
    padding: 4px 6px;
    color: #fdfdfc;
    cursor: pointer;
    font-family: "Noto Sans", Inter, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1;
  }

  .zs-plp-dock-btn svg {
    flex-shrink: 0;
    display: block;
  }

  .zs-plp-dock-div {
    width: 1px;
    height: 20px;
    background: #4a4a4a;
    margin: 0 15px;
    flex-shrink: 0;
  }

  .zs-plp-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
  }

  .zs-plp-sheet.is-on {
    display: block;
  }

  .zs-plp-sheet-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  .zs-plp-sheet-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    overflow: hidden;
    padding: 0;
    font-family: "Noto Sans", Inter, sans-serif;
    display: flex;
    flex-direction: column;
  }

  .zs-plp-sheet.is-filter .zs-plp-sheet-card {
    height: 94%;
    max-height: none;
  }

  .zs-plp-sheet-title {
    padding: 14px 16px 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
  }

  .zs-ff-head {
    position: relative;
    height: 50px;
    flex-shrink: 0;
    border-bottom: 1px solid #ececec;
  }

  .zs-ff-handle {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px;
  }

  .zs-ff-handle svg {
    display: block;
    opacity: 0.5;
  }

  .zs-ff-close {
    position: absolute;
    left: 15px;
    top: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: #f3f1ec;
    border-radius: 8px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  html[dir="rtl"] .zs-ff-close {
    left: auto;
    right: 15px;
  }

  .zs-ff-head p {
    margin: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 50px;
    letter-spacing: 0.025em;
    color: #2d2d2d;
  }

  .zs-ff-body {
    flex: 1;
    min-height: 0;
    display: flex;
  }

  .zs-ff-rail {
    width: 42%;
    background: #f4f4f4;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .zs-ff-tab {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 15px 12px 15px 16px;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #424242;
    cursor: pointer;
    font-family: inherit;
  }

  .zs-ff-tab.is-on {
    background: #fff;
    color: #000;
    font-weight: 500;
    border-radius: 16px 0 0 16px;
    margin-left: 8px;
    padding-left: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }

  .zs-ff-main {
    width: 58%;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0 8px;
  }

  .zs-ff-hint {
    margin: 8px 16px 12px;
    padding: 4px 8px;
    background: #f0eee8;
    color: #2d2d2d;
    font-size: 10px;
    line-height: 18px;
    letter-spacing: 0.04em;
    text-align: center;
    border-radius: 4px;
  }

  .zs-ff-search {
    position: relative;
    margin: 0 16px 12px;
  }

  .zs-ff-search input {
    width: 100%;
    height: 36px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 6px 16px 6px 40px;
    font-size: 11px;
    color: #2d2d2d;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
  }

  .zs-ff-search svg {
    position: absolute;
    left: 10px;
    top: 8px;
  }

  .zs-ff-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 12px 20px;
    cursor: pointer;
    color: #424242;
  }

  .zs-ff-opt svg {
    flex-shrink: 0;
  }

  .zs-ff-opt span {
    font-size: 11px;
    letter-spacing: 0.05em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zs-ff-opt em {
    font-style: normal;
    color: #c8c9c6;
    font-size: 11px;
    flex-shrink: 0;
  }

  .zs-ff-foot {
    flex-shrink: 0;
    display: flex;
    justify-content: space-evenly;
    gap: 12px;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ececec;
    background: #fff;
  }

  .zs-ff-foot button {
    width: 45%;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
  }

  .zs-ff-clear {
    background: #fff;
    color: #000;
    border: 1px solid #2d2d2d;
  }

  .zs-ff-apply {
    background: #000;
    color: #fff;
    border: 0;
  }

  .zs-plp-sheet:not(.is-filter) .zs-plp-sheet-card {
    overflow-y: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  body.zs-plp-on:has(.zs-plp-sheet.is-on) .zs-plp-dock {
    display: none !important;
  }

  .zs-ff-tab-line {
    height: 1px;
    background: #fff;
    margin: 0 15px;
    border: 0;
  }

  .zs-ff-more {
    display: block;
    width: calc(100% - 20px);
    margin: 4px 12px 20px 8px;
    border: 0;
    background: #ececec;
    border-radius: 6px;
    padding: 10px 8px;
    font-size: 13px;
    color: #424242;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
  }

  html[dir="rtl"] .zs-ff-tab,
  html[dir="rtl"] .zs-ff-more,
  html[dir="rtl"] .zs-ff-opt {
    text-align: right;
  }

  html[dir="rtl"] .zs-ff-tab.is-on {
    border-radius: 0 16px 16px 0;
    margin-left: 0;
    margin-right: 8px;
  }

  html[dir="rtl"] .zs-ff-search svg {
    left: auto;
    right: 10px;
  }

  html[dir="rtl"] .zs-ff-search input {
    padding-left: 16px;
    padding-right: 40px;
  }
}

@media (min-width: 1024px) {
  .zs-search,
  .zs-plp-dock,
  .zs-plp-sheet {
    display: none !important;
  }

  /* Native React autocomplete — hide so only one search panel shows */
  body:not(.zs-crm) header form .absolute.top-full,
  body:not(.zs-crm) header form .absolute.z-50.rounded-2xl {
    display: none !important;
  }

  .zs-search-desk-mask {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.18);
  }

  .zs-search-desk {
    position: fixed;
    z-index: 101;
    width: 880px;
    max-width: calc(100vw - 48px);
    max-height: min(480px, 72vh);
    background: #fff;
    font-family: "Noto Sans", Inter, sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
  }

  .zs-search-desk-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    flex-shrink: 0;
  }

  .zs-search-desk-field {
    display: flex;
    align-items: center;
    height: 36px;
    width: 100%;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
  }

  .zs-search-desk-field svg {
    flex-shrink: 0;
    margin: 0 10px;
  }

  .zs-search-desk-field input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-size: 13px;
    padding: 0 10px 0 0;
    height: 34px;
    background: transparent;
    color: #2d2d2d;
    font-family: inherit;
  }

  .zs-search-desk-body {
    flex: 1;
    overflow: auto;
    position: relative;
  }

  .zs-search-desk-inner {
    padding: 8px 16px 16px;
  }

  .zs-search-desk .zs-search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .zs-search-desk .zs-search-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #000;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
  }

  .zs-search-desk .zs-search-clear {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #000;
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
  }

  .zs-search-desk .zs-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }

  .zs-search-desk .zs-search-chip {
    border: 0;
    cursor: pointer;
    color: #424242;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f0f0f0;
    font-family: inherit;
  }

  .zs-search-desk .zs-search-chip.trend {
    font-size: 12px;
    padding: 8px 14px;
    background: #f0f0f0;
  }

  .zs-desk-viewed {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .zs-desk-card {
    flex: 0 0 140px;
    width: 140px;
    text-decoration: none;
    color: #424242;
  }

  .zs-desk-card img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f4f4f4;
    border-radius: 10px 10px 0 0;
  }

  .zs-desk-card .zs-desk-price {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
  }

  .zs-desk-card .zs-desk-now {
    font-size: 13px;
    font-weight: 700;
    color: #2d2d2d;
    letter-spacing: 0.04em;
  }

  .zs-desk-card del {
    font-size: 11px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
  }

  .zs-desk-card .zs-desk-off {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 4px;
    background: #fce8e6;
    color: #b81d5b;
  }

  .zs-search-desk .zs-search-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 8px -6px 0;
  }

  .zs-search-desk .zs-search-card {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    box-sizing: border-box;
    padding: 0 6px 16px;
    text-decoration: none;
    color: #2d2d2d;
  }

  .zs-search-desk .zs-search-card figure {
    margin: 0;
    position: relative;
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
  }

  .zs-search-desk .zs-search-card img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
  }

  .zs-search-desk .zs-search-price {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
  }

  .zs-search-desk .zs-search-price del {
    margin-left: 6px;
    font-weight: 400;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
  }

  .zs-search-desk .zs-search-bag-wrap {
    display: none;
  }

  .zs-search-desk .zs-search-more {
    display: block;
    margin: 8px auto 0;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    font-family: inherit;
  }

  .zs-desk-hits {
    display: flex;
    flex-direction: column;
  }

  .zs-desk-hit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    text-decoration: none;
    color: #2d2d2d;
    border-radius: 8px;
  }

  .zs-desk-hit:hover {
    background: #f7f7f7;
  }

  .zs-desk-hit img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #f4f4f4;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .zs-desk-hit-info {
    flex: 1;
    min-width: 0;
  }

  .zs-desk-hit-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .zs-desk-hit-cat {
    display: block;
    font-size: 11px;
    color: #9ca3af;
  }

  .zs-desk-hit-price {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    text-align: end;
  }

  .zs-desk-hit-off {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #ef4444;
  }
}
