/* لِبسة | LIBSEH — mobile-first responsive system (loads last).
   Breakpoints: 375 / 480 / 768 / 1024 / 1280.
   Do not use overflow-x:hidden on html/body to hide layout bugs. */

:root {
  --ls-bp-xs: 374px;
  --ls-bp-sm: 479px;
  --ls-bp-md: 767px;
  --ls-bp-lg: 1023px;
  --ls-bp-xl: 1279px;
  --ls-gutter: 16px;
  --ls-max: 1280px;
  --ls-touch: 44px;
  --ls-space-1: 4px;
  --ls-space-2: 8px;
  --ls-space-3: 12px;
  --ls-space-4: 16px;
  --ls-space-5: 24px;
  --ls-space-6: 32px;
  --ls-space-7: 48px;
}

html,
body {
  max-width: 100%;
  overflow-x: visible;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

h1, h2, h3, h4, p, li, td, th, label, button, a, span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.container,
.libseh-header-inner,
.stores-hero-inner,
.stores-shell,
.auth-card,
.luxe-section {
  width: min(100% - (var(--ls-gutter) * 2), var(--ls-max));
  max-width: 100%;
  margin-inline: auto;
}

html body .container {
  width: min(100% - (var(--ls-gutter) * 2), var(--ls-max)) !important;
  max-width: 100% !important;
}

html body.auth-view.login-view,
html body.auth-view.register-view {
  overflow-x: visible !important;
}

/* Typography */
h1, .page-title, .stores-hero h1, .aya-crumb h1 {
  font-size: clamp(1.25rem, 1.05rem + 1.4vw, 2rem);
  line-height: 1.3;
}
h2, .section-heading h2 {
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.35;
}
body, p, input, select, textarea, button, .pill {
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  line-height: 1.55;
}

button, .pill, .round-icon, a.round-icon, .mobile-menu-toggle,
.aya-menu-toggle, .header-search-toggle, .bag-trigger,
.header-login-icon, .header-account-btn, .header-fav, .header-bell,
.qty-btn, .pc-sizes button, .ls-chips button {
  min-width: var(--ls-touch);
  min-height: var(--ls-touch);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select, textarea {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  font-size: 16px;
}

/* Shared grids — mobile first */
.luxe-product-grid,
.home-product-grid,
.product-grid,
.favorite-results,
.similar-products .luxe-product-grid,
.sp-grid:not(.list) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.directory-grid,
.store-grid,
.follows-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.ad-kpis,
.aya-kpis,
.mdash-kpis,
.m-kpis,
.ag-kpis,
.ag-filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

.aya-kpi strong,
.ag-kpi b,
.mdash-kpis strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.6rem);
}

.luxe-product-card,
.directory-store,
.featured-store,
.sp-card,
.pm-card,
.order-card,
.cart-line,
.aya-card,
.auth-card,
.sp-page {
  min-width: 0;
  max-width: 100%;
}

.luxe-product-card img,
.sp-card img,
.sp-media img,
.home-product-grid img,
.pd-hero img,
.directory-store img,
.store-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

.directory-store img,
.featured-store img,
.store-card img {
  aspect-ratio: 1 / 1;
}

/* Header — phone: tools | logo | tools */
html body:not(.admin-view):not(.merchant-view) .libseh-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(251, 247, 240, 0.96);
}

/* Mobile drawer */
.mobile-site-menu {
  position: fixed !important;
  inset-block: 0 !important;
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
  width: min(86vw, 360px) !important;
  max-width: 100% !important;
  max-height: 100dvh !important;
  overflow: auto !important;
  z-index: 100 !important;
  transform: translateX(110%);
  visibility: hidden;
  pointer-events: none;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
html[dir="ltr"] .mobile-site-menu {
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
  transform: translateX(-110%);
}
body.mobile-menu-open .mobile-site-menu,
.mobile-site-menu.open {
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Home */
html body.home-page:not(.admin-view):not(.merchant-view) .home-hero {
  height: auto;
  min-height: 0;
  max-height: none;
}
.categories-scroll,
.home-category-row,
.sp-cats,
.sp-branch-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  overflow-x: auto !important;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-block: 8px 12px;
}
.categories-scroll > *,
.category-item,
.sp-cats > * {
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 96px;
  text-align: center;
}
.category-item-media,
.category-item img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1;
}

