:root {
  --bg: #eaeded;
  --surface: #ffffff;
  --ink: #0f1111;
  --muted: #565959;
  --line: #d5d9d9;
  --price: #b12704;
  --link: #2162a1;
  --nav: #232f3e;
  --nav-soft: #37475a;
  --accent: #131921;
  --btn: #ffd814;
  --btn-hover: #f7ca00;
  --btn-border: #fcd200;
  --chip: #f0f2f2;
  --save: #067d62;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 17, 17, 0.08);
  --font: "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.top {
  background: var(--accent);
  color: #fff;
}

.top__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand__mark {
  color: #ff9900;
}

.brand__name {
  color: #fff;
}

.search {
  display: flex;
  width: 100%;
  min-width: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.search__cat {
  border: 0;
  background: #f3f3f3;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  padding: 0 10px;
  max-width: 130px;
  border-left: 1px solid var(--line);
}

.search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
}

.search__btn {
  border: 0;
  background: #febd69;
  width: 48px;
  cursor: pointer;
  font-size: 1rem;
}

.search__btn:hover {
  background: #f3a847;
}

.top__tg {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
}

.top__tg:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav {
  background: var(--nav);
  color: #fff;
  border-bottom: 1px solid #3a4553;
}

.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 8px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 2px;
}

.nav__btn:hover,
.nav__btn.is-active {
  outline: 1px solid #fff;
  outline-offset: -2px;
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.toolbar__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.toolbar__sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 46rem;
}

.toolbar__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-disclosure {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #fff8e7;
  border: 1px solid #f0e0b2;
  border-radius: var(--radius);
  color: #5a4a1a;
  font-size: 0.86rem;
}

.site-disclosure strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 14px rgba(15, 17, 17, 0.12);
}

.card__media {
  aspect-ratio: 1 / 1;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.card__media img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
}

.card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card__cat {
  display: inline-flex;
  align-self: flex-start;
  background: var(--chip);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--link);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card__title:hover {
  color: #c45500;
  text-decoration: underline;
}

.card__prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card__price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.card__price-label {
  min-width: 2.2em;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.card__price {
  color: var(--price);
  font-size: 1.25rem;
  font-weight: 700;
}

.card__list {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: line-through;
}

.card__price-line--before .card__list {
  font-size: 0.9rem;
}

.card__save {
  color: var(--save);
  font-size: 0.82rem;
  font-weight: 600;
}

.card__ship {
  color: var(--muted);
  font-size: 0.8rem;
}

.card__price-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.card__aff {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.card__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid var(--btn-border);
  background: linear-gradient(to bottom, #ffe566, var(--btn));
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
}

.card__btn:hover {
  background: linear-gradient(to bottom, #ffd814, var(--btn-hover));
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.foot {
  background: var(--nav-soft);
  color: #ddd;
  text-align: center;
  padding: 28px 16px 36px;
  font-size: 0.85rem;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.foot__nav a {
  color: #fff;
  font-weight: 600;
  font-size: 0.84rem;
}

.foot__nav a:hover {
  text-decoration: underline;
}

.foot strong {
  color: #fff;
  font-weight: 600;
}

.foot__note {
  margin: 10px 0 0;
  color: #9aa4b0;
  font-size: 0.78rem;
}

/* Legal / info pages */
.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.legal-card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.legal-card .legal-updated {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.legal-card h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
}

.legal-card p,
.legal-card li {
  color: #222;
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-card ul {
  padding-inline-start: 1.25rem;
}

.legal-card a {
  color: var(--link);
  text-decoration: underline;
}

.legal-card .callout {
  margin: 16px 0;
  padding: 12px 14px;
  background: #fff8e7;
  border: 1px solid #f0e0b2;
  border-radius: var(--radius);
}

.legal-lang {
  direction: ltr;
  text-align: left;
  font-family: var(--font);
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .top__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand tg"
      "search search";
  }

  .brand {
    grid-area: brand;
  }

  .top__tg {
    grid-area: tg;
  }

  .search {
    grid-area: search;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card__media {
    padding: 10px;
  }

  .card__media img {
    max-height: 140px;
  }
}

@media (max-width: 420px) {
  .search__cat {
    display: none;
  }
}
