/* ORCHID — replace the complete custom CSS with this file. */
:root, html.dark, body.theme-kiswa {
  color-scheme: light !important;
  --bg:255 255 255 !important; --bg-alt:255 255 255 !important;
  --surface:255 255 255 !important; --ink:17 17 17 !important;
  --ink-soft:100 100 100 !important; --line:235 235 235 !important;
  --color-grey:#fff !important; --color-light-grey:#fff !important;
  --color-primary:#111 !important; --color-primary-dark:#000 !important;
  --color-primary-light:#eee !important; --color-primary-reverse:#fff !important;
}
html, body.theme-kiswa, .theme-kiswa #main-content,
.theme-kiswa .kiswa-utility-bar, .theme-kiswa .kiswa-section-bg,
.theme-kiswa .s-block, .theme-kiswa .kiswa-footer {
  background-color:#fff !important;
}
.theme-kiswa .kiswa-section-bg {
  --kiswa-section-bg:#fff !important; --kiswa-section-bg-dark:#fff !important;
}
.theme-kiswa #kiswa-theme-toggle { display:none !important; }
/* Activate the new layout only after its controls have been assembled. */
body.orchid-ready header.kiswa-header {
  position:relative !important; inset:auto !important; width:100% !important;
  max-width:none !important; margin:0 !important; box-sizing:border-box;
  z-index:40; overflow:visible !important;
  --kiswa-header-icons:#111 !important;
  --kiswa-header-menu-color:#111 !important;
  --kiswa-header-icons-bg:transparent !important;
  --kiswa-header-nav-bg:transparent !important;
  background:rgba(255,255,255,.76) !important;
  border:1px solid rgba(0,0,0,.06) !important; border-radius:0;
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  backdrop-filter:blur(18px) saturate(140%);
  box-shadow:none; transition:background-color .2s,border-radius .2s,box-shadow .2s;
}
body.orchid-ready .kiswa-header .kiswa-header__inner {
  display:grid !important;
  grid-template-columns:96px minmax(0,1fr) 44px 44px !important;
  direction:rtl; align-items:center; gap:14px !important;
  width:100%; max-width:1280px; min-height:82px;
  margin:0 auto !important; padding:10px 20px !important; box-sizing:border-box;
}
body.orchid-ready .kiswa-header__inner > .orchid-old-actions { display:none !important; }
body.orchid-ready .kiswa-header .navbar-brand { grid-area:1 / 1; justify-self:center; min-width:0; }
body.orchid-ready .kiswa-header .navbar-brand img {
  width:90px !important; height:60px !important; object-fit:contain !important;
  max-width:100% !important;
}
#orchid-search-bar { grid-area:1 / 2; min-width:0; }
#orchid-search-bar form {
  display:flex; align-items:center; gap:6px; margin:0; padding:0 10px;
  border:1px solid #ddd; border-radius:12px; background:rgba(255,255,255,.85);
}
#orchid-search-bar form:focus-within { outline:2px solid #111; outline-offset:1px; }
#orchid-search-bar input {
  flex:1; width:100%; min-width:0; height:42px; padding:0;
  border:0; outline:0; background:transparent; color:#111; font:inherit; font-size:16px;
}
#orchid-search-bar input::placeholder { color:#666; }
#orchid-search-bar button, .orchid-icon {
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; flex-shrink:0; padding:0;
  border:0; background:transparent; color:#111; cursor:pointer; text-decoration:none;
}
#orchid-search-bar button { width:28px; }
.orchid-icon svg, #orchid-search-bar svg { width:23px; height:23px; }
.orchid-icon:focus-visible { outline:2px solid #111; border-radius:8px; }
#orchid-header-wishlist { grid-area:1 / 3; }
body.orchid-ready .kiswa-header__inner > salla-cart-summary { grid-area:1 / 4; min-width:0; justify-self:center; }
body.orchid-ready .kiswa-header .s-cart-summary-total { display:none !important; }
body.orchid-ready .kiswa-header .kiswa-header__nav { background:transparent !important; }
/* Language and account stay accessible in a separate compact row. */
#orchid-tools {
  display:flex; align-items:center; justify-content:flex-end; gap:8px;
  max-width:1240px; margin:auto; padding:0 12px; min-height:40px;
}
#orchid-tools .orchid-icon { width:36px; height:36px; }
#orchid-tools salla-user-menu { display:block; }
#orchid-header-space { height:0; margin:0; padding:0; border:0; pointer-events:none; }
body.orchid-ready.index .kiswa-utility-bar { display:none !important; }
body.orchid-ready.index header.kiswa-header:not(.orchid-is-fixed) {
  position:absolute !important; top:0 !important; left:0 !important; right:0 !important;
  background:transparent !important; border-color:transparent !important;
  -webkit-backdrop-filter:none; backdrop-filter:none;
}
body.orchid-ready header.kiswa-header.orchid-is-fixed {
  position:fixed !important; top:10px !important; right:14px !important; left:14px !important;
  width:auto !important; max-width:1200px !important; margin:0 auto !important;
  border-radius:18px; background:rgba(255,255,255,.84) !important;
  box-shadow:0 6px 24px rgba(0,0,0,.09);
}
body.orchid-ready .kiswa-header.orchid-is-fixed .kiswa-header__inner {
  min-height:58px; padding-block:5px !important;
}
body.orchid-ready .kiswa-header.orchid-is-fixed .navbar-brand img { width:64px !important; height:46px !important; }
body.orchid-ready.index #main-content { margin-top:0 !important; padding-top:0 !important; }
body.orchid-ready.index #main-content > section[id^="banner-grid-creative-"]:first-of-type {
  margin-top:0 !important; padding-top:0 !important; padding-bottom:0 !important;
}
body.orchid-ready.index #main-content > section[id^="banner-grid-creative-"]:first-of-type .banner-grid {
  width:100% !important; max-width:100% !important; margin-inline:0 !important;
}
/* No grayscale filter is applied to in-stock merchandise. */
.theme-kiswa .s-product-card-out-of-stock .s-product-card-image img,
.theme-kiswa .s-product-card-out-of-stock .s-product-card-image-full img,
.theme-kiswa custom-salla-product-card:has(.s-product-card-out-badge) .kiswa-prod-img img {
  filter:grayscale(1) !important;
}
.theme-kiswa .s-product-card-out-badge { color:#fff !important; background:#111 !important; }
#orchid-winter-snow { position:fixed; inset:0; overflow:hidden; pointer-events:none !important; z-index:39; }
#orchid-winter-snow .orchid-flake {
  position:absolute; top:-30px; left:var(--x); width:var(--size); height:var(--size);
  color:#fff; opacity:.7; filter:drop-shadow(0 0 2px rgba(80,160,220,.6));
  animation:orchid-fall var(--duration) linear var(--delay) infinite;
}
#orchid-winter-snow .orchid-flake:nth-child(even) { color:#9bd8ff; }
#orchid-winter-snow svg { display:block; width:100%; height:100%; }
@keyframes orchid-fall {
  from { transform:translate3d(0,-30px,0) rotate(0deg); }
  to { transform:translate3d(var(--drift),calc(100vh + 70px),0) rotate(180deg); }
}
@media(max-width:1023px) {
  body.orchid-ready .kiswa-header .kiswa-header__inner {
    grid-template-columns:58px minmax(0,1fr) 36px 36px !important;
    gap:4px !important; min-height:64px; padding:8px !important;
  }
  body.orchid-ready .kiswa-header .navbar-brand img,
  body.orchid-ready .kiswa-header.orchid-is-fixed .navbar-brand img { width:56px !important; height:44px !important; }
  #orchid-search-bar form { padding-inline:6px; gap:2px; }
  #orchid-search-bar input { height:38px; }
  #orchid-search-bar button { width:24px; }
  #orchid-header-wishlist { width:36px; height:40px; }
  body.orchid-ready .kiswa-header .kiswa-header__nav { display:none !important; }
  body.orchid-ready header.kiswa-header.orchid-is-fixed {
    top:8px !important; right:8px !important; left:8px !important; border-radius:16px;
  }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  body.orchid-ready header.kiswa-header.orchid-is-fixed { background:#fff !important; }
}
@media(prefers-reduced-motion:reduce) {
  #orchid-winter-snow { display:none !important; }
  body.orchid-ready header.kiswa-header { transition:none; }
}

/* Mobile bottom navigation and account-only language control */
body.orchid-ready .kiswa-utility-bar button[onclick*="localization::open"],
body.orchid-ready .kiswa-utility-bar salla-localization-modal { display:none !important; }
#orchid-mobile-nav { display:none; }
#orchid-account-panel[hidden] { display:none !important; }
#orchid-account-panel {
  position:fixed; inset-inline-end:16px; top:100px; width:min(300px,calc(100vw - 32px));
  z-index:46; box-sizing:border-box; padding:12px; background:#fff; color:#111;
  border:1px solid #e5e5e5; border-radius:16px; box-shadow:0 8px 32px rgba(0,0,0,.14);
}
#orchid-account-panel .orchid-account-action {
  display:flex; align-items:center; gap:10px; width:100%; min-height:44px;
  padding:8px; border:0; background:transparent; color:#111; font:inherit;
  text-align:start; cursor:pointer; border-radius:8px;
}
#orchid-account-panel .orchid-account-action:hover { background:#f5f5f5; }
#orchid-account-panel svg { width:22px; height:22px; flex-shrink:0; }
#orchid-account-panel .orchid-account-native { display:flex; align-items:center; gap:10px; min-height:48px; }
@media(max-width:1023px) {
  body.orchid-ready { padding-bottom:calc(76px + env(safe-area-inset-bottom,0px)) !important; }
  body.orchid-ready #orchid-tools { display:none; }
  #orchid-mobile-nav {
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); direction:rtl;
    position:fixed; inset-inline:0; bottom:0; z-index:45;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px)); min-height:64px;
    box-sizing:border-box; background:rgba(255,255,255,.96); border-top:1px solid #e8e8e8;
    -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
  }
  #orchid-mobile-nav .orchid-bottom-item,
  #orchid-mobile-nav .orchid-account-toggle {
    display:flex !important; flex-direction:column; align-items:center; justify-content:center;
    gap:4px; min-width:0; width:auto; height:52px; padding:0; margin:0;
    background:transparent; color:#111; border:0; border-radius:8px; text-decoration:none;
    font:inherit; font-size:11px; line-height:1.4; cursor:pointer;
  }
  #orchid-mobile-nav svg { width:23px; height:23px; flex-shrink:0; }
  #orchid-account-panel { top:auto; bottom:calc(82px + env(safe-area-inset-bottom,0px)); }
  body.orchid-ready .whatsapp-container, body.orchid-ready #backToTop {
    bottom:calc(86px + env(safe-area-inset-bottom,0px)) !important;
  }
}

