/* لِبسة | LIBSEH — unified responsive layer (loads last). Brand: #66001f #59633A #E8D8BE #FBF7F0 #31352C */
:root {
  --ls-burgundy: #66001f;
  --ls-olive: #59633A;
  --ls-beige: #E8D8BE;
  --ls-ivory: #FBF7F0;
  --ls-ink: #31352C;
  --ls-header-h: 64px;
  --ls-bottom-h: 64px;
}

html {
  max-width: 100%;
}

html,
body {
  background: var(--ls-ivory);
  color: var(--ls-ink);
}

body {
  max-width: 100%;
}

body *,
body *::before,
body *::after {
  box-sizing: border-box;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.luxe-product-card img,
.sp-card img,
.sp-media img,
.home-product-grid img,
.pd-hero img,
.home-hero img,
.cart-line img {
  object-fit: cover;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font-size: 16px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  min-height: 44px;
}

button,
.pill,
a.pill,
.aya-nav a,
.round-icon,
.mobile-menu-toggle,
.pd-icon {
  min-height: 44px;
}

.home-hero .hero-dots button {
  min-height: 0;
  min-width: 0;
  font-size: 0;
}

.pill,
a.pill,
button.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding-inline: 1rem;
}

h1, h2, h3, p, li, td, th, label, span, a, strong, b, em {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ls-money,
[class*="price"],
.product-price {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.container {
  width: min(100% - 32px, 1280px) !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}

.libseh-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(251, 247, 240, 0.96) !important;
}

.libseh-header-inner {
  min-width: 0 !important;
}

html body:not(.admin-view):not(.merchant-view) .header-bell {
  display: inline-grid !important;
}

html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .customer-bottom-nav {
  position: fixed !important;
  inset-inline: 0 !important;
  inset-block-end: 0 !important;
  z-index: 70 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}

html body.has-bottom-nav:not(.admin-view):not(.merchant-view) main,
html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .libseh-footer {
  padding-bottom: calc(var(--ls-bottom-h) + env(safe-area-inset-bottom, 0px) + 20px) !important;
}

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) + env(safe-area-inset-bottom, 0px) + 8px) !important;
  z-index: 65 !important;
  width: auto !important;
  max-width: calc(100% - 24px) !important;
  box-shadow: 0 8px 22px rgba(120, 29, 58, 0.08) !important;
}

.luxe-product-card,
.directory-store,
.featured-store,
.order-card,
.cart-line,
.sp-card,
.pm-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.luxe-product-card img,
.sp-card img,
.sp-media img,
.home-product-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

.luxe-product-card .fav,
.luxe-product-card .product-heart,
.luxe-product-card .badge,
.luxe-product-card .sale-badge,
.sp-card .sale-badge {
  z-index: 2;
}

.luxe-product-grid,
.home-product-grid,
.product-grid,
.favorite-results,
.similar-products .luxe-product-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.directory-grid,
.store-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.product-detail,
.pd-page.product-detail,
.cart-layout,
.ls-checkout-grid,
.dashboard-order-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 1rem !important;
}

.ls-chips,
.ls-colors,
.pc-sizes,
.pc-colors,
.sp-swatches,
.sp-sizes,
.option-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.45rem !important;
}

.ls-chips button,
.ls-color,
.pc-sizes button {
  min-height: 44px !important;
}

.ls-chips button.is-oos,
.ls-color.is-oos,
.pc-sizes button.is-oos,
.pc-color.is-oos {
  pointer-events: none;
  opacity: 0.42;
  text-decoration: line-through;
}

.cart-line {
  display: grid !important;
  grid-template-columns: 5rem minmax(0, 1fr) !important;
  gap: 0.75rem !important;
  align-items: start !important;
}

.cart-line img {
  width: 5rem;
  height: 6.2rem;
  object-fit: cover;
}

.welcome-card,
.search-overlay,
.lucky-overlay,
dialog,
.ls-size-guide,
.inbox-sheet-card,
.mobile-site-menu {
  max-height: min(92svh, 720px);
  overflow: auto;
}