html body.home-page:not(.admin-view):not(.merchant-view) .categories-grid.main-category-circles,
html body:not(.admin-view):not(.merchant-view) .main-category-circles {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 16px !important;
  overflow-x: auto !important;
  grid-template-columns: none !important;
  grid-auto-flow: unset !important;
  padding: 8px 4px 16px !important;
}
html body:not(.admin-view):not(.merchant-view) .main-category {
  display: grid !important;
  justify-items: center !important;
  gap: 8px !important;
  min-width: 86px !important;
  max-width: 120px !important;
  width: auto !important;
  flex: 0 0 auto !important;
  text-decoration: none !important;
  color: #68705a !important;
}
html body:not(.admin-view):not(.merchant-view) .main-category .category-item-media,
html body:not(.admin-view):not(.merchant-view) .main-category span,
html body:not(.admin-view):not(.merchant-view) .stores-page .category-item-media {
  width: 90px !important;
  height: 90px !important;
  min-width: 90px !important;
  min-height: 90px !important;
  max-width: 90px !important;
  max-height: 90px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html body:not(.admin-view):not(.merchant-view) .main-category img,
html body:not(.admin-view):not(.merchant-view) .stores-page .category-item-media img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
}
html body:not(.admin-view):not(.merchant-view) .main-category strong,
html body:not(.admin-view):not(.merchant-view) .stores-page .category-item strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