/* Dedicated categories view */
#orchid-categories-view[hidden] { display:none !important; }
body.orchid-categories-page #main-content { display:none !important; }
body.orchid-ready.index.orchid-categories-page header.kiswa-header:not(.orchid-is-fixed) {
  position:relative !important; background:#fff !important;
}
#orchid-categories-view { max-width:1200px; margin:auto; padding:28px 16px 40px; }
#orchid-categories-view h1 { margin:0 0 22px; color:#111; font-size:24px; }
#orchid-categories-view h1:focus { outline:none; }
.orchid-categories-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.orchid-category-tile {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px;
  padding:16px; border:1px solid #eee; border-radius:14px; background:#fff; color:#111;
  text-align:center; text-decoration:none; font-size:14px;
}
.orchid-category-tile:hover { background:#fafafa; border-color:#bbb; }
.orchid-category-tile:focus-visible { outline:2px solid #111; }
.orchid-category-tile img { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; }
.orchid-category-symbol { display:grid; place-items:center; width:100%; aspect-ratio:1; background:#f7f7f7; border-radius:10px; }
.orchid-category-symbol svg { width:36px; height:36px; }
@media(max-width:767px) { .orchid-categories-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } }

/* وضوح الهيدر فوق البانرات الفاتحة والغامقة */
body.orchid-ready.index header.kiswa-header:not(.orchid-is-fixed),
body.orchid-ready header.kiswa-header.orchid-is-fixed {
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;

  -webkit-backdrop-filter: blur(18px) saturate(130%) !important;
  backdrop-filter: blur(18px) saturate(130%) !important;

  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.07) !important;

  --kiswa-header-icons: #111 !important;
  --kiswa-header-menu-color: #111 !important;
}

body.orchid-ready .kiswa-header .orchid-icon,
body.orchid-ready .kiswa-header .header-btn__icon {
  color: #111 !important;
}

/* أزرار الشريط السفلي */
#orchid-mobile-nav .orchid-bottom-item,
#orchid-mobile-nav .orchid-account-toggle {
  position: relative;
  border-radius: 12px !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;

  transition:
    background-color 160ms ease,
    transform 160ms ease,
    color 160ms ease;
}

/* إحساس واضح عند الضغط */
#orchid-mobile-nav .orchid-bottom-item:active,
#orchid-mobile-nav .orchid-account-toggle:active {
  transform: scale(0.92);
  background: #e9e9e9 !important;
}

/* الصفحة الحالية أو قائمة الحساب المفتوحة */
#orchid-mobile-nav a[aria-current="page"],
#orchid-mobile-nav button[aria-expanded="true"] {
  background: #eeeeee !important;
  color: #000 !important;
  font-weight: 600;
}

/* نقطة أسفل الأيقونة المحددة */
#orchid-mobile-nav a[aria-current="page"]::after,
#orchid-mobile-nav button[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111;
}

#orchid-mobile-nav a:focus-visible,
#orchid-mobile-nav button:focus-visible {
  outline: 2px solid #111;
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  #orchid-mobile-nav a,
  #orchid-mobile-nav button {
    transition: none !important;
    transform: none !important;
  }
}