/* Al Rawnaq design — shop listing, updated Figma ("v2 · Shop": 260px filters column, 32px gap, 3 cards w/ 40px gutter).
   Loaded after figma-listing.css so it overrides earlier values. */

/* ---- page title band: 36/44 title, 16/26 description, 192px tall ---- */
.shop-hero:not([style*="background"]), .cat-hero:not([style*="background"]) { padding-block: 40px; }
.shop-hero :is(.shop-hero__title, h1), .cat-hero :is(.cat-hero__title, h1) { font-size: 36px; line-height: 44px; letter-spacing: 0; }
.shop-hero__desc, .cat-hero__desc { margin: 12px 0 0; font-size: 16px; line-height: 26px; max-width: none; }
.shop-hero .cx-path, .cat-hero .cx-path { margin-bottom: 12px; }

/* ---- two-column body ---- */
.shop-layout, .cat-layout, .search-layout { margin-top: 0; padding-top: 48px; }
.shop-page, .category-page { padding-bottom: 88px; }
@media (min-width: 992px) {
  .shop-layout, .cat-layout, .search-layout { grid-template-columns: 260px minmax(0, 1fr); column-gap: 32px; }
  .shop-layout:not(:has(.pf-panel)), .cat-layout:not(:has(.pf-panel)), .search-layout:not(:has(.pf-panel)) { grid-template-columns: minmax(0, 1fr); }
}
.shop-grid, .cat-grid, .search-results-grid { gap: 32px 40px; }

/* ---- filters column ---- */
.pf-sidebar .cx-filters__head { margin: 0 0 24px; }
.pf-sidebar .cx-filters__title { font-size: 18px; line-height: 26px; font-weight: 600; gap: 8px; }
.cx-filters__title::before { width: 18px; height: 18px; }
.cx-filters__clear, .cx-filters__clear--head { font-size: 14px; line-height: 22px; color: var(--gray); }

.pf-sidebar .cx-filters__group { padding: 20px !important; margin: 0 0 24px; border-radius: 20px; display: flex; flex-direction: column; gap: 14px; }
.pf-sidebar .cx-filters__group:not([open]) { gap: 0; }
.pf-sidebar .cx-filters__group > summary, .rw-dept__title { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--navy); margin: 0; }
.pf-sidebar .cx-filters__values { margin: 0; gap: 14px; max-height: none; }
.pf-sidebar .cx-filters__value { gap: 10px; }
.pf-sidebar .cx-filters__value-label { font-size: 14px; line-height: 22px; }
.pf-sidebar .cx-filters__value-count, .rw-dept__count { font-size: 14px; line-height: 22px; color: var(--gray); }

/* 20px checkbox, 6px radius */
.cx-filters input[type="checkbox"], .cx-filters input[type="radio"] { flex: 0 0 20px; width: 20px; height: 20px; border-width: 1px; border-radius: 6px; }
.cx-filters input[type="radio"] { border-radius: 999px; }
.cx-filters input[type="checkbox"]:checked::after { width: 10px; height: 6px; }

