/* Sahar shop 2026 storefront layer. Brand colors stay: slate #0f172a and cyan #06b6d4. */

body.lang-rtl {
  background: #f1f5f9;
  font-size: clamp(15px, 0.35vw + 14px, 16px);
}

body.lang-rtl h1,
body.lang-rtl .h1 {
  font-size: clamp(1.45rem, 1vw + 1.1rem, 2rem);
  letter-spacing: -0.02em;
  font-weight: 800;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

/* Header: one sticky surface instead of stacked classic bars */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

body.lang-rtl .bar {
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.4;
}

body.lang-rtl .bar .container {
  padding-block: 4px;
}

body.lang-rtl #header .header-nav {
  color: #e2e8f0;
  padding-block: 6px !important;
}

body.lang-rtl #header .header-nav a,
body.lang-rtl #_desktop_user_info,
body.lang-rtl #_desktop_cart,
body.lang-rtl #_desktop_user_info .btn,
body.lang-rtl #_desktop_cart .btn {
  color: #e2e8f0;
}

body.lang-rtl #header .s26-search {
  display: flex;
  align-items: center;
}

body.lang-rtl #header .s26-search > *,
body.lang-rtl #header .s26-search .search-widget,
body.lang-rtl #header .s26-search form,
body.lang-rtl #header .s26-search .input-group {
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto;
}

body.lang-rtl #header .s26-search .search-widget {
  align-self: stretch;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.lang-rtl #header .s26-search .input-group {
  display: flex;
  align-items: center;
  min-height: 44px;
  background: #f8fafc;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

body.lang-rtl #header .search-widget .form-control {
  flex: 1 1 auto;
  width: 1% !important;
  height: 44px !important;
  min-height: 44px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #0f172a;
  border-radius: 0 !important;
}

body.lang-rtl #header .search-widget .search-button {
  min-width: 44px;
  min-height: 44px;
  height: 44px !important;
  border-radius: 999px !important;
  color: #0f172a;
}

body.lang-rtl .header-top,
body.lang-rtl .ets_mm_megamenu,
body.lang-rtl .ets_mm_megamenu .mm_menus_ul {
  background: #fff !important;
}

body.lang-rtl .ets_mm_megamenu {
  border-bottom: 0;
  box-shadow: none;
}

body.lang-rtl .mm_menus_ul {
  gap: 4px;
  min-height: 44px;
  align-items: center;
}

body.lang-rtl .mm_menus_li > a {
  border-radius: 999px;
}

body.lang-rtl .logo {
  max-height: 56px;
  width: auto;
}

/* Mobile thumb-zone navigation. Hidden on desktop. */
.s26-tabbar,
.s26-backdrop,
.s26-filter-close,
.s26-filter-bar {
  display: none;
}

@media (max-width: 767.98px) {
  body.lang-rtl {
    padding-bottom: 72px;
  }

  .s26-tabbar {
    display: flex;
    position: fixed;
    z-index: 1030;
    inset-inline: 0;
    bottom: 0;
    height: 64px;
    margin: 0;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
  }

  .s26-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    line-height: 1.1;
    text-decoration: none;
  }

  .s26-tab .material-icons,
  .s26-tab span {
    pointer-events: none;
  }

  .s26-tab .material-icons {
    font-size: 22px;
  }

  .s26-tab.is-active {
    color: #0e7490;
  }

  #ScrToTop {
    bottom: 76px;
  }

  body.lang-rtl .header--mobile .search-widget,
  body.lang-rtl #_mobile_search .search-widget {
    width: 100%;
  }

  body.lang-rtl .header--mobile .input-group {
    display: flex;
    align-items: center;
    min-height: 44px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
  }

  body.lang-rtl .header--mobile .form-control {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 44px;
  }
}

/* Footer: fewer visual layers */
body.lang-rtl .s26-footer-top {
  padding-block: 20px;
}

body.lang-rtl .s26-footer {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 24px 24px 0 0;
}

body.lang-rtl .s26-footer a {
  color: #e2e8f0;
}

body.lang-rtl .footer-bottom {
  background: #0f172a;
  color: #cbd5e1;
  padding-block: 12px;
}

body.lang-rtl .footer-dec-trust .card {
  border: 0;
  border-radius: 16px;
  box-shadow: none;
}

/* Homepage stays in each module's own layout, with one shared rhythm. */
#index #content.s26-home > .elhomeblocks,
#index #content.s26-home > .elcustomblocks,
#index #content.s26-home > .parallax-electron,
#index #content.s26-home > .elhometabs,
#index #content.s26-home > #icp_home {
  margin-bottom: 8px;
}

#index .elhomeblocks {
  margin-top: 16px !important;
}

/* Product grid only on catalog listings. Home carousels keep their own widths. */
#js-product-list > .products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  #js-product-list > .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  #js-product-list > .products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

#js-product-list .product-miniature {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  flex: none !important;
}

#js-product-list .card-product {
  height: 100%;
  overflow: hidden;
}

body.lang-rtl .card-product {
  border: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#js-product-list .product__card-img,
#js-product-list .thumbnail-container {
  background: #f8fafc;
}

#js-product-list .product__card-img img,
#js-product-list .thumbnail-container img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

body.lang-rtl .card-product .price {
  color: #0e7490;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Category sidebar and mobile filter drawer */
@media (min-width: 768px) {
  #category #wrapper .row,
  #prices-drop #wrapper .row,
  #new-products #wrapper .row,
  #best-sales #wrapper .row,
  #search #wrapper .row {
    align-items: flex-start;
  }

  #category #left-column,
  #prices-drop #left-column,
  #new-products #left-column,
  #best-sales #left-column,
  #search #left-column {
    position: sticky;
    top: 96px;
    align-self: flex-start;
    max-height: calc(100dvh - 112px);
    overflow: auto;
  }
}

#left-column .block-categories,
#_desktop_search_filters_wrapper,
#search_filters {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
}

@media (max-width: 767.98px) {
  .s26-filter-bar {
    display: block;
    margin: 0 0 12px;
  }

  .s26-filter-btn,
  .s26-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    padding-inline: 14px;
  }

  .s26-filter-close {
    display: inline-flex;
    width: 44px;
    margin-bottom: 8px;
    padding-inline: 0;
  }

  body.lang-rtl #left-column {
    display: block;
    position: fixed;
    z-index: 1200;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(88vw, 360px);
    max-width: 360px;
    margin: 0;
    padding: 16px;
    background: #fff;
    overflow: auto;
    transform: translate3d(110%, 0, 0);
    transition: transform 0.22s ease;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  }

  body.lang-rtl.s26-filters-open #left-column {
    transform: none;
  }

  body.lang-rtl.s26-filters-open #left-column .visible--desktop {
    display: block !important;
  }

  body.lang-rtl.s26-filters-open .s26-backdrop {
    display: block;
    position: fixed;
    z-index: 1100;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
  }
}

/* Product page: gallery and sticky purchase */
#product .product-cover img,
#product .js-qv-product-cover {
  border-radius: 20px;
}

@media (min-width: 768px) {
  #product .s26-buy .product-actions {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 767.98px) {
  #product .s26-buybar {
    position: fixed;
    z-index: 1020;
    inset-inline: 0;
    bottom: 64px;
    margin: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
    flex-wrap: wrap;
    gap: 8px;
  }

  #product .s26-buybar .btn {
    min-height: 44px;
  }

  #product {
    padding-bottom: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .s26-tabbar,
  #left-column,
  .s26-backdrop {
    transition: none !important;
    animation: none !important;
  }
}
