/* الألوان والشبكة الحيوية وتنسيق الأزرار والعلامات العريضة */
:root {
  --bg-gradient: radial-gradient(circle at 50% 15%, #132a3e 0%, #0a1827 50%, #050c14 100%);
  --card-bg: #eddca0;
  --card-border: rgba(255, 255, 255, 0.45);
  --dark-btn-grad: linear-gradient(145deg, #372b11 0%, #251c09 100%);
  --dark-btn-hover: linear-gradient(145deg, #443515 0%, #2f230b 100%);
  --text-dark: #261e09;
  --text-muted: #54441e;
  --brand-green: #22c55e;
  --gold-accent: #f5c518;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 12px;
  overflow-x: hidden;
  position: relative;
  color: var(--text-dark);
}

/* ==========================================================
   الكرت الرئيسي
   ========================================================== */
.page-container {
  width: 100%;
  max-width: 448px;
  position: relative;
  z-index: 10;
  margin: 0 auto;
}

.main-card {
  background: var(--card-bg);
  border-radius: 36px;
  padding: 26px 20px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(237, 220, 160, 0.2);
  border: 2px solid var(--card-border);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(40, 30, 10, 0.08);
  border: 1px solid rgba(40, 30, 10, 0.1);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 10px var(--brand-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(40, 30, 10, 0.08);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
  user-select: none;
}

.header-action-btn:hover {
  background: rgba(40, 30, 10, 0.16);
  transform: scale(1.06);
}

.header-action-btn:active {
  transform: scale(0.88);
  background: rgba(40, 30, 10, 0.24);
  transition-duration: 0.08s;
}

/* البروفايل والشعار */
.profile-header {
  text-align: center;
  margin-bottom: 18px;
}

.avatar-container {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 12px;
  cursor: pointer;
}

.avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(to bottom, #ffea79, #f7cb2f, #e4a812);
  padding: 4px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 25px rgba(245, 197, 24, 0.65);
}

.avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fde873;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-real-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.avatar-container:hover .brand-real-logo {
  transform: scale(1.08);
}

.sparkle-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid #fbbf24;
  color: #d97706;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.verified-icon {
  font-size: 0.95rem;
  color: #854d0e;
}

.brand-bio {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 0 6px;
}

/* صف الأيقونات السريعة */
.quick-icons-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.quick-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(48, 38, 14, 0.25);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
  background: rgba(255, 255, 255, 0.4);
  user-select: none;
}

.quick-icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.quick-icon-btn:active {
  transform: scale(0.88);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition-duration: 0.08s;
}

.quick-icon-btn.q-insta:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #ffffff; border-color: transparent; }
.quick-icon-btn.q-wa:hover { background: #25d366; color: #ffffff; border-color: transparent; }
.quick-icon-btn.q-fb:hover { background: #1877f2; color: #ffffff; border-color: transparent; }
.quick-icon-btn.q-mail:hover { background: #372b11; color: #ffffff; border-color: transparent; }

/* شارات الثقة الثلاث: متناسقة ومتساوية 100% */
.trust-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.trust-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(48, 38, 14, 0.12);
  border-radius: 14px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
  user-select: none;
}

.trust-card:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.85);
  transition-duration: 0.08s;
}

.t-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.t-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 3px;
  text-align: center;
  word-break: break-word;
}

/* ==========================================================
   أزرار الكبسولة (الأسهم متجهة لليمين)
   ========================================================== */
.links-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.luxury-capsule-btn {
  background: var(--dark-btn-grad);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 11px 18px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 8px 18px -3px rgba(35, 25, 5, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.25s ease, border-color 0.25s ease;
  width: 100%;
  user-select: none;
  cursor: pointer;
}

.luxury-capsule-btn:hover {
  background: var(--dark-btn-hover);
  transform: translateY(-2.5px);
  box-shadow: 0 12px 22px -3px rgba(30, 20, 5, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
}

.luxury-capsule-btn:active {
  transform: scale(0.965) translateY(1.5px);
  box-shadow: 0 3px 8px -2px rgba(20, 15, 3, 0.5), inset 0 1px 3px rgba(0, 0, 0, 0.35);
  filter: brightness(1.12);
  transition-duration: 0.08s;
}

.luxury-capsule-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -60%;
  width: 35%;
  height: 200%;
  background: linear-gradient(60deg, transparent 10%, rgba(255, 255, 255, 0.15) 50%, transparent 90%);
  transform: rotate(25deg);
  transition: all 0.75s ease;
  pointer-events: none;
}

.luxury-capsule-btn:hover::after {
  right: 140%;
}

.wa-hero-btn {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 8px 20px -3px rgba(34, 197, 94, 0.22), 0 8px 18px -3px rgba(35, 25, 5, 0.35);
}

.wa-hero-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(60deg, transparent 15%, rgba(255, 255, 255, 0.35) 50%, transparent 85%);
  transform: rotate(25deg);
  pointer-events: none;
  animation: waShimmer 3.8s ease-in-out infinite;
}

@keyframes waShimmer {
  0%, 15% { right: -70%; }
  55%, 100% { right: 150%; }
}

.wa-hero-btn:hover {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 12px 26px -2px rgba(34, 197, 94, 0.4);
}

.wa-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wa-live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
  animation: pulseDot 1.8s infinite;
}