/* Department list (the store's categories) */
.rw-dept__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; max-height: 360px; overflow-y: auto; }
.rw-dept__opt { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.rw-dept__box { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); background: #fff; display: grid; place-content: center; }
.rw-dept__opt.is-checked .rw-dept__box { background: var(--navy); border-color: var(--navy); }
.rw-dept__opt.is-checked .rw-dept__box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.rw-dept__label { flex: 1 1 0; min-width: 0; font-size: 14px; line-height: 22px; }
.rw-dept__opt:hover .rw-dept__label { text-decoration: underline; }
.rw-dept__count { margin-inline-start: auto; }

/* price: 6px track (yellow range) + two joined boxes */
.pf-sidebar .cx-filters__price { display: flex; flex-wrap: wrap; gap: 0 !important; margin: 0; position: static; }
.pf-sidebar .cx-filters__price::before { position: static; content: ""; flex: 0 0 100%; height: 6px; margin-bottom: 14px; border-radius: 999px; background: linear-gradient(90deg, var(--yellow) 0 68%, var(--navytint) 68% 100%); }
.pf-sidebar .cx-filters__price input[type="number"] { flex: 1 1 0; width: 0; min-width: 0; height: auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: center; font: 400 14px/22px var(--font-body); color: var(--navy); }
.pf-sidebar .cx-filters__price input[type="number"]:first-of-type { border-start-end-radius: 0; border-end-end-radius: 0; }
.pf-sidebar .cx-filters__price input[type="number"]:last-of-type { border-start-start-radius: 0; border-end-start-radius: 0; margin-inline-start: -1px; }

/* ---- results toolbar ---- */
.rw-toolbar { margin-bottom: 24px; }
.rw-toolbar__count { font-size: 14px; line-height: 22px; color: var(--gray); }
.rw-toolbar .sortby__btn { padding: 10px 18px; font-size: 14px; line-height: 22px; font-weight: 400; gap: 10px; }
.rw-toolbar .sortby__label { color: var(--navy); }
.rw-viewtoggle { gap: 12px; }
.rw-viewtoggle__btn { width: 40px; height: 40px; }
.rw-toolbar__chips { margin-top: 24px; gap: 10px; }
.rw-chip { gap: 8px; padding: 6px 10px 6px 14px; font-size: 14px; line-height: 22px; }
.rw-toolbar__clear { font-size: 14px; line-height: 22px; color: var(--gray); }

/* ---- WhatsApp banner inside the grid ---- */
.rw-wa-banner--grid { padding: 28px 36px; border-radius: 24px; }
.rw-wa-banner--grid .rw-wa-banner__tx h3 { font-size: 18px; line-height: 26px; }
.rw-wa-banner--grid .rw-wa-banner__tx p { font-size: 14px; line-height: 22px; }

/* ---- pagination: 44px circles, 16px medium ---- */
.shop-page .pagination, .category-page .pagination, .search-page .pagination { margin-top: 24px; gap: 8px; }
.shop-page .pagination__step, .shop-page .pagination__page, .category-page .pagination__step, .category-page .pagination__page, .search-page .pagination__step, .search-page .pagination__page,
.pagination__step, .pagination__page { min-width: 44px; width: 44px; height: 44px; padding: 0; font-size: 16px; font-weight: 500; line-height: 24px; }
.pagination__ellipsis { min-width: 44px; width: 44px; height: 44px; font-size: 16px; color: var(--navy); border: 1px solid var(--line); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }

.rw-dept { gap: 14px !important; }
.rw-dept__list { margin-top: 0; padding: 0 4px 0 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rw-dept__list::-webkit-scrollbar { width: 4px; }
.rw-dept__list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* Department tree: parents (departments) with their child categories */
.rw-dept__tree { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; padding-inline-end: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rw-dept__group { border-bottom: 1px solid var(--line); }
.rw-dept__group:last-child { border-bottom: 0; }
.rw-dept__parent { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--navy); }
.rw-dept__parent::-webkit-details-marker { display: none; }
.rw-dept__parent-name { flex: 1 1 0; min-width: 0; }
.rw-dept__parent-count { font-size: 14px; font-weight: 400; color: var(--gray); }
.rw-dept__chev { color: var(--waterloo); transition: transform 0.2s ease; flex-shrink: 0; }
.rw-dept__group[open] > .rw-dept__parent .rw-dept__chev { transform: rotate(180deg); }
.rw-dept__group .rw-dept__list { max-height: none; overflow: visible; padding: 2px 0 12px 8px; gap: 12px; }
[dir="rtl"] .rw-dept__group .rw-dept__list { padding: 2px 8px 12px 0; }

/* ===================== MOBILE / TABLET listing (< 992px) ===================== */
@media (max-width: 991px) {
  .shop-layout, .cat-layout, .search-layout { position: relative; padding-top: 20px; }
  .shop-page, .category-page { padding-bottom: 56px; }
  .search-shell { margin-top: 24px; padding-bottom: 56px; }

  /* The grid / list toggle is moved into the (sticky) Filters / Sort bar by listing-toolbar.liquid */
  .pf-bar .rw-viewtoggle { position: static; margin-inline-start: auto; gap: 8px; flex: 0 0 auto; }
  .rw-viewtoggle__btn { width: 40px; height: 40px; }
  .rw-toolbar .sortby { display: none; }        /* Sort lives in the bar above on small screens */
  .rw-toolbar { margin-bottom: 16px; }
  .rw-toolbar__count { font-size: 14px; line-height: 20px; }
  .rw-toolbar__chips { margin-top: 16px; }

  .shop-grid, .cat-grid, .search-results-grid { gap: 28px 16px !important; }
  .rw-wa-banner--grid { padding: 24px; }
}

/* Mobile list view: compact rows */
@media (max-width: 767px) {
  .is-list-view { gap: 12px !important; }
  .is-list-view .cx-product-card { gap: 12px; align-items: stretch; }
  .is-list-view .cx-product-card__media { flex: 0 0 92px; width: 92px; height: 92px; aspect-ratio: auto; border-radius: 14px; align-self: center; }
  .is-list-view .cx-product-card__wishlist-form { top: 4px; inset-inline-end: 4px; }
  .is-list-view .cx-product-card__wishlist-btn { width: 26px; height: 26px; }
  .is-list-view .cx-product-card__wishlist-btn svg { width: 13px; height: 13px; }
  .is-list-view .cx-product-card__badge { top: 4px; inset-inline-start: 4px; font-size: 8px; padding: 2px 6px; letter-spacing: 0.06em; }
  .is-list-view .cx-product-card__details { gap: 2px; justify-content: center; }
  .is-list-view .cx-product-card__category { font-size: 13px; line-height: 20px; }
  .is-list-view .cx-product-card__title { font-size: 14px; line-height: 20px; }
  .is-list-view .cx-product-card__footer { margin-top: 4px; }
  .is-list-view .cx-product-card__price { font-size: 14px; line-height: 20px; }
  .is-list-view .cx-product-card__add-btn { width: 32px; height: 32px; }
  .is-list-view .cx-product-card__add-btn img { width: 15px; height: 15px; }
  .is-list-view .cx-product-card__unavail, .is-list-view .cx-product-card__stock { font-size: 13px; line-height: 20px; }
}

/* ===== Brand / collection / offer pages: same layout as the shop ===== */
.brand-layout, .col-layout { position: relative; padding-top: 48px; margin-top: 0; display: grid; grid-template-columns: 1fr; align-items: start; }
.brand-page, .col-page, .collection-page, .offer-page { padding-bottom: 88px; }
@media (min-width: 992px) {
  .brand-layout, .col-layout { grid-template-columns: 260px minmax(0, 1fr); column-gap: 32px; }
  .brand-layout:not(:has(.pf-panel)), .col-layout:not(:has(.pf-panel)) { grid-template-columns: minmax(0, 1fr); }
}
.brand-main, .col-main { min-width: 0; }
.brand-grid, .col-grid { display: grid; gap: 32px 40px; }
.brand-hero:not([style*="background"]), .col-hero:not([style*="background"]) { padding-block: 40px; }
.brand-hero :is(.brand-hero__title, h1), .col-hero :is(.col-hero__title, h1) { font-size: 36px; line-height: 44px; letter-spacing: 0; }
.brand-hero__desc, .col-hero__desc { margin: 12px 0 0; font-size: 16px; line-height: 26px; max-width: none; }
.brand-page .pagination, .col-page .pagination, .collection-page .pagination, .offer-page .pagination { margin-top: 24px; gap: 8px; }
.brand-page .pagination__step, .brand-page .pagination__page, .col-page .pagination__step, .col-page .pagination__page { min-width: 44px; width: 44px; height: 44px; padding: 0; font-size: 16px; font-weight: 500; }
@media (max-width: 991px) {
  .brand-layout, .col-layout { padding-top: 20px; }
  .brand-grid, .col-grid { gap: 28px 16px !important; }
}
.brand-grid.is-list-view, .col-grid.is-list-view { grid-template-columns: 1fr !important; }

.col-empty__title, .brand-empty__title, .shop-empty__title, .cat-empty__title { text-transform: none; font-weight: 700; font-size: 20px; line-height: 28px; color: var(--navy); }
.col-empty__sub, .brand-empty__sub, .shop-empty__sub, .cat-empty__sub { color: var(--gray); }

/* Search: remove the double spacing under the dark band */
.search-shell { margin-top: 0 !important; }
.search-layout { padding-top: 32px; }
@media (max-width: 991px) { .search-layout { padding-top: 20px; } }

/* ===== One consistent gap between the page-title band and the content, on every page ===== */
:root { --rw-hero-gap: 32px; }
@media (max-width: 991px) { :root { --rw-hero-gap: 20px; } }
.shop-layout, .cat-layout, .search-layout, .brand-layout, .col-layout { margin-top: 0 !important; padding-top: var(--rw-hero-gap) !important; }
.search-shell { margin-top: 0 !important; }
.cart-body { margin-top: var(--rw-hero-gap) !important; }
.wishlist-body { margin-top: var(--rw-hero-gap) !important; padding-top: 0; }
.ctc-methods { padding-top: var(--rw-hero-gap) !important; }
.search-intro, .search-shell--empty { margin-top: 0; }

/* ===== Price filter: real two-handle slider ===== */
.pf-sidebar .cx-filters__price::before { content: none !important; display: none; }
.rw-range { position: relative; flex: 0 0 100%; height: 22px; margin: 0 0 12px; }
.rw-range__track { position: absolute; inset-inline: 0; top: 8px; height: 6px; border-radius: 999px; background: var(--navytint); overflow: hidden; }
.rw-range__fill { position: absolute; top: 0; bottom: 0; background: var(--yellow); border-radius: 999px; }
.rw-range__input { position: absolute; inset: 0; width: 100%; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rw-range__input::-webkit-slider-runnable-track { background: transparent; height: 22px; }
.rw-range__input::-moz-range-track { background: transparent; height: 22px; }
.rw-range__input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 2px; border-radius: 999px; background: #fff; border: 2px solid var(--navy); cursor: grab; box-shadow: 0 1px 4px rgba(33, 34, 69, 0.25); }
.rw-range__input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 999px; background: #fff; border: 2px solid var(--navy); cursor: grab; box-shadow: 0 1px 4px rgba(33, 34, 69, 0.25); }

/* range inputs must not inherit the number-box look (border, white background, padding) */
.cx-filters__price .rw-range__input, .pf-sidebar .cx-filters__price .rw-range__input {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 22px !important; flex: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
  text-align: start; pointer-events: none;
}
.cx-filters__price .rw-range { flex: 0 0 100% !important; width: 100%; position: relative; height: 22px; margin-bottom: 14px; }

/* Department parents inside the mobile drawer: same look as desktop (no uppercase / grey) */
.pf-panel .rw-dept__parent, .pf-panel .rw-dept__parent-name { text-transform: none !important; letter-spacing: 0 !important; color: var(--navy) !important; font-size: 14px !important; font-weight: 600 !important; }
.pf-panel .rw-dept__parent-count { color: var(--gray) !important; font-weight: 400 !important; }

.col-empty__sub, .brand-empty__sub, .shop-empty__sub, .cat-empty__sub { text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important; font-size: 14px; line-height: 22px; color: var(--gray) !important; text-align: center; }
.col-empty, .brand-empty, .shop-empty, .cat-empty { text-align: center; padding: 48px 16px; }
