/* تمور — نبيتي / تمر — RTL */
:root {
  --primary: #70242d;
  --bg: #120809;
  --surface: #271118;
  --surface2: #3d1c24;
  /* لون بارز للروابط والأسعار على الخلفيات الداكنة */
  --accent: #f0aeb8;
  --accent2: #481018;
  --text: #f5ebe0;
  --muted: #c4b5a8;
  --danger: #e85d5d;
  --ok: #6bbf6b;
  --radius: 12px;
  --font: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html {
  overflow-x: hidden;
}

html[dir="rtl"] {
  direction: rtl;
}

html[dir="ltr"] {
  direction: ltr;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(ellipse at top, #4a252d 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--primary);
  border-bottom: 1px solid rgba(240, 174, 184, 0.35);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand--logo {
  text-decoration: none;
  line-height: 0;
}

.brand--logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand__img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  object-position: center;
}

.brand span {
  color: var(--accent);
}

.lang-switch {
  font-size: 0.9rem;
  opacity: 0.95;
}

.nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav a,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 174, 184, 0.4);
  background: rgba(112, 36, 45, 0.55);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.cart-link {
  gap: 0.4rem;
}

.cart-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: 1px solid rgba(240, 174, 184, 0.55);
}

.nav a:hover,
.btn:hover {
  background: var(--surface2);
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  border-color: rgba(240, 174, 184, 0.55);
  color: #fff;
}
.btn--ghost {
  background: transparent;
}

.impersonation {
  background: rgba(232, 93, 93, 0.15);
  border-bottom: 1px solid rgba(232, 93, 93, 0.4);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: start;
}

.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.hero .hero__row {
  text-align: start;
}

.hero .hero__row h1 {
  text-align: inherit;
}
.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}
.hero p {
  color: var(--muted);
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(240, 174, 184, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__img {
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--surface2), #1a0c0f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 2.5rem;
  overflow: hidden;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(240, 174, 184, 0.25);
  vertical-align: middle;
}

.modal-dlg {
  border: 1px solid rgba(240, 174, 184, 0.35);
  border-radius: var(--radius);
  padding: 0;
  max-width: min(520px, 96vw);
  background: var(--surface);
  color: var(--text);
}

.modal-dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal-dlg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(240, 174, 184, 0.2);
}

.modal-dlg__body {
  padding: 1rem 1.25rem 1.25rem;
}

.modal-dlg .form {
  max-width: none;
  margin: 0;
}

.card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card__title {
  font-weight: 600;
  margin: 0;
  font-size: 1.05rem;
}
.price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
.meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}
.form input,
.form textarea,
.form select {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(240, 174, 184, 0.25);
  background: #110709;
  color: var(--text);
  font: inherit;
}
.form textarea {
  min-height: 90px;
  resize: vertical;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 174, 184, 0.2);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  padding: 0.6rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
th {
  background: var(--surface2);
  color: var(--accent);
  font-weight: 600;
}
tr:hover td {
  background: rgba(112, 36, 45, 0.35);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(240, 174, 184, 0.2);
}
.stat__val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.stat__label {
  font-size: 0.85rem;
  color: var(--muted);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(232, 93, 93, 0.15);
  border: 1px solid rgba(232, 93, 93, 0.4);
  color: #ffd4d4;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(240, 174, 184, 0.15);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* حقول داخل كروت المنتج (المتجر) — بدون خلفية بيضاء */
.card .stack input[type="number"],
.card .stack input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(240, 174, 184, 0.35);
  background: linear-gradient(180deg, #1c0c10 0%, #110709 100%);
  color: var(--text);
  font: inherit;
  color-scheme: dark;
}

.card .stack input[type="number"]:focus,
.card .stack input[type="text"]:focus {
  outline: none;
  border-color: rgba(240, 174, 184, 0.55);
  box-shadow: 0 0 0 2px rgba(240, 174, 184, 0.12);
}

/* ——— الصفحة الرئيسية ——— */
#home-products {
  scroll-margin-top: 5.5rem;
}

.home-hero {
  position: relative;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  min-height: clamp(300px, 52vh, 580px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(18, 8, 9, 0.88) 0%, rgba(112, 36, 45, 0.65) 45%, rgba(18, 8, 9, 0.92) 100%),
    url("../images/hero-dates.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(240, 174, 184, 0.22);
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 20%, rgba(18, 8, 9, 0.15) 0%, rgba(18, 8, 9, 0.55) 100%);
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.home-hero__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.home-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.2;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.home-hero__sub {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: rgba(245, 235, 224, 0.92);
  line-height: 1.65;
}

.home-hero__cta {
  font-size: 1rem;
  padding: 0.6rem 1.4rem;
}

.home-section__title {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  text-align: center;
  color: var(--text);
}

.home-section__title--left {
  text-align: start;
  margin-bottom: 0.35rem;
}

.home-features {
  padding: 2.25rem 0 1rem;
}

.home-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.home-feature {
  background: linear-gradient(165deg, var(--surface) 0%, rgba(39, 17, 24, 0.9) 100%);
  border: 1px solid rgba(240, 174, 184, 0.22);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  text-align: center;
}

.home-feature__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.home-feature__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--accent);
}

.home-feature__text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.home-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.home-banner {
  display: block;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(240, 174, 184, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 120px;
}

.home-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.home-banner--a {
  background: linear-gradient(125deg, var(--surface2) 0%, var(--primary) 50%, var(--surface) 100%);
}

.home-banner--b {
  background: linear-gradient(125deg, #1a0c0f 0%, #3d2830 45%, var(--surface) 100%);
}

.home-banner__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.home-banner__title {
  font-weight: 700;
  font-size: 1.08rem;
  color: #fff5e8;
}

.home-banner__sub {
  font-size: 0.88rem;
  color: rgba(245, 235, 224, 0.82);
  line-height: 1.45;
}

.home-strip {
  margin: 1.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 174, 184, 0.2);
  background: rgba(112, 36, 45, 0.35);
}

.home-strip__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: var(--muted);
}

.home-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.home-products {
  padding: 0.5rem 0 2rem;
}

.home-products__head {
  margin-bottom: 1rem;
}

.home-products__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.home-products__head--row .home-section__title {
  margin-bottom: 0.35rem;
}

.shop-page__head {
  margin-bottom: 1.5rem;
}

.shop-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
}

.shop-page__sub {
  margin: 0 0 0.5rem;
}

.home-endcta {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  margin-top: 1rem;
  margin-bottom: -1rem;
  padding: 2rem 1.25rem;
  background: linear-gradient(90deg, rgba(112, 36, 45, 0.5) 0%, rgba(36, 12, 16, 0.92) 50%, rgba(112, 36, 45, 0.5) 100%);
  border-top: 1px solid rgba(240, 174, 184, 0.25);
}

.home-endcta__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-endcta__text {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
  flex: 1;
  min-width: 200px;
}

.home-endcta__btn {
  border-color: rgba(240, 174, 184, 0.5);
  color: var(--text);
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .nav {
    justify-content: center;
  }

  .home-endcta__inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .home-hero {
    min-height: 280px;
    padding: 2rem 1rem 2.5rem;
  }

  .home-products__head--row {
    flex-direction: column;
    align-items: stretch;
  }

  .home-products__head--row .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
