/* ==========================================================================
   دليل المحلات — نظام التصميم
   طابع صناعي/سيارات: شاصي رمادي غامق يؤطر محتوى فاتح، ولون برتقالي إشاري
   واحد لكل الإجراءات والعدادات.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@600;800;900&family=Tajawal:wght@400;500;700&display=swap");

:root {
  /* ألوان */
  --ink: #032f3c;          /* الشاصي الغامق: الهيدر والقائمة السفلية */
  --ink-soft: #23262e;     /* سطح غامق ثانوي */
  --paper: #ffffff;        /* محتوى فاتح */
  --surface: #f4f4f2;      /* خلفية عامة خلف الحاوية */
  --field: #f2f2f0;        /* خلفية الحقول والبحث */
  --line: #e7e6e2;         /* حدود فاتحة */
  --steel: #046169;        /* نص ثانوي */
  --steel-light: #9aa0a8;
  --ink-text: #1c1e22;     /* نص أساسي */
  --accent: #ff6a00;       /* برتقالي إشاري */
  --accent-dark: #c9540a;
  --accent-tint: #fff1e6;
  --ok: #2e9e5b;

  /* طباعة */
  --font-display: "Cairo", "Tajawal", Arial, sans-serif;
  --font-body: "Tajawal", "Cairo", Arial, sans-serif;

  /* مسافات ونصف قطر */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 22px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow-card: 0 2px 10px rgba(20, 22, 26, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink-text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink-text);
  line-height: 1.3;
}

p { font-size: 15px; line-height: 1.6; color: var(--steel); }

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

button {
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

button:hover { background: var(--accent-dark); }
button:active { transform: scale(0.98); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   الحاوية العامة — إطار هاتف
   ========================================================================== */

.container {
  width: 390px;
  min-height: 844px;
  margin: 20px auto;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(20, 22, 26, 0.18);
  overflow: hidden;
  position: relative;
  text-align: center;
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ==========================================================================
   الهيدر (شاصي غامق)
   ========================================================================== */

.app-header {
  background: var(--ink);
  color: #fff;
  padding: 18px 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: right;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 0 12px;
}

.app-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo-text h1 {
  font-size: 19px;
  color: #fff;
  font-weight: 800;
}

.app-logo-text p {
  font-size: 12px;
  color: #a7abb3;
  margin-top: 2px;
}

.profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ink-soft);
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-btn:hover { background: #2e323c; }

/* زر القائمة */
.menu-button {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  background: var(--ink-soft);
  color: #fff;
  font-size: 22px;
  line-height: 38px;
  cursor: pointer;
}

.menu-button:hover { background: #2e323c; }

/* ==========================================================================
   البحث
   ========================================================================== */

.search-box {
  position: relative;
  margin: 18px 20px 0;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  padding: 0 44px 0 15px;
  font-size: 15px;
  outline: none;
  color: var(--ink-text);
}

.search-box input:focus {
  border-color: var(--accent);
  background: #fff;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 13px;
  font-size: 19px;
  color: var(--steel);
}

/* ==========================================================================
   البطاقة الرئيسية
   ========================================================================== */

.hero-card {
  background: var(--ink);
  border-radius: var(--radius-md);
  padding: 22px;
  margin: 18px 20px 0;
  text-align: right;
  border-inline-start: 4px solid var(--accent);
}

.hero-card h2 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}

.hero-card p {
  font-size: 13px;
  color: #a7abb3;
  line-height: 1.7;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions .hero-btn {
  flex: 1 1 auto;
  width: auto;
  min-width: 140px;
}

.hero-btn {
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

.hero-btn-secondary {
  background: transparent !important;
  border: 1px solid #3a3e48;
  color: #fff !important;
}

.hero-btn-secondary:hover {
  background: var(--ink-soft) !important;
}

/* ==========================================================================
   الأقسام
   ========================================================================== */

.section-title {
  text-align: right;
  font-size: 19px;
  margin: 26px 20px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
}

.back-to-home {
  width: calc(100% - 40px);
  margin: 0 20px 14px;
  background: var(--field);
  color: var(--ink-text);
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 10px;
}

.back-to-home:hover { background: var(--line); }

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px 8px;
}

/* بطاقات الأقسام الرئيسية (الصيانة / المبيعات) */
.category-tile {
  background: var(--ink);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.category-tile:hover { transform: translateY(-2px); }

.category-tile .category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  background: var(--ink-soft);
}

.category-tile h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 4px;
}

.category-tile p {
  color: #a7abb3;
  font-size: 12px;
}

/* قائمة التخصصات (صفوف قابلة للمسح بدل بطاقات متطابقة) */
.category-grid.specialty-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.specialty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.specialty-row:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.specialty-icon {
  font-size: 19px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.specialty-name {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-text);
}

.specialty-count {
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.specialty-arrow {
  color: var(--steel-light);
  font-size: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   التنقل السفلي
   ========================================================================== */

.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 26px;
  padding: 10px 5px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
}

.nav-item {
  border: none;
  background: transparent;
  color: #8b8f97;
  font-size: 11px;
  padding: 6px;
  width: auto;
}

.nav-item:hover { background: transparent; }

.nav-item.active { color: var(--accent); }

.nav-icon {
  display: block;
  font-size: 19px;
  margin-bottom: 3px;
}

/* ==========================================================================
   الأزرار العائمة والنوافذ المنبثقة
   ========================================================================== */

.floating-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 22px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 106, 0, 0.35);
  z-index: 100;
}

.floating-btn:hover { background: var(--accent-dark); }

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(20, 22, 26, 0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--paper);
  padding: 30px 26px;
  border-radius: var(--radius-md);
  max-width: 440px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  animation: slideIn 0.25s ease;
}

.type-modal .modal {
  max-width: 340px;
  padding: 26px 22px;
  text-align: center;
}

@keyframes slideIn {
  from { transform: translateY(-24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 20px;
}

.close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: var(--steel) !important;
  border: none !important;
  font-size: 24px !important;
  line-height: 1 !important;
  transform: none !important;
}

.close-btn:hover {
  width: auto !important;
  background: transparent !important;
  color: var(--ink-text) !important;
  transform: none !important;
}

/* ==========================================================================
   النماذج
   ========================================================================== */

.form-group { margin-bottom: 16px; text-align: right; }

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--ink-text);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  background: #fff;
}