/* Product */
.product-detail,
.pd-page.product-detail {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
}
.pd-gallery,
.pd-hero,
.product-gallery {
  width: 100%;
  max-width: 100%;
}
.pd-gallery img,
.pd-hero img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.product-sticky-bar,
.cart-sticky-bar,
.pd-sticky {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 40;
  width: 100%;
  max-width: 100%;
}
html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .product-sticky-bar,
html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .cart-sticky-bar,
html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .pd-sticky {
  position: fixed !important;
  inset-inline: 12px !important;
  inset-block-end: calc(var(--ls-bottom-h, 64px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
  width: auto !important;
  max-width: calc(100% - 24px) !important;
}
html body.kb-open.has-bottom-nav:not(.admin-view):not(.merchant-view) :is(.product-sticky-bar, .cart-sticky-bar, .pd-sticky) {
  inset-block-end: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
}

@media (max-height: 500px) and (orientation: landscape) {
  html body.aya-admin .aya-topbar {
    position: relative !important;
    top: auto !important;
  }
}
@media (max-width: 767px) {
  html body.aya-admin :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
    font-size: 16px !important;
  }
}

/* Modals & drawers: lock the page behind them (iOS ignores body-only locks) */
html:has(> body:is(.overlaying, .mobile-menu-open, .aya-nav-open)),
html:has(dialog[open], .welcome-modal:not([hidden]):not(.welcome-modal--banner), [data-variant-modal]:not([hidden]), [data-store-lightbox]:not([hidden]), [data-store-sheet]:not([hidden]), [data-store-info-overlay]:not([hidden]), [data-share-sheet]:not([hidden]), [data-confirm-dialog]:not([hidden]), [data-inbox-sheet]:not([hidden])) {
  overflow: hidden;
}
html:has(> body:is(.overlaying, .mobile-menu-open)) body,
html:has(dialog[open], .welcome-modal:not([hidden]):not(.welcome-modal--banner), [data-variant-modal]:not([hidden]), [data-share-sheet]:not([hidden]), [data-confirm-dialog]:not([hidden]), [data-inbox-sheet]:not([hidden])) body {
  overflow: hidden;
}
:is(.welcome-card, .sp-modal-card, .share-sheet-card, .inbox-sheet-card, dialog.ls-size-guide) {
  max-block-size: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
:is(.mobile-site-menu, .cart-drawer, .search-overlay) { overscroll-behavior: contain; }
dialog.ls-size-guide { max-inline-size: calc(100vw - 24px); }

/* Cart / checkout */
.cart-layout,
.ls-checkout-grid,
.dashboard-order-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
}
.cart-line {
  display: grid !important;
  grid-template-columns: 5rem minmax(0, 1fr) !important;
  gap: 12px !important;
}
.qty, .qty-wrap, .cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ls-checkout-block,
.auth-card form,
.aya-form,
.admin-form,
.buy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

/* Auth */
html body:is(.login-view, .register-view, .forgot-view) main,
html body:is(.login-view, .register-view, .forgot-view) .auth-card {
  width: min(100% - 32px, 420px) !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 16px !important;
}

/* Account / orders */
.account-nav, .account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.order-card,
.fav-card {
  display: grid;
  gap: 8px;
}
.order-card .actions,
.mdash-order-actions,
.ag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Store filters as bottom sheet on small screens */
.store-filter-panel {
  position: fixed !important;
  inset-inline: 0 !important;
  inset-block-end: 0 !important;
  z-index: 95 !important;
  max-height: min(82dvh, 640px);
  overflow: auto;
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
  background: #f6f1e8;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 28px rgba(49, 53, 44, 0.12);
}
.store-filter-panel.open,
body.store-filters-open .store-filter-panel {
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
.store-filter-scrim {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(49, 53, 44, 0.4);
}
.store-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.store-filter-actions .pill {
  flex: 1 1 140px;
}
[data-filter-count]:not([hidden]) {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 6px;
  border-radius: 999px;
  background: #66001f;
  color: #fff;
  font-size: 11px;
}

/* Tables → cards on phone */
.aya-table-wrap,
.ad-table-wrap,
.ag-table,
.merchant-table {
  width: 100%;
  max-width: 100%;
}
html body .aya-table thead,
html body .ad-table thead,
html body .ag-table-head {
  display: none;
}
html body .aya-table,
html body .ad-table {
  display: block;
  width: 100%;
}
html body .aya-table tbody,
html body .ad-table tbody {
  display: grid;
  gap: 10px;
}
html body .aya-table tr,
html body .ad-table tr.ad-row,
html body .ag-row {
  display: grid !important;
  gap: 8px !important;
  padding: 12px !important;
  border: 1px solid #E8D8BE !important;
  border-radius: 16px !important;
  background: #f6f1e8 !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
html body .aya-table td,
html body .ad-table td {
  display: flex !important;
  justify-content: space-between;
  gap: 12px;
  border: 0 !important;
  min-width: 0;
}
html body .aya-table td::before,
html body .ad-table td::before {
  content: attr(data-label);
  font-weight: 700;
  color: #59633A;
  flex: 0 0 42%;
}
html body .aya-table td:empty {
  display: none !important;
}
@media (max-width: 767px) {
  html body:is(.admin-view, .merchant-view) table:is(.aya-table, .ad-table) {
    min-width: 0 !important;
  }
  html body:is(.admin-view, .merchant-view) :is(.aya-table, .ad-table) td {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  html body:is(.admin-view, .merchant-view) :is(.aya-table, .ad-table) td::before {
    min-width: 0;
  }
}

/* Admin / merchant drawer */
html body.admin-view .aya-menu-toggle,
html body.merchant-view .aya-menu-toggle {
  display: inline-flex !important;
}
html body.admin-view .aya-shell,
html body.merchant-view .aya-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
html body.admin-view .aya-sidebar,
html body.merchant-view .aya-sidebar {
  position: fixed !important;
  inset-block: 0 !important;
  inset-inline-start: 0 !important;
  z-index: 80 !important;
  width: min(320px, 92vw) !important;
  max-width: 100% !important;
  max-height: 100dvh !important;
  overflow: auto !important;
  transform: translateX(110%);
  visibility: hidden;
  pointer-events: none;
  padding-top: env(safe-area-inset-top, 0px);
}
html[dir="ltr"] body.admin-view .aya-sidebar,
html[dir="ltr"] body.merchant-view .aya-sidebar,
html body.admin-view.dir-ltr .aya-sidebar,
html body.merchant-view.dir-ltr .aya-sidebar {
  transform: translateX(-110%);
}
html body.admin-view.aya-nav-open .aya-sidebar,
html body.merchant-view.aya-nav-open .aya-sidebar {
  transform: none !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
html body.admin-view .aya-backdrop,
html body.merchant-view .aya-backdrop {
  display: none;
}
html body.admin-view.aya-nav-open .aya-backdrop,
html body.merchant-view.aya-nav-open .aya-backdrop {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(49, 53, 44, 0.4) !important;
  z-index: 70 !important;
}
.aya-sidebar-close {
  display: inline-flex;
  min-width: var(--ls-touch);
  min-height: var(--ls-touch);
  margin: 8px 12px 0;
  border: 0;
  border-radius: 12px;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  inline-size: var(--ls-touch);
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
}
html body.admin-view .aya-topbar,
html body.merchant-view .aya-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
html body.admin-view .aya-tools,
html body.merchant-view .aya-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}
html body.admin-view .aya-account-chip span,
html body.admin-view .aya-account-chip small,
html body.merchant-view .aya-account-chip span,
html body.merchant-view .aya-account-chip small {
  display: none;
}
html body.admin-view .aya-search,
html body.merchant-view .aya-search {
  width: min(100%, 220px);
}

/* Agreements */
.ag-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.ag-subnav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}
.ag-editor-layout,
.ag-wizard {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}
.ag-preview-a4 {
  width: 100%;
  max-width: 100%;
  transform-origin: top center;
}
.ag-sign-pad,
.ag-sign-canvas,
canvas.ag-sign {
  width: 100% !important;
  max-width: 100% !important;
  touch-action: none;
}
.ag-sticky-actions {
  position: sticky;
  bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #FBF7F0;
  padding: 8px 0;
  z-index: 20;
}

/* Modals / overlays */
dialog,
.search-overlay,
.lucky-overlay,
.inbox-sheet-card,
.welcome-card,
.ls-size-guide {
  width: min(100% - 24px, 560px);
  max-width: 100%;
  max-height: min(90dvh, 720px);
  overflow: auto;
}
.inbox-sheet {
  padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}

/* Footer */
.libseh-footer {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .customer-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}

/* Pagination */
.pagination, .pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Tiny phones */
@media (max-width: 374px) {
  :root { --ls-gutter: 14px; }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid {
    gap: 8px !important;
  }
}

@media (min-width: 375px) {
  :root { --ls-gutter: 16px; }
}

@media (min-width: 480px) {
  .ad-kpis,
  .aya-kpis,
  .mdash-kpis,
  .m-kpis,
  .ag-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body:not(.admin-view):not(.merchant-view) .header-language-switcher {
    display: none;
  }
}

@media (min-width: 768px) {
  :root { --ls-gutter: 24px; }
  html body:not(.admin-view):not(.merchant-view) .header-fav,
  html body:not(.admin-view):not(.merchant-view) .header-bell {
    display: inline-flex !important;
  }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results,
  .sp-grid:not(.list) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .directory-grid,
  .store-grid,
  .follows-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .ad-kpis,
  .aya-kpis,
  .mdash-kpis,
  .ag-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .home-hero {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  html body .aya-table thead,
  html body .ad-table thead,
  html body .ag-table-head {
    display: table-header-group;
  }
  html body .aya-table,
  html body .ad-table {
    display: table;
    width: 100%;
  }
  html body .aya-table tbody,
  html body .ad-table tbody {
    display: table-row-group;
  }
  html body .aya-table tr,
  html body .ad-table tr.ad-row,
  html body .ag-row {
    display: table-row !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  html body .ag-row {
    display: grid !important;
    gap: 8px !important;
    padding: 12px !important;
    border: 1px solid #E8D8BE !important;
    border-radius: 16px !important;
    background: #f6f1e8 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body .ag-table-head {
    display: none;
  }
  html body .aya-table td,
  html body .ad-table td {
    display: table-cell !important;
  }
  html body .aya-table td::before,
  html body .ad-table td::before {
    content: none;
  }
  .aya-table-wrap,
  .ad-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body:not(.stores-dir-page) .store-filter-panel {
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    max-height: none;
    box-shadow: none;
    border-radius: 16px;
    padding: 12px 0;
    overflow: visible;
  }
  body:not(.stores-dir-page) .store-filter-scrim,
  body:not(.stores-dir-page) .store-filter-sheet-head,
  body:not(.stores-dir-page) .store-filter-actions {
    display: none !important;
  }
  body:not(.stores-dir-page) .store-filter-toggle {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  :root { --ls-gutter: 40px; }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results,
  .sp-grid:not(.list) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .directory-grid,
  .store-grid,
  .follows-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .ad-kpis,
  .aya-kpis,
  .mdash-kpis,
  .ag-kpis,
  .ag-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .product-detail,
  .pd-page.product-detail {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
    align-items: start;
  }
  .cart-layout,
  .ls-checkout-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr) !important;
  }
  html body:not(.admin-view):not(.merchant-view) .header-search-form {
    display: none;
  }
  html body.admin-view .aya-menu-toggle,
  html body.merchant-view .aya-menu-toggle,
  html body.admin-view .aya-sidebar-close,
  html body.merchant-view .aya-sidebar-close {
    display: none !important;
  }
  html body.admin-view .aya-shell,
  html body.merchant-view .aya-shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
  }
  html body.admin-view .aya-sidebar,
  html body.merchant-view .aya-sidebar {
    position: sticky !important;
    top: 0 !important;
    transform: none !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: 100dvh;
    width: 260px !important;
  }
  html body.admin-view .aya-backdrop,
  html body.merchant-view .aya-backdrop,
  html body.admin-view.aya-nav-open .aya-backdrop,
  html body.merchant-view.aya-nav-open .aya-backdrop {
    display: none !important;
  }
  html body.admin-view .aya-account-chip span,
  html body.admin-view .aya-account-chip small,
  html body.merchant-view .aya-account-chip span,
  html body.merchant-view .aya-account-chip small {
    display: block;
  }
  .ag-editor-layout {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }
  html body .ag-table-head {
    display: grid;
  }
  html body .ag-row {
    display: grid !important;
    grid-template-columns: 1.1fr 1.3fr 1fr .9fr .6fr .9fr .8fr .8fr .9fr .8fr .8fr .9fr 1.4fr;
    border-top: 1px solid #E8D8BE !important;
    padding: 12px 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .ag-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 1280px) {
  :root { --ls-gutter: 56px; --ls-max: 1360px; }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  .luxe-product-card:hover,
  .directory-store:hover {
    border-color: #66001f;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* About لِبسة */
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh.about-libseh {
  position: relative !important;
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 24px 0 40px !important;
  background: #FBF7F0 !important;
  line-height: normal !important;
  overflow: visible !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh.about-libseh::after,
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh.about-libseh::before {
  display: none !important;
  content: none !important;
  background: none !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) .about-libseh-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "img" "copy" !important;
  gap: 20px !important;
  align-items: center !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-image {
  grid-area: img !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-copy {
  grid-area: copy !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-image {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 420px !important;
  max-height: none !important;
  margin-inline: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-copy {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #31352C !important;
  text-align: start !important;
  line-height: 1.7 !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-copy h2 {
  margin: 0 !important;
  color: #66001f !important;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem) !important;
  line-height: 1.3 !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-copy p {
  margin: 0 !important;
  color: #31352C !important;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem) !important;
  line-height: 1.75 !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) .about-libseh-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 4px !important;
}
html body.home-page:not(.admin-view):not(.merchant-view) .about-libseh-actions .pill {
  min-height: 44px !important;
}

@media (min-width: 768px) {
  html body.home-page:not(.admin-view):not(.merchant-view) .about-libseh-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr) !important;
    grid-template-areas: "copy img" !important;
    gap: 28px !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-image {
    max-width: 480px !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }
}

/* First-visit welcome: a small dismissible card at the bottom, never a full-screen overlay. */
.welcome-modal[hidden] { display: none !important; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal.welcome-modal--banner {
  inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px !important;
  display: flex !important;
  justify-content: center;
  padding: 0 !important;
  background: transparent !important;
  pointer-events: none;
  max-width: none !important;
  z-index: 115;
}
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-card {
  pointer-events: auto;
  width: min(100%, 420px) !important;
  max-height: 45dvh !important;
  padding: 14px 16px 14px !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(49, 53, 44, .18) !important;
}
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner :is(.welcome-brand, .welcome-art, .welcome-services) { display: none !important; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-card h2 { font-size: 1rem; margin: 0 0 4px; padding-inline-end: 40px; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-card p { font-size: .88rem; margin: 0; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-card > .round-icon { position: absolute; top: 8px; inset-inline-end: 8px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-actions { margin-top: 10px !important; gap: 8px !important; }
html body:not(.admin-view):not(.merchant-view) .welcome-modal--banner .welcome-actions .pill { min-height: 40px !important; }
@media (max-width: 1023px) {
  html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .welcome-modal.welcome-modal--banner {
    bottom: calc(var(--mobile-nav-height, 76px) + 10px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