.btn-left-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  direction: ltr;
  min-width: 0;
}

.btn-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.fb-box { background: #1877f2; color: #ffffff; }
.insta-box { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #ffffff; }
.wa-box { background: #25d366; color: #ffffff; font-size: 1.35rem; }
.maps-box { background: #ffffff; padding: 7px; }
.phone-box { background: #eab308; color: #3b2d07; }
.mail-box { background: #ffffff; padding: 7px; }

.maps-svg { width: 100%; height: 100%; }

.btn-titles-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.btn-title-en {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
  white-space: nowrap;
}

.btn-desc {
  font-size: 0.68rem;
  color: #d6cbab;
  margin-top: 1px;
  direction: rtl;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-green {
  color: #86efac;
}

.btn-right-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-badge {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
  color: #f5eed3;
}

.arrow-nav {
  font-size: 0.78rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.luxury-capsule-btn:hover .arrow-nav {
  transform: translateX(4px);
  opacity: 1;
}

/* ==========================================================
   قسم العلامات التجارية بالعرض (3 فوق و 4 تحت) المجهز للصور
   ========================================================== */
.brands-section-poster {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(48, 38, 14, 0.16);
  border-radius: 26px;
  padding: 16px 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.poster-title-wrap {
  text-align: center;
  margin-bottom: 12px;
}

.poster-heading {
  font-size: 0.95rem;
  font-weight: 900;
  color: #2b220a;
  letter-spacing: -0.3px;
}

.horizontal-brands-matrix {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* الصف الأول: 3 بطاقات عريضة (RAMO على أقصى اليسار) */
.brands-row-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* الصف الثاني: 4 بطاقات أفقية متجاورة */
.brands-row-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

/* القالب المخصص للصور */
.h-brand-card {
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  height: 62px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  position: relative;
  user-select: none;
  cursor: pointer;
}

.h-brand-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  border-color: #f5c518;
}

.h-brand-card:active {
  transform: scale(0.94);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border-color: #f5c518;
  transition-duration: 0.08s;
}

/* تنسيق الصور لتملأ القالب بحجم كبير وواضح */
.custom-brand-img {
  width: 100%;
  height: 100%;
  max-width: 96%;
  max-height: 52px;
  object-fit: contain;
  display: block;
}

/* نص البديل التلقائي إذا لم ترفع الصورة بعد */
.fallback-brand-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.acto-c { color: #0d2b6b; font-weight: 900; font-size: 0.95rem; letter-spacing: 1px; }
.jendental-c { color: #0284c7; flex-direction: column; font-size: 0.85rem; }
.jendental-c small { font-size: 0.52rem; color: #475569; letter-spacing: 1px; }
.kingch-c { color: #0f766e; font-size: 0.8rem; gap: 3px; }
.heydent-c { color: #334155; font-size: 0.82rem; }
.ofgrade-c { color: #ffffff; background: #0f172a; padding: 2px 6px; border-radius: 4px; font-size: 0.72rem; }
.spearburs-c { color: #b45309; font-family: serif; font-style: italic; font-size: 0.85rem; }
.ramo-c { color: #0369a1; font-size: 0.82rem; font-weight: 900; gap: 3px; }

/* الفوتر */
.card-footer {
  text-align: center;
  border-top: 1px solid rgba(48, 38, 14, 0.15);
  padding-top: 12px;
}

.copyright-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* إشعار Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #201806;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* الاستجابة على الشاشات الصغيرة وتفادي اقتصاص النصوص */
@media (max-width: 440px) {
  .luxury-capsule-btn {
    padding: 10px 14px;
  }
  .btn-title-en {
    font-size: 0.88rem;
  }
  .btn-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
  .btn-left-zone {
    gap: 10px;
  }
}

/* الاستجابة على الشاشات الصغيرة جداً */
@media (max-width: 360px) {
  .btn-title-en {
    font-size: 0.82rem;
  }
  .brands-row-three {
    grid-template-columns: repeat(2, 1fr);
  }
  .brands-row-four {
    grid-template-columns: repeat(2, 1fr);
  }
}