/* =========================================================
   M3allem Pro — نظام التصميم
   هوية صناعية: أسود فحمي + برتقالي/أحمر حيوي + بطاقات بيضاء
   ========================================================= */

:root {
  --primary: #e61e50;
  --primary-dark: #c21840;
  --primary-grad: linear-gradient(90deg, #e61e50 0%, #ff512f 100%);
  --orange: #f37021;
  --orange-soft: #fff4ea;
  --whatsapp: #25D366;
  --whatsapp-dark: #1eb958;

  --ink: #0f1319;
  --ink-2: #111827;
  --text: #1f2937;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --line: #e5e7eb;

  --bg: #f4f4f6;
  --card: #ffffff;
  --bg-pink: #fdf2f5;

  --gold: #fbbf24;
  --green: #16a34a;
  --green-bg: #dcfce7;

  --shadow-sm: 0 2px 8px rgba(15, 19, 25, 0.06);
  --shadow: 0 8px 24px rgba(15, 19, 25, 0.08);
  --shadow-lg: 0 18px 44px rgba(15, 19, 25, 0.14);

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
}

/* ============ شريط علوي ============ */
.top-bar {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 700;
}
.top-bar span {
  color: var(--gold);
}

/* ============ الهيدر ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 14px rgba(230, 30, 80, 0.3);
  flex-shrink: 0;
}
img.brand-logo {
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(15, 19, 25, 0.16);
}
.brand-text b {
  display: block;
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.2;
}
.brand-text small {
  color: var(--gray);
  font-size: 12.5px;
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink-2);
  font-size: 15px;
}
.header-phone i {
  color: var(--orange);
}

/* ============ أزرار عامة ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 11px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  text-align: center;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 8px 18px rgba(230, 30, 80, 0.28);
}
.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(230, 30, 80, 0.36);
}
.btn-dark {
  background: var(--ink-2);
  color: #fff;
}
.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.28);
}
.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
}
.btn-outline {
  background: #fff;
  color: var(--ink-2);
  border: 2px solid var(--line);
}
.btn-outline:hover {
  border-color: var(--ink-2);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  padding: 15px 26px;
  font-size: 17px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(243, 112, 33, 0.16), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(230, 30, 80, 0.14), transparent 45%),
    var(--ink);
  color: #fff;
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 2px,
    transparent 2px,
    transparent 14px
  );
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-badge i {
  color: var(--gold);
}
.hero h1 {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  max-width: 850px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero p.lead {
  font-size: 18px;
  color: #d1d5db;
  max-width: 720px;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 30px;
}
.hero-stat b {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: var(--gold);
}
.hero-stat span {
  font-size: 14px;
  color: #d1d5db;
}

/* ============ كتلة الاختيار المزدوج ============ */
.duo-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 720px;
  margin-top: 8px;
}
.duo-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 18px;
  text-align: right;
  color: #fff;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.duo-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}
.duo-tab .duo-ico {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.duo-tab.sale .duo-ico {
  background: var(--primary-grad);
}
.duo-tab.rent .duo-ico {
  background: linear-gradient(90deg, var(--orange), var(--gold));
}
.duo-tab b {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.duo-tab small {
  color: #cbd5e1;
  font-size: 13px;
}

/* ============ شريط البحث ============ */
.search-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  margin-top: -34px;
  position: relative;
  z-index: 10;
}
.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9fafb;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
}
.search-input:focus-within {
  border-color: var(--primary);
}
.search-input i {
  color: var(--gray-light);
}
.search-input input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 14px 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  border: 2px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s;
}
.chip.active {
  background: var(--ink-2);
  border-color: var(--ink-2);
  color: #fff;
}

/* ============ الأقسام ============ */
.section {
  padding: 54px 0 10px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.section-title {
  font-size: 27px;
  font-weight: 900;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title .ico-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  flex-shrink: 0;
}
.ico-sale {
  background: var(--primary-grad);
}
.ico-rent {
  background: linear-gradient(90deg, var(--orange), var(--gold));
}
.section-title .sub {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray);
}
.count-pill {
  background: var(--orange-soft);
  color: var(--orange);
  border: 1px solid #f6d3b3;
  border-radius: 30px;
  padding: 6px 16px;
  font-size: 13.5px;
  font-weight: 800;
}

