/* XList — متجر تسويق بالعمولة لمنتجات أمازون السعودية */

:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --ink: #16162a;
  --ink-muted: #66677f;
  --border: #e8e8f2;

  --brand: #4f46e5;      /* indigo-600 */
  --brand-dark: #362f9c; /* indigo-800 */
  --brand-2: #8b5cf6;    /* violet-500 */
  --accent: #f59e0b;     /* amber-500 */
  --accent-dark: #c97a05;
  --danger: #f43f5e;     /* rose-500 */
  --star: #f59e0b;

  --gradient-brand: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);

  --radius: 16px;
  --shadow: 0 2px 12px rgba(79, 70, 229, 0.08);
  --shadow-hover: 0 14px 30px rgba(79, 70, 229, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.topbar {
  background: var(--brand-dark);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 7px 12px;
}
.topbar a { color: #fff; text-decoration: underline; font-weight: 600; }

/* Header */
header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.logo img { height: 32px; width: auto; }
.logo span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav.main-nav {
  display: flex;
  gap: 22px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}
nav.main-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover { color: var(--brand); border-color: var(--accent); }

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 320px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 64px 0 54px;
  background:
    linear-gradient(to left, rgba(18, 12, 48, .93) 0%, rgba(30, 18, 70, .72) 55%, rgba(40, 22, 90, .28) 100%),
    url("../img/cover-hero.png") center / cover no-repeat;
}
.hero .container { position: relative; z-index: 1; }
.hero-text { max-width: 620px; }
.hero-text h1 { font-size: 36px; margin: 0 0 14px; line-height: 1.5; }
.hero-text h1 em { color: var(--accent); font-style: normal; }
.hero-text p { font-size: 16px; color: #dcd7f5; margin: 0 0 26px; max-width: 560px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge b { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(79, 70, 229, .45); }
.btn.secondary {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: none;
}
.btn.secondary:hover { background: rgba(255,255,255,.16); }

/* Trust strip */
.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.trust-strip .container {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--ink-muted);
}
.trust-strip .item { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.trust-strip .item .ic { color: var(--brand); font-size: 17px; }

/* Section heading */
.section { padding: 46px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 24px; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--ink-muted); font-size: 14.5px; }
.last-checked { font-size: 12.5px; color: var(--ink-muted); opacity: .8; }

/* Deals banner */
.deals-section {
  background: linear-gradient(180deg, #fff7ea 0%, #fdf1e0 100%);
}
.deals-section .section-head h2 { color: var(--accent-dark); }

/* Category tabs */
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.tab-btn:hover { border-color: var(--brand); color: var(--brand); }
.tab-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(79, 70, 229, .3);
}

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #dcd8fb; }

.card-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #f1f0fb, #f7f2fc); }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }

.badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(79,70,229,.3);
}
.badge.deal { background: linear-gradient(120deg, #f43f5e, #fb7185); box-shadow: 0 4px 10px rgba(244,63,94,.35); }
.badge.top { background: linear-gradient(120deg, var(--accent-dark), var(--accent)); box-shadow: 0 4px 10px rgba(245,158,11,.35); }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 12px; color: var(--brand); font-weight: 700; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.stars { color: var(--star); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stars .count { color: var(--ink-muted); font-size: 12.5px; }

.card-why {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.price { font-size: 19px; font-weight: 800; color: var(--brand-dark); }
.old-price { font-size: 13px; color: var(--ink-muted); text-decoration: line-through; }
.discount { font-size: 12.5px; font-weight: 700; color: var(--danger); }

.card-cta {
  margin-top: auto;
  display: block;
  text-align: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px;
  border-radius: 10px;
  transition: filter .15s ease, transform .15s ease;
}
.card-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

.card-share {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.card-share a {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 4px;
  transition: border-color .15s ease, color .15s ease;
}
.card-share a:hover { border-color: var(--brand); color: var(--brand); }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--ink-muted);
}

/* How we pick */
.how-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.how-card { text-align: center; padding: 10px; }
.how-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #eeecfd, #f6ecff);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 14px;
}
.how-card h3 { font-size: 16px; margin: 0 0 8px; }
.how-card p { font-size: 14px; color: var(--ink-muted); margin: 0; }

/* Disclosure notice */
.disclosure-note {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 10px;
}
.disclosure-note a { color: var(--brand); font-weight: 700; }

/* Follow / social */
.social-section { text-align: center; }
.social-links { display: flex; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.social-links a {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.social-links a:hover { border-color: var(--brand); color: var(--brand); }

/* Footer */
footer.site-footer {
  background: linear-gradient(160deg, #1c1440 0%, var(--brand-dark) 100%);
  color: #cfc9f0;
  padding: 40px 0 20px;
  margin-top: 20px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.footer-grid h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #a79dd6;
}

/* Simple pages (about/disclosure/privacy) */
.page-content { padding: 50px 0 70px; max-width: 820px; }
.page-content h1 {
  font-size: 30px;
  margin-bottom: 6px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.page-content .lead { color: var(--ink-muted); margin-bottom: 30px; }
.page-content h2 { font-size: 20px; margin-top: 34px; }
.page-content p, .page-content li { color: #333; }

@media (max-width: 720px) {
  .hero-text h1 { font-size: 27px; }
  .footer-grid { grid-template-columns: 1fr; }
  nav.main-nav { order: 3; width: 100%; justify-content: center; margin-inline-start: 0; }
  .search-box { max-width: none; }
}
