@font-face {
  font-family: 'Yekan';
  src: url('fonts/Yekan.woff2') format('woff2'),
       url('fonts/Yekan.woff') format('woff'),
       url('fonts/Yekan.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root,
html[data-theme="light"] {
  --bg: #f6fafb;
  --page-bg: #f7fbff;
  --card: rgba(255,255,255,.94);
  --card-solid: #ffffff;
  --text: #122033;
  --muted: #6b778a;
  --muted-2: #8a95a7;
  --line: rgba(148,163,184,.28);
  --line-strong: rgba(148,163,184,.44);
  --primary: #ef4056;
  --primary-2: #d9233f;
  --primary-soft: rgba(239,64,86,.14);
  --shadow: 0 18px 55px rgba(15,23,42,.08);
  --shadow-soft: 0 12px 34px rgba(15,23,42,.07);
  --hero-grad: radial-gradient(circle at 15% 10%, rgba(255,224,230,.72) 0, rgba(255,224,230,0) 33%), radial-gradient(circle at 85% 8%, rgba(255,239,242,.92) 0, rgba(255,239,242,0) 38%), linear-gradient(180deg,#fffafb 0,#fff8f9 60%,#fff6f7 100%);
}
html[data-theme="dark"] {
  --bg: #13070a;
  --page-bg: #16070b;
  --card: rgba(28,10,15,.92);
  --card-solid: #1a0b10;
  --text: #fff1f3;
  --muted: #c7a9ad;
  --muted-2: #a8868b;
  --line: rgba(226,232,240,.14);
  --line-strong: rgba(226,232,240,.23);
  --primary: #ef4056;
  --primary-2: #d9233f;
  --primary-soft: rgba(239,64,86,.14);
  --shadow: 0 22px 60px rgba(0,0,0,.35);
  --shadow-soft: 0 14px 38px rgba(0,0,0,.24);
  --hero-grad: radial-gradient(circle at 12% 10%, rgba(95,18,31,.62) 0, rgba(95,18,31,0) 36%), radial-gradient(circle at 88% 5%, rgba(66,22,30,.62) 0, rgba(66,22,30,0) 38%), linear-gradient(180deg,#18080d 0,#13070a 72%,#0d0507 100%);
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Yekan', Tahoma, Arial, sans-serif;
  font-weight: 400;
  background: var(--page-bg);
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* Theme button */
.theme-toggle {
  position: fixed;
  z-index: 10000;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: calc(env(safe-area-inset-right, 0px) + 16px);
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.78);
  color: #d7193f;
  border: 1px solid rgba(148,163,184,.32);
  box-shadow: 0 14px 36px rgba(15,23,42,.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html[data-theme="dark"] .theme-toggle {
  background: rgba(17,34,25,.78);
  color: #ffb3bd;
  border-color: rgba(226,232,240,.18);
  box-shadow: 0 14px 36px rgba(0,0,0,.38);
}
.theme-toggle-text { display: none !important; }
.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
}

/* Home */
.home-page { overflow-x: hidden; background: var(--page-bg); }
.hero {
  min-height: 100svh;
  width: 100%;
  background: var(--hero-grad);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(76px, calc(env(safe-area-inset-top, 0px) + 72px)) 18px max(54px, calc(env(safe-area-inset-bottom, 0px) + 36px));
}
.gb-logo-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: clamp(12px, 4.8svh, 54px) auto clamp(70px, 11svh, 118px);
}
.gb-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gb-logo-img {
  display: block;
  width: clamp(178px, 22vw, 252px);
  height: auto;
  max-height: 86px;
  object-fit: contain;
}
.hero-content {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-content h1 {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.45vw, 18px);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0;
}
.searchbar-stack,
.home-searchbar-stack {
  width: min(640px, calc(100vw - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main-search,
.nav-search,
.search-page-form,
.searchbar-stack form[action="search.php"] {
  direction: rtl;
  width: 100%;
  height: 62px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.main-search input,
.nav-search input,
.search-page-form input,
.searchbar-stack form[action="search.php"] input[name="q"] {
  min-width: 0;
  flex: 1 1 auto;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 400;
  text-align: right;
}
.main-search input::placeholder,
.nav-search input::placeholder,
.search-page-form input::placeholder { color: var(--muted-2); opacity: 1; }
.gb-search-submit,
.main-search .gb-search-submit,
.nav-search .gb-search-submit,
.search-page-form .gb-search-submit,
.searchbar-stack form[action="search.php"] .gb-search-submit {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  padding: 0;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff6b7a, #ef4056);
  color: #fff;
  box-shadow: 0 14px 28px rgba(239,64,86,.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 2;
}
.gb-search-submit:hover { transform: translateY(-1px); }
.gb-search-submit:disabled { opacity: .78; cursor: wait; }
.gb-search-label, .gb-search-icon { display: none !important; }
.gb-search-svg {
  display: block !important;
  width: 25px;
  height: 25px;
  color: #fff;
  fill: currentColor;
  pointer-events: none;
}
.source-logo-strip,
.home-source-logos {
  width: min(560px, calc(100vw - 42px));
  margin: 42px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 26px;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.source-logo-item,
.source-logo-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  line-height: 1;
}
.source-logo-item img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 126px;
  max-height: 42px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
}
.source-logo-item.digikala img,
.source-logo-item.snappshop img { width: 38px; height: 38px; max-width: 38px; max-height: 38px; }
.source-logo-item.basalam img { width: 34px; height: 42px; max-width: 34px; max-height: 42px; }
.source-logo-item.technolife img { height: 40px; max-width: 122px; }
.source-logo-item.emalls img { height: 32px; max-width: 118px; }
.source-logo-item.caferobot img { height: 30px; max-width: 126px; }
.source-logo-more {
  min-width: 34px;
  height: 32px;
  color: #a84d59;
  font-size: 15px;
  font-weight: 400;
  direction: ltr;
}
html[data-theme="dark"] .source-logo-more { color: #d6a0a8; }
html[data-theme="dark"] .source-logo-item.emalls img,
html[data-theme="dark"] .source-logo-item.caferobot img { filter: brightness(1.18) contrast(.96); }

/* Results header */
.search-page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--page-bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 14px;
  display: grid;
  grid-template-columns: auto minmax(260px, 620px) auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.search-page-header .gb-logo-header,
.gb-logo-header-compact {
  margin: 0;
  width: auto;
  justify-content: center;
}
.search-page-header .gb-logo-img { width: 118px; max-height: 42px; }
.search-page-header .searchbar-stack { width: min(620px, calc(100vw - 260px)); margin: 0; }
.search-page-header .source-logo-strip { display: none !important; }
.search-page-header .nav-search { height: 50px; padding: 5px; }
.search-page-header .nav-search input { height: 40px; font-size: 14px; }
.search-page-header .gb-search-submit { width: 40px; height: 40px; min-width: 40px; flex-basis: 40px; border-radius: 15px; }
.search-page-header .gb-search-svg { width: 22px; height: 22px; }

/* Result content */
.container {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}
.alert {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: 18px;
  line-height: 1.9;
  background: var(--card-solid);
  border: 1px solid var(--line);
  color: var(--muted);
}
.alert.warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
html[data-theme="dark"] .alert.warning { color: #fde68a; background: rgba(146,64,14,.18); border-color: rgba(253,230,138,.25); }
.empty-box {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px 18px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.empty-box h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.result-tools {
  margin: 0 0 22px;
  padding: 12px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
}
.result-tools::-webkit-scrollbar { display: none; }
.result-sort {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.result-sort > span { font-weight: 400; }
.sort-btn {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 400;
  box-shadow: none;
}
.sort-btn.is-active {
  background: linear-gradient(145deg, #ff7584, #d9233f);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(239,64,86,.22);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.product-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 198px;
  background: linear-gradient(180deg, rgba(248,250,252,.92), rgba(255,255,255,.96));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
html[data-theme="dark"] .product-media { background: linear-gradient(180deg, rgba(32,12,18,.95), rgba(28,10,15,.96)); }
.product-media > img,
.no-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  background: transparent;
}
.no-image { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.product-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.product-body h2 {
  margin: 0;
  min-height: 68px;
  color: var(--text);
  font-size: 13.2px;
  font-weight: 200;
  line-height: 1.85;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.price {
  margin-top: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--primary-soft);
  border: 1px solid rgba(239,64,86,.28);
  color: #be123c;
  font-size: 14.5px;
  font-weight: 200;
  line-height: 1.8;
}
html[data-theme="dark"] .price { color: #ff9aa8; }
.product-btn {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ff7584, #ef4056);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(239,64,86,.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  font-weight: 200;
  line-height: 1.7;
}
.source-logo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  min-width: 38px;
  max-width: 96px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
html[data-theme="dark"] .source-logo-badge {
  background: rgba(28,10,15,.78);
  border-color: rgba(226,232,240,.16);
}
.source-logo-badge img {
  display: block;
  width: auto;
  height: 20px;
  max-width: 76px;
  max-height: 22px;
  object-fit: contain;
  background: transparent;
  padding: 0;
}
.source-logo-badge.digikala,
.source-logo-badge.snappshop { width: 36px; max-width: 36px; padding: 5px; }
.source-logo-badge.digikala img,
.source-logo-badge.snappshop img { width: 22px; height: 22px; max-width: 22px; max-height: 22px; }
.source-logo-badge.basalam { width: 36px; max-width: 36px; padding: 4px; }
.source-logo-badge.basalam img { width: 20px; height: 24px; max-height: 24px; }
.source-logo-badge.technolife img,
.source-logo-badge.emalls img,
.source-logo-badge.caferobot img { height: 18px; max-width: 76px; }
.source-logo-text { display: none !important; }
.meta, .click-count, .source-row, .color { display: none !important; }
.load-more-wrap,
.infinite-loader,
.infinite-end { display: flex; justify-content: center; align-items: center; margin: 24px 0 0; color: var(--muted); }
.load-more-btn,
.smart-resort-btn,
.smart-keep-btn {
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--card-solid);
  font-weight: 700;
}
.smart-resort-banner {
  margin-top: 20px;
  padding: 14px;
  border-radius: 20px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.smart-resort-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.loader-ring {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(239,64,86,.18);
  border-top-color: var(--primary);
  display: inline-block;
  animation: gbSpin .8s linear infinite;
}
@keyframes gbSpin { to { transform: rotate(1turn); } }
.search-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,12,9,.46);
  backdrop-filter: blur(8px);
}
body.is-searching .search-loading-overlay,
.search-loading-overlay[aria-hidden="false"] { display: flex; }
.search-loading-box {
  width: min(320px, calc(100vw - 40px));
  padding: 24px;
  border-radius: 24px;
  background: var(--card-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.search-loading-box small { color: var(--muted); }

/* Basic admin/forms fallback */
.topbar, .search-nav, .admin-nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--card-solid); border-bottom: 1px solid var(--line); }
.brand { font-size: 20px; font-weight: 700; }
.admin-container { max-width: 1180px; margin: 0 auto; padding: 24px 18px 64px; }
.panel, .stat, .install-card { background: var(--card-solid); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.form-grid input, .admin-filter input, select, textarea { width: 100%; border: 1px solid var(--line); outline: 0; background: var(--card-solid); color: var(--text); border-radius: 14px; padding: 12px 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }

@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 980px) and (max-width: 1279px) { .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 979px) { .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 760px) {
  .theme-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
  .theme-toggle-icon { font-size: 19px; }
  .hero {
    justify-content: flex-start;
    padding: max(72px, calc(env(safe-area-inset-top, 0px) + 66px)) 18px max(44px, calc(env(safe-area-inset-bottom, 0px) + 30px));
  }
  .gb-logo-header {
    margin: clamp(22px, 5svh, 46px) auto clamp(74px, 12svh, 104px);
  }
  .gb-logo-img {
    width: clamp(170px, 46vw, 214px);
    max-height: 72px;
  }
  .hero-content { width: 100%; }
  .hero-content h1 {
    font-size: clamp(13.8px, 3.8vw, 15px);
    line-height: 1.9;
    margin-bottom: 13px;
  }
  .searchbar-stack,
  .home-searchbar-stack { width: calc(100vw - 38px); }
  .main-search,
  .nav-search,
  .search-page-form,
  .searchbar-stack form[action="search.php"] {
    height: 56px;
    padding: 6px;
    gap: 8px;
    border-radius: 999px;
  }
  .main-search input,
  .nav-search input,
  .search-page-form input,
  .searchbar-stack form[action="search.php"] input[name="q"] {
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }
  .gb-search-submit,
  .main-search .gb-search-submit,
  .nav-search .gb-search-submit,
  .search-page-form .gb-search-submit,
  .searchbar-stack form[action="search.php"] .gb-search-submit {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 16px;
  }
  .gb-search-svg { width: 23px; height: 23px; }
  .source-logo-strip,
  .home-source-logos {
    width: min(430px, calc(100vw - 52px));
    margin-top: 40px;
    gap: 16px 25px;
  }
  .source-logo-item img { height: 27px; max-height: 34px; max-width: 104px; }
  .source-logo-item.digikala img,
  .source-logo-item.snappshop img { width: 34px; height: 34px; max-width: 34px; max-height: 34px; }
  .source-logo-item.basalam img { width: 29px; height: 36px; max-width: 29px; max-height: 36px; }
  .source-logo-item.technolife img { height: 34px; max-width: 96px; }
  .source-logo-item.emalls img { height: 28px; max-width: 96px; }
  .source-logo-item.caferobot img { height: 27px; max-width: 108px; }
  .source-logo-more { height: 28px; font-size: 14px; }
  .search-page-header {
    position: sticky;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 12px;
  }
  .search-page-header .gb-logo-img { width: 104px; max-height: 38px; }
  .search-page-header .searchbar-stack { width: 100%; }
  .search-page-header .nav-search { height: 50px; }
  .search-page-header .nav-search input { height: 38px; }
  .search-page-header .gb-search-submit { width: 38px; height: 38px; min-width: 38px; flex-basis: 38px; border-radius: 14px; }
  .container { width: calc(100vw - 20px); padding-top: 16px; padding-bottom: 80px; }
  .result-tools { padding: 10px; margin-bottom: 14px; border-radius: 20px; }
  .result-sort { gap: 7px; font-size: 12px; }
  .sort-btn { padding: 8px 12px; font-size: 12px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { border-radius: 18px; }
  .product-media { height: clamp(132px, 38vw, 166px); }
  .product-media > img, .no-image { padding: 10px; }
  .source-logo-badge { top: 8px; right: 8px; height: 30px; min-width: 34px; max-width: 76px; padding: 4px 6px; }
  .source-logo-badge img { height: 17px; max-width: 62px; }
  .source-logo-badge.digikala,
  .source-logo-badge.snappshop,
  .source-logo-badge.basalam { width: 32px; max-width: 32px; }
  .source-logo-badge.digikala img,
  .source-logo-badge.snappshop img { width: 20px; height: 20px; max-width: 20px; max-height: 20px; }
  .source-logo-badge.basalam img { width: 17px; height: 22px; max-height: 22px; }
  .product-body { padding: 10px; gap: 9px; }
  .product-body h2 { min-height: 62px; font-size: 12px; line-height: 1.75; }
  .price { min-height: 38px; font-size: 12.8px; border-radius: 14px; }
  .product-btn { min-height: 39px; padding: 8px 9px; border-radius: 14px; font-size: 11.5px; }
  .smart-resort-banner { flex-direction: column; align-items: stretch; font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .panel { overflow-x: auto; }
  table { min-width: 720px; }
}
@media (max-width: 360px) {
  .products-grid { gap: 8px; }
  .product-body h2 { font-size: 11.5px; }
  .source-logo-strip, .home-source-logos { gap: 14px 18px; width: calc(100vw - 40px); }
  .source-logo-item.technolife img { max-width: 86px; }
  .source-logo-item.emalls img { max-width: 86px; }
  .source-logo-item.caferobot img { max-width: 96px; }
}
@media (max-width: 315px) {
  .products-grid { grid-template-columns: 1fr; }
}
@media (max-height: 670px) and (max-width: 760px) {
  .hero { padding-top: max(58px, calc(env(safe-area-inset-top, 0px) + 52px)); }
  .gb-logo-header { margin-top: 12px; margin-bottom: 48px; }
  .gb-logo-img { width: 160px; max-height: 60px; }
  .source-logo-strip, .home-source-logos { margin-top: 26px; }
}


/* ===== v28: mobile input focus/zoom + search button radius fix ===== */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.main-search input,
.nav-search input,
.search-page-form input,
.searchbar-stack form[action="search.php"] input[name="q"],
form[action="search.php"] input[name="q"] {
    font-size: 16px !important;
    line-height: 1.45 !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.main-search input:focus,
.nav-search input:focus,
.search-page-form input:focus,
.searchbar-stack form[action="search.php"] input[name="q"]:focus,
form[action="search.php"] input[name="q"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

.main-search,
.nav-search,
.search-page-form,
.searchbar-stack form[action="search.php"] {
    overflow: hidden;
}

.main-search .gb-search-submit,
.nav-search .gb-search-submit,
.search-page-form .gb-search-submit,
.searchbar-stack form[action="search.php"] .gb-search-submit {
    border-radius: inherit !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: inherit !important;
    border-bottom-left-radius: inherit !important;
}

.main-search .gb-search-label,
.nav-search .gb-search-label,
.search-page-form .gb-search-label,
.searchbar-stack form[action="search.php"] .gb-search-label {
    display: none !important;
}

.main-search .gb-search-svg,
.nav-search .gb-search-svg,
.search-page-form .gb-search-svg,
.searchbar-stack form[action="search.php"] .gb-search-svg {
    display: block !important;
}


/* ===== v29: search button circular / matched with search field radius ===== */
.main-search,
.nav-search,
.search-page-form,
.searchbar-stack form[action="search.php"] {
    overflow: visible !important;
}

.gb-search-submit,
.main-search .gb-search-submit,
.nav-search .gb-search-submit,
.search-page-form .gb-search-submit,
.searchbar-stack form[action="search.php"] .gb-search-submit {
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    aspect-ratio: 1 / 1;
    border-radius: 999px !important;
    border-top-right-radius: 999px !important;
    border-bottom-right-radius: 999px !important;
    border-top-left-radius: 999px !important;
    border-bottom-left-radius: 999px !important;
    overflow: hidden;
}

.search-page-header .gb-search-submit {
    flex-basis: 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    border-radius: 999px !important;
}

@media (max-width: 760px) {
    .gb-search-submit,
    .main-search .gb-search-submit,
    .nav-search .gb-search-submit,
    .search-page-form .gb-search-submit,
    .searchbar-stack form[action="search.php"] .gb-search-submit {
        flex-basis: 44px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        border-radius: 999px !important;
    }

    .search-page-header .gb-search-submit {
        flex-basis: 38px !important;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        border-radius: 999px !important;
    }
}


/* ===== v30: red brand theme + no green leftovers ===== */
:root,
html[data-theme="light"] {
  --primary: #ef4056;
  --primary-2: #d9233f;
  --primary-soft: rgba(239,64,86,.14);
}
html[data-theme="dark"] {
  --primary: #ff405e;
  --primary-2: #ef4056;
  --primary-soft: rgba(239,64,86,.16);
}
.theme-toggle { color: #d7193f; }
html[data-theme="dark"] .theme-toggle { color: #ffb3bd; }
.gb-search-submit,
.main-search .gb-search-submit,
.nav-search .gb-search-submit,
.search-page-form .gb-search-submit,
.searchbar-stack form[action="search.php"] .gb-search-submit,
.product-btn,
.sort-btn.is-active {
  background: linear-gradient(145deg, #ff7584, #ef4056) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(239,64,86,.24) !important;
}
.price {
  background: rgba(239,64,86,.10) !important;
  border-color: rgba(239,64,86,.24) !important;
  color: #be123c !important;
}
html[data-theme="dark"] .price { color: #ff9aa8 !important; }
.loader-ring {
  border-color: rgba(239,64,86,.18) !important;
  border-top-color: var(--primary) !important;
}
.logo-qeymatbaz-red,
.gb-logo-img {
  filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ===== v31: comprehensive search autocomplete ===== */
.gb-suggest-form {
  position: relative !important;
  overflow: visible !important;
  isolation: isolate;
}
.gb-suggestions {
  position: absolute;
  z-index: 12000;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  width: 100%;
  max-height: min(360px, 46vh);
  overflow-y: auto;
  padding: 8px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--card-solid) 94%, transparent);
  box-shadow: 0 24px 58px rgba(15,23,42,.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-theme="dark"] .gb-suggestions {
  background: color-mix(in srgb, var(--card-solid) 92%, transparent);
  box-shadow: 0 24px 58px rgba(0,0,0,.42);
}
.gb-suggestion-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
}
.gb-suggestion-item:hover,
.gb-suggestion-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-2);
}
.gb-suggestion-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(239,64,86,.10);
  font-size: 15px;
  line-height: 1;
}
.gb-suggestion-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-page-header,
.hero-content,
.searchbar-stack { overflow: visible !important; }
@media (max-width: 640px) {
  .gb-suggestions {
    top: calc(100% + 8px);
    border-radius: 20px;
    padding: 7px;
    max-height: min(320px, 42vh);
  }
  .gb-suggestion-item {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 14.5px;
  }
}