.inbox-sheet {
  padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
}

.mobile-site-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

html[dir="ltr"] .mobile-site-menu {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

.aya-form,
.admin-form,
.ls-checkout-block,
.auth-card form,
.buy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.aya-form label,
.admin-form label,
.ls-checkout-block label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.field-error,
.help,
.ls-opt-msg,
.pc-opt-msg {
  display: block;
  margin-top: 0.2rem;
  color: var(--ls-burgundy);
  font-size: 0.85rem;
}

.aya-table-wrap,
.merchant-table,
.order-table {
  max-width: 100%;
}

.ad-kpis,
.aya-kpi-row,
.mdash-kpis,
.m-kpis {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

@media (max-width: 1024px) {
  .ad-grid-2,
  .ad-alert-grid,
  .ad-pie-wrap {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.ad-pie-wrap svg,
.aya-card svg,
canvas {
  max-width: 100%;
  height: auto;
}

.pm-color-row {
  grid-template-columns: minmax(0, 1fr) !important;
}

.pm-filters,
.m-order-tabs,
.aya-filters,
.pm-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
}

.pm-filters a,
.m-order-tabs a,
.aya-filters a {
  min-height: 40px;
}

@media (max-width: 374px) {
  .container {
    width: min(100% - 20px, 1280px) !important;
  }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results {
    gap: 8px !important;
  }
  .libseh-mark {
    max-width: 96px;
  }
  .customer-bottom-nav a span {
    font-size: 10px !important;
  }
}

@media (min-width: 375px) and (max-width: 430px) {
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .directory-grid,
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (min-width: 431px) and (max-width: 600px) {
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  .directory-grid,
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .ad-kpis,
  .aya-kpi-row,
  .mdash-kpis,
  .m-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .directory-grid,
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .product-detail,
  .pd-page.product-detail,
  .cart-layout,
  .ls-checkout-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) !important;
    align-items: start;
  }
  .ad-kpis,
  .aya-kpi-row,
  .mdash-kpis,
  .m-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  html body:not(.admin-view):not(.merchant-view) .customer-bottom-nav {
    display: none !important;
  }
  html body.has-bottom-nav:not(.admin-view):not(.merchant-view) main {
    padding-bottom: 24px !important;
  }
  html body.has-bottom-nav:not(.admin-view):not(.merchant-view) .cart-sticky-bar {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
  }
  html body.product-page .pd-sticky,
  html body.product-page .product-sticky-bar {
    display: none !important;
  }
}

@media (min-width: 1441px) {
  .container {
    width: min(100% - 64px, 1360px) !important;
  }
  .luxe-product-grid,
  .home-product-grid,
  .product-grid,
  .favorite-results {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  .directory-grid,
  .store-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .ad-kpis,
  .aya-kpi-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1024px) {
  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: block !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;
    inset-inline-end: auto !important;
    width: min(86vw, 320px) !important;
    max-width: 100% !important;
    /* Closed: hide off the inline-start edge (right in RTL, left in LTR) */
    transform: translateX(110%) !important;
    transition: transform .2s ease, visibility .2s ease;
    visibility: hidden;
    pointer-events: none;
    z-index: 80 !important;
    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%) !important;
  }
  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;
  }
  html body.admin-view .aya-table-wrap,
  html body.merchant-view .aya-table-wrap {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  html body.admin-view table.aya-table,
  html body.merchant-view table.aya-table {
    min-width: 640px;
  }
  html body.merchant-view .merchant-table,
  html body.merchant-view .order-table,
  html body.merchant-view .m-order-card {
    display: grid !important;
    gap: 10px !important;
  }
  html body.admin-view .aya-form,
  html body.merchant-view .admin-form,
  html body.merchant-view .aya-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body.admin-view .ad-grid-2,
  html body.admin-view .ad-alert-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (min-width: 1025px) {
  html body.admin-view .aya-form,
  html body.merchant-view .admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body.admin-view .aya-form .full,
  html body.merchant-view .admin-form .full,
  html body.merchant-view .admin-form textarea,
  html body.admin-view .aya-form textarea {
    grid-column: 1 / -1;
  }
}

.auth-view .auth-card,
.auth-view main {
  width: min(100% - 28px, 420px);
  margin-inline: auto;
}

.auth-view input:not([type="checkbox"]):not([type="radio"]),
.auth-view select,
.auth-view .pill,
.auth-view .auth-submit {
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--ls-burgundy);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .luxe-product-card:hover,
  .directory-store:hover,
  .pm-card:hover {
    border-color: var(--ls-burgundy);
  }
  .pill.primary:hover,
  button.primary:hover {
    filter: brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Homepage — restore لِبسة layout after shared rwd rules */
html body.home-page:not(.admin-view):not(.merchant-view) .home-hero {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  background: #E8D8BE !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero::after {
  display: none !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero-slides {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero-slides img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero .hero-copy {
  position: relative !important;
  z-index: 2 !important;
  inset: auto !important;
  max-width: none !important;
  color: #31352C !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero .hero-title,
html body.home-page:not(.admin-view):not(.merchant-view) .home-hero h1 {
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  color: #66001f !important;
  font-size: clamp(1.7rem, 6vw, 2.4rem) !important;
  line-height: 1.25 !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero .hero-dots button {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;
  padding: 0 !important;
  border-radius: 999px !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-hero .hero-dots button.is-active {
  width: 20px !important;
  background: #66001f !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .categories-grid.main-category-circles {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: unset !important;
  overflow: visible !important;
  gap: 16px 12px !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .main-category span {
  width: min(100%, 112px) !important;
  aspect-ratio: 1 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .main-category img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 999px !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .store-carousel,
html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-carousel {
  display: block !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  width: 100% !important;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .store-carousel-track,
html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-card {
  flex: 0 0 min(86vw, 340px) !important;
  width: min(86vw, 340px) !important;
  max-width: min(86vw, 340px) !important;
  min-width: min(86vw, 260px) !important;
  scroll-snap-align: start;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-product-carousel {
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-product-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 14px !important;
  width: max-content !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-product-track .luxe-product-card {
  flex: 0 0 min(72vw, 240px) !important;
  width: min(72vw, 240px) !important;
  max-width: 240px !important;
  overflow: visible !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-product-track .luxe-product-card img {
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  height: auto !important;
  object-fit: cover !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh.about-libseh {
  min-height: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  display: block !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-image {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-height: 320px !important;
  object-fit: cover !important;
  border-radius: 20px !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) #about-libseh .about-libseh-copy {
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body.home-page:not(.admin-view):not(.merchant-view) .home-section-head h2 {
  color: #66001f !important;
  overflow-wrap: normal !important;
}

@media (min-width: 390px) {
  html body.home-page:not(.admin-view):not(.merchant-view) .categories-grid.main-category-circles {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) {
  html body.home-page:not(.admin-view):not(.merchant-view) .home-hero {
    height: clamp(540px, 62vh, 680px) !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .home-hero .hero-copy {
    inset-block-end: auto !important;
    inset-block-start: 50% !important;
    inset-inline-start: max(24px, calc((100% - 1280px) / 2 + 24px)) !important;
    transform: translateY(-50%) !important;
  }
}

@media (min-width: 1024px) {
  html body.home-page:not(.admin-view):not(.merchant-view) .categories-grid.main-category-circles {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .store-carousel,
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-carousel {
    overflow: visible !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .store-carousel-track,
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-track {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-card {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .home-product-carousel {
    overflow: visible !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .home-product-track {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .home-product-track .luxe-product-card {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
  }
  html body.home-page:not(.admin-view):not(.merchant-view) .about-libseh-layout {
    display: grid !important;
    grid-template-columns: .9fr 1.1fr !important;
    gap: 40px !important;
    align-items: center !important;
  }
}

@media (min-width: 1280px) {
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .store-carousel-track,
  html body.home-page:not(.admin-view):not(.merchant-view) #featured-stores .ls-store-track {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