/* ============ شبكة البطاقات ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef0f3;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f6f7f9;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-media img {
  transform: scale(1.06);
}
.card-tags {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.tag {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.tag-discount {
  background: var(--primary);
}
.tag-bulk {
  background: var(--gold);
  color: #422006;
}
.tag-avail {
  background: var(--green);
}
.tag-avail.off {
  background: #6b7280;
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-2);
  line-height: 1.5;
}
.card-summary {
  font-size: 13.5px;
  color: var(--gray);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-loc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray);
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}
.card-loc i {
  color: var(--orange);
}
.card-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}
.card-price .now {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
}
.card-price .now small {
  font-size: 13px;
  font-weight: 700;
}
.card-price .old {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-light);
  text-decoration: line-through;
}
.card-price .per-night {
  font-size: 13px;
  color: var(--gray);
  font-weight: 700;
}
.card-actions {
  padding: 0 16px 16px;
}
.card-actions .btn {
  width: 100%;
}

/* ============ حالة فارغة ============ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
  color: var(--gray);
  background: #fff;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
}
.empty-state i {
  font-size: 40px;
  color: var(--gray-light);
  margin-bottom: 12px;
}

/* ============ شريط الثقة ============ */
.trust-strip {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  margin-top: 50px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.trust-item i {
  font-size: 26px;
  color: var(--orange);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--orange-soft);
  border-radius: 14px;
  flex-shrink: 0;
}
.trust-item h4 {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink-2);
}
.trust-item p {
  font-size: 13px;
  color: var(--gray);
}

/* ============ الفوتر ============ */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 50px 0 0;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 34px;
  padding-bottom: 34px;
}
.footer-col h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col h4 i {
  color: var(--orange);
}
.footer-col p,
.footer-col li {
  font-size: 14px;
  margin-bottom: 9px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li i {
  color: var(--gold);
  margin-top: 4px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.footer-brand .brand-logo {
  box-shadow: none;
}
.footer-brand b {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--gray-light);
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: 0.2s;
}
.footer-social a:hover {
  background: var(--primary);
}

/* ============================================================
                    صفحة تفاصيل المنتج
   ============================================================ */
.breadcrumb {
  padding: 18px 0;
  font-size: 13.5px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a:hover {
  color: var(--primary);
}

.product-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: start;
  padding-bottom: 40px;
}

.gallery-main {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.gallery-main img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gallery-thumbs img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: 0.2s;
}
.gallery-thumbs img.active,
.gallery-thumbs img:hover {
  border-color: var(--primary);
}

.product-info h1 {
  font-size: 30px;
  font-weight: 900;
  color: var(--ink-2);
  line-height: 1.35;
  margin-bottom: 12px;
}
.info-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
}
.info-badge.dark {
  background: var(--ink-2);
  color: #fff;
}
.info-badge.green {
  background: var(--green-bg);
  color: #166534;
}
.info-badge.gray {
  background: #f3f4f6;
  color: var(--gray);
}
.info-badge.orange {
  background: var(--orange-soft);
  color: var(--orange);
  border: 1px solid #f6d3b3;
}

.price-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #fff8f1;
  border: 1px dashed var(--orange);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.price-block .old {
  color: var(--gray-light);
  font-size: 20px;
  font-weight: 700;
  text-decoration: line-through;
}
.price-block .now {
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
}
.price-block .now small {
  font-size: 16px;
}
.price-block .ship {
  background: var(--green-bg);
  color: #166534;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
}

.bulk-banner {
  background: #fef3c7;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #fde68a;
  margin-bottom: 18px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.spec-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f1f3f5;
  font-size: 14.5px;
  font-weight: 600;
}
.spec-item i {
  color: var(--orange);
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* بطاقة الطلب / الحجز */
.order-card {
  background: var(--bg-pink);
  border: 2px solid #fbcfe8;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 14px 34px rgba(230, 30, 80, 0.1);
  margin-top: 8px;
}
.order-card h3 {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink-2);
  text-align: center;
  margin-bottom: 4px;
}
.order-card .hint {
  text-align: center;
  font-size: 13.5px;
  color: var(--gray);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 12px;
}
.input-group {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.input-group:focus-within {
  border-color: var(--primary);
}
.input-group .input-icon {
  background: var(--primary);
  color: #fff;
  width: 48px;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.input-group input,
.input-group select {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 15px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  font-family: inherit;
  background: transparent;
}
.input-group input::placeholder {
  color: var(--gray-light);
  font-weight: 500;
}
.field-label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 7px;
  display: block;
}
.error-msg {
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 5px;
  display: none;
}
.error-msg.show {
  display: block;
}

.qty-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0 6px;
}
.qty-btn {
  width: 42px;
  height: 42px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-2);
  transition: 0.2s;
}
.qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.qty-value {
  font-size: 22px;
  font-weight: 900;
  min-width: 40px;
  text-align: center;
}
.bulk-applied {
  text-align: center;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  display: none;
}
.bulk-applied.show {
  display: block;
}

.order-summary {
  background: #fce7f3;
  border: 1px solid #f9a8d4;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 16px;
}
.order-summary .st {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
  color: #831843;
  display: flex;
  align-items: center;
  gap: 8px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.summary-row.total {
  border-top: 1px dashed #f472b6;
  padding-top: 9px;
  margin-top: 6px;
  font-weight: 900;
  font-size: 17px;
  color: var(--primary);
}
.summary-row .free {
  color: var(--green);
  font-weight: 800;
}

/* كتلة الموقع / الخريطة */
.location-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 20px 0;
}
.location-block h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.location-block h4 i {
  color: var(--primary);
}
.location-block p {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 12px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.location-block p i {
  color: var(--orange);
  margin-top: 4px;
}
.map-frame {
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #eef0f3;
}

/* المودال */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 22px;
  max-width: 440px;
  width: 100%;
  padding: 32px 22px;
  text-align: center;
  animation: popIn 0.32s ease;
}
@keyframes popIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.success-icon {
  width: 76px;
  height: 76px;
  background: var(--green-bg);
  color: var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 38px;
  margin: 0 auto 15px;
}
.modal-box h3 {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.modal-box p {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 16px;
}
.modal-highlight {
  background: #fef3c7;
  color: #92400e;
  padding: 11px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 18px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--ink-2);
  color: #fff;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 9500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success i {
  color: var(--green);
}
.toast.error i {
  color: #f87171;
}

/* ============================================================
                      لوحة التحكم
   ============================================================ */
.admin-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(243, 112, 33, 0.2), transparent 45%),
    var(--ink);
  padding: 20px;
}
.admin-login {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.admin-login .brand-logo {
  width: 60px;
  height: 60px;
  font-size: 15px;
  margin: 0 auto 16px;
}
.admin-login h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.admin-login p {
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 22px;
}
.hint-box {
  background: var(--orange-soft);
  border: 1px solid #f6d3b3;
  color: #9a3412;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 16px;
  text-align: center;
}

/* هيكل اللوحة */
.admin-shell {
  min-height: 100vh;
  display: none;
  flex-direction: column;
}
.admin-topbar {
  background: var(--ink);
  color: #fff;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 400;
}
.admin-topbar .brand {
  color: #fff;
}
.admin-topbar .brand b {
  color: #fff;
}
.admin-topbar .brand-text small {
  color: #9ca3af;
}
.admin-links {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-tabs {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  position: sticky;
  top: 64px;
  z-index: 350;
}
.admin-tab {
  padding: 16px 20px;
  font-weight: 800;
  font-size: 15px;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
}
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.admin-body {
  flex: 1;
  padding: 28px 20px 60px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.admin-panel {
  display: none;
}
.admin-panel.active {
  display: block;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.panel-head h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-head h2 i {
  color: var(--orange);
}
.panel-head .meta {
  font-size: 13.5px;
  color: var(--gray);
  font-weight: 600;
  margin-top: 4px;
}

/* أدوات اللوحة */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.toolbar .search-input {
  max-width: 320px;
}
.toolbar .spacer {
  flex: 1;
}

/* جدول عريض */
.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #eef0f3;
  overflow-x: auto;
}
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.admin-table th {
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray);
  padding: 14px 16px;
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f3f5;
  font-size: 14px;
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: #fcfcfd;
}
.admin-table .thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  border: 1px solid var(--line);
}
.admin-table .pname {
  font-weight: 800;
  color: var(--ink-2);
}
.admin-table .psub {
  font-size: 12.5px;
  color: var(--gray);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table .price {
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 30px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 800;
}
.badge-status.on {
  background: var(--green-bg);
  color: #166534;
}
.badge-status.off {
  background: #f3f4f6;
  color: var(--gray);
}
.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--gray);
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.icon-btn:hover {
  border-color: var(--ink-2);
  color: var(--ink-2);
}
.icon-btn.danger:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

/* نافذة النموذج */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 25, 0.6);
  display: none;
  z-index: 8000;
}
.drawer-overlay.show {
  display: block;
}
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  max-width: 480px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 8100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.drawer.show {
  transform: translateX(0);
}
.drawer-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink-2);
}
.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  gap: 15px;
  align-content: start;
}
.drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
}
.drawer-foot .btn {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink-2);
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.form-control:focus {
  border-color: var(--primary);
}
textarea.form-control {
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-hint {
  font-size: 12px;
  color: var(--gray);
  margin-top: 5px;
}
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.toggle-switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
.img-preview {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: #f9fafb;
  display: none;
}
.img-preview.show {
  display: block;
}
.sec-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 30px;
}
.sec-tag.sale {
  background: #fce7f3;
  color: var(--primary-dark);
}
.sec-tag.rent {
  background: var(--orange-soft);
  color: #9a3412;
}

/* ============================================================
              المعرض + عارض الصور (Lightbox) + شارات الصورة
   ============================================================ */
.gallery-main img.zoomable,
.card-media img.zoomable {
  cursor: zoom-in;
}
.gallery-zoom-btn {
  position: absolute;
  bottom: 26px;
  left: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 19, 25, 0.82);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: 0.2s;
}
.gallery-zoom-btn:hover {
  background: var(--primary);
}
.card-zoom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(15, 19, 25, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  pointer-events: none;
}

/* عارض الصور */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 10, 14, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px 20px 20px;
}
.lb-overlay.show {
  display: flex;
}
.lb-stage {
  max-width: 92vw;
  max-height: 78vh;
  display: grid;
  place-items: center;
}
.lb-stage img.lb-img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 12px;
  object-fit: contain;
  cursor: pointer;
}
.lb-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.lb-close:hover {
  background: var(--primary);
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.lb-nav:hover {
  background: var(--primary);
}
.lb-prev {
  right: 16px;
}
.lb-next {
  left: 16px;
}
.lb-counter {
  position: absolute;
  top: 22px;
  right: 22px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  border-radius: 30px;
}
.lb-thumbs {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 16px;
}
.lb-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  opacity: 0.6;
  cursor: pointer;
  transition: 0.2s;
}
.lb-thumb:hover,
.lb-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

/* شارات لوحة التحكم */
.thumb-wrap {
  position: relative;
  width: 56px;
  height: 56px;
}
.thumb-wrap .thumb {
  width: 100%;
  height: 100%;
}
.thumb-flag {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: #422006;
  display: grid;
  place-items: center;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.thumb-count {
  position: absolute;
  bottom: -6px;
  left: -6px;
  background: var(--ink-2);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 20px;
  padding: 1px 6px;
}
.main-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold);
  color: #422006;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-right: 6px;
}
.img-preview-wrap {
  position: relative;
}
.img-preview-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: #422006;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  display: none;
  align-items: center;
  gap: 4px;
}
.img-preview-flag.show {
  display: inline-flex;
}

/* محرر معرض الصور */
.gallery-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.gallery-empty {
  font-size: 12.5px;
  color: var(--gray);
}
.gallery-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
}
.gallery-thumb.is-main {
  border-color: var(--gold);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb-flag {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--gold);
  color: #422006;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.gallery-thumb-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}
.gallery-thumb-actions button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-2);
  font-size: 11px;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.gallery-thumb-actions button.danger {
  color: #dc2626;
}
.gallery-thumb-actions button:hover {
  background: #fff;
}
.gallery-add {
  display: flex;
  gap: 8px;
}
.gallery-add .form-control {
  flex: 1;
}
.gallery-add .btn {
  white-space: nowrap;
}

/* أزرار الرفع / الكاميرا */
.upload-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.upload-row .upload-btn {
  flex: 1;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}

/* نافذة الكاميرا */
.cam-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 13, 18, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cam-modal[hidden] {
  display: none;
}
.cam-box {
  width: 100%;
  max-width: 560px;
  background: #11151c;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cam-box video {
  width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}
.cam-actions {
  display: flex;
  gap: 10px;
}
.cam-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ============================================================
                       استجابة الشاشات
   ============================================================ */
@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
}
@media (max-width: 640px) {
  .site-header .container {
    height: 64px;
  }
  .brand-text small,
  .header-phone span {
    display: none;
  }
  .hero {
    padding: 42px 0 56px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero p.lead {
    font-size: 16px;
  }
  .duo-tabs {
    grid-template-columns: 1fr;
  }
  .hero-stat b {
    font-size: 22px;
  }
  .section-title {
    font-size: 22px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .card-title {
    font-size: 15px;
  }
  .card-price .now {
    font-size: 19px;
  }
  .product-info h1 {
    font-size: 23px;
  }
  .price-block .now {
    font-size: 27px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .drawer {
    max-width: 100%;
  }
  .lb-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lb-thumb {
    width: 46px;
    height: 46px;
  }
  .gallery-zoom-btn {
    bottom: 22px;
    left: 22px;
    font-size: 12px;
    padding: 8px 13px;
  }
}