.form-group textarea { resize: vertical; min-height: 78px; }

.btn-submit {
  background: var(--accent);
  color: #fff;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

.btn-submit:hover { background: var(--accent-dark); }

.auth-error {
  color: #d92626;
  font-size: 13px;
  text-align: right;
  margin: -4px 0 10px;
}

.auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--steel);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

.menu-item.logged-in { color: var(--ok); }


.specialty-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.specialty-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  cursor: pointer;
  font-size: 14px;
}

.specialty-checkbox:hover { border-color: var(--accent); }

.specialty-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.specialty-checkbox span { flex: 1; }

.specialty-help {
  display: block;
  margin-top: 8px;
  color: var(--steel);
  font-size: 12px;
}

/* ==========================================================================
   قوائم السيارات القابلة للطي (منشأ / نوع / موديل / سنة)
   ========================================================================== */

.car-accordion-group { margin-top: 14px; }

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink-text);
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.accordion-toggle:hover { border-color: var(--accent); }

.accordion-toggle .accordion-arrow {
  transition: transform 0.2s ease;
  font-size: 14px;
  color: var(--accent);
}

.accordion-toggle[aria-expanded="true"] .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-content {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px;
  margin-top: 0;
}

.car-options {
  max-height: 260px;
  overflow-y: auto;
}

.car-options .specialty-checkbox { padding: 8px 10px; }

.accordion-done-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}

.accordion-done-btn:hover { background: var(--accent-dark); }

.selection-summary {
  margin-top: 8px;
  padding: 9px 12px;
  background: var(--accent-tint);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-text);
  line-height: 1.7;
}

.selection-summary strong { color: var(--accent-dark); }

/* ==========================================================================
   قوائم المحلات المسجلة
   ========================================================================== */

.registrations-container { margin-top: 0; padding: 20px; }

.registration-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-inline-start: 4px solid var(--accent);
  padding: 18px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  text-align: right;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.registration-card:hover {
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

.registration-card h3 {
  margin-top: 0;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.registration-card p {
  margin: 7px 0;
  color: var(--steel);
  font-size: 13.5px;
  line-height: 1.6;
}

.registration-card strong { color: var(--ink-text); }

.registration-card > a > button,
.registration-card > .comment-input-row {
  margin-top: 6px;
}

.card-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease;
}
.card-toggle-btn:hover {
  background: var(--accent);
  color: #fff;
}

.registration-card hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.registration-card h4 {
  font-size: 14px;
  margin-bottom: 10px;
}

.no-registrations {
  text-align: center;
  color: var(--steel);
  padding: 30px;
  font-size: 14px;
}

.loading { text-align: center; color: var(--steel); padding: 20px; }

.delete-btn {
  background-color: #d9453f;
  color: #fff;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-top: 10px;
}

.delete-btn:hover { background-color: #b8362f; }

/* ==========================================================================
   عداد "فئات المبيعات/الصيانة" العام (متبقٍ من نسخة سابقة، لا يزال مستخدَمًا)
   ========================================================================== */

.category-count {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 2px 7px;
  border-radius: 10px;
  vertical-align: middle;
}

/* ==========================================================================
   التقييمات والتعليقات
   ========================================================================== */

.rating-summary {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}

.review-form { margin-top: 10px; }
.review-form input,
.review-form textarea,
.review-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 8px;
  font-family: var(--font-body);
  color: var(--ink-text);
}

.review-form textarea { min-height: 60px; resize: vertical; }

.comment-btn { background: var(--ink); }
.comment-btn:hover { background: var(--ink-soft); }

.comment-input-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.comment-input-row textarea {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0;
  min-height: 42px;
  max-height: 120px;
  margin: 0 !important;
  padding: 8px 10px !important;
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  color: var(--ink-text);
  resize: vertical;
}
.comment-input-row .comment-btn {
  flex: 0 0 auto !important;
  width: 42px !important;
  height: 42px !important;
  min-height: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.comment-input-row .comment-btn:active { transform: scale(0.94); }
.comment-input-row .comment-btn:hover { background: var(--accent-dark, var(--ink-soft)); }

.comments-list { text-align: right; margin: 10px 0; }

.comment-item {
  background: var(--field);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}

.comment-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.comment-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.comment-name {
  font-weight: 700;
  color: var(--ink-text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comment-stars { color: var(--accent); letter-spacing: 1px; }

.comment-text {
  margin-top: 1px;
  font-size: 13.5px;
  color: var(--steel);
  line-height: 1.5;
}

.comment-like-btn {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: none;
  background: transparent;
  color: var(--steel-light);
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.comment-like-btn:hover { background: var(--field); color: var(--steel); }
.comment-like-btn:active { transform: scale(0.92); }

.comment-like-btn.liked { color: #1877f2; font-weight: 700; }
.comment-like-btn.liked:hover { background: rgba(24, 119, 242, 0.08); }

.comment-like-btn .like-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.comment-like-btn .like-count {
  font-family: var(--font-display);
  min-width: 8px;
  text-align: center;
}

.no-comments {
  color: var(--steel-light);
  font-size: 13px;
  text-align: right;
  margin: 8px 0;
}

.show-more-comments {
  width: auto;
  background: var(--field);
  color: var(--ink-text);
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  margin-top: 2px;
}

.show-more-comments:hover { background: var(--line); }

.already-rated-note {
  color: var(--ok);
  font-weight: 700;
  font-size: 13.5px;
  margin-top: 8px;
  text-align: right;
}

.review-block { margin: 14px 0; }
.review-block h4 { margin: 0 0 8px; }

.rating-form { margin-top: 10px; }

.star-select {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 2px;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 8px;
}

.star {
  color: var(--line);
  cursor: pointer;
  transition: color 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.star.selected { color: var(--accent); }
.star.hover { color: var(--accent); transform: scale(1.15); }

/* نجوم التقييم أعلى يسار البطاقة (ضغط على نجمة = إرسال مباشر) */
.shop-rating-top {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.star-widget {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 1px;
  line-height: 1;
}

.star-widget .star { font-size: 16px; }

.star-widget.already-rated .star {
  cursor: pointer;
}

.my-rating-note {
  display: block;
  font-size: 11px;
  color: var(--accent-dark);
  font-weight: 600;
  margin-top: 2px;
}

.edit-rating-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  font-size: 11px;
  padding: 2px 8px;
  margin-top: 4px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  transition: background 0.15s ease;
}
.edit-rating-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* رقم الهاتف: ضغطة مطوّلة تُظهر اتصال / نسخ */
.shop-phone {
  color: var(--accent-dark);
  font-weight: 700;
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
  border-bottom: 1px dashed var(--accent);
  cursor: pointer;
  padding: 2px 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.phone-hint {
  display: block;
  color: var(--steel-light);
  font-size: 11px;
  margin-top: 2px;
}

/* نافذة إجراءات الهاتف (اتصال / نسخ) */
.phone-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.phone-action-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.phone-action-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  animation: phoneSheetUp 0.22s ease;
}

@keyframes phoneSheetUp {
  from { transform: translateY(40px); opacity: 0.4; }
  to   { transform: translateY(0);    opacity: 1; }
}

.phone-action-title {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-text);
  direction: ltr;
  padding: 6px 0;
}

.phone-action-panel button {
  border: none;
  background: var(--field);
  color: var(--ink-text);
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.phone-action-panel button.phone-action-cancel {
  background: transparent;
  color: var(--steel);
}

/* ==========================================================================
   القائمة الجانبية
   ========================================================================== */

.side-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--paper);
  z-index: 10000;
  padding: 70px 16px 20px;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
  transition: right 0.3s ease;
  box-sizing: border-box;
}

.side-menu.active { right: 0; }

.menu-close {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: var(--steel);
}

.menu-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 22px;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink-text);
  font-size: 15px;
  text-align: right;
}

.menu-item:hover { background: var(--accent-tint); color: var(--accent-dark); }

.login-item { margin-top: 16px; background: var(--ink); color: #fff; }
.login-item:hover { background: var(--ink-soft); color: #fff; }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.45);
  z-index: 9998;
  display: none;
}

.menu-overlay.active { display: block; }

/* ==========================================================================
   علم العراق فوق شعار التطبيق (إن استُخدم)
   ========================================================================== */

.flag-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.iraq-flag {
  max-width: 160px;
  width: 14%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.flag-overlay {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
}

@media (max-width: 600px) {
  .iraq-flag { width: 28%; }
  .flag-overlay { font-size: 16px; }
}
