@charset "UTF-8";
/* ═══════════════════════════════════════════════════════════════════════
   مُونَتْنا — بروفايل التاجر + الشات
   خط كبير وأزرار كبيرة — معظم مستخدمينا فوق الأربعين.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── الغلاف والهوية ────────────────────────────────────────────────── */
.shopx__hero { margin-bottom: var(--s4); }

.shopx__cover {
  height: clamp(150px, 26vw, 280px);
  background: var(--paper-2);
  overflow: hidden;
  position: relative;
}
.shopx__cover img { width: 100%; height: 100%; object-fit: cover; }
.shopx__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,14,10,.35), transparent 60%);
}

.shopx__id {
  display: flex; align-items: flex-end; gap: var(--s3);
  margin-top: -46px; position: relative; z-index: 2;
}

.shopx__ava {
  width: 116px; height: 116px; border-radius: 50%; flex: none;
  object-fit: cover; border: 5px solid var(--paper); background: var(--paper-2);
  box-shadow: var(--sh-2);
}
.shopx__ava--txt {
  display: grid; place-items: center;
  background: var(--red-soft); color: var(--red);
  font-family: var(--f-head); font-weight: 900; font-size: 3rem;
}

.shopx__who { padding-bottom: .4rem; min-width: 0; }
.shopx__who h1 {
  font-size: var(--t-2xl); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.shopx__check { width: 26px; height: 26px; color: var(--green); flex: none; }
.shopx__sub { color: var(--muted); font-size: var(--t-sm); margin-top: .2rem; }

.shopx__nums {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-top: .7rem; font-size: var(--t-sm); color: var(--ink-2);
}
.shopx__nums b { font-family: var(--f-head); font-weight: 900; color: var(--ink); }
.shopx__nums .stars { margin-inline-end: .25rem; }
.shopx__nums > span:nth-child(even) { color: var(--clay); }

/* أزرار التواصل — كبيرة ومتساوية */
.shopx__cta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem; margin-top: var(--s4);
}
.shopx__cta .btn { width: 100%; }

.shopx__reply {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: var(--s2); font-size: var(--t-sm); font-weight: 700;
  color: var(--green-deep);
}
.shopx__reply svg { width: 18px; height: 18px; }

/* ── البايو والحقائق ───────────────────────────────────────────────── */
.shopx__bio {
  font-size: var(--t-md); line-height: 1.85; color: var(--ink-2);
  margin: var(--s4) 0; max-width: 68ch;
}

.shopx__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: .7rem; margin-bottom: var(--s5);
}
.shopx__facts > div {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s3);
}
.shopx__facts dt {
  display: flex; align-items: center; gap: .4rem;
  font-size: var(--t-xs); color: var(--muted); font-weight: 700; margin-bottom: .3rem;
}
.shopx__facts dt svg { width: 16px; height: 16px; color: var(--red); flex: none; }
.shopx__facts dd { font-weight: 700; font-size: var(--t-sm); }

/* ── التبويبات ─────────────────────────────────────────────────────── */
.shopx__tabs {
  display: flex; gap: .3rem; overflow-x: auto; margin-bottom: var(--s4);
  border-bottom: 2px solid var(--line); padding-bottom: 0;
}
.shopx__tabs button {
  padding: .8rem 1.2rem; font-family: var(--f-head); font-weight: 800;
  font-size: var(--t-sm); color: var(--muted); white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px; min-height: 50px;
}
.shopx__tabs button:hover { color: var(--ink); }
.shopx__tabs button.is-on { color: var(--red); border-bottom-color: var(--red); }

.shopx__pane { display: none; padding-bottom: var(--s6); }
.shopx__pane.is-on { display: block; }
.shopx__empty { color: var(--muted); text-align: center; padding: var(--s5) 0; }

/* ── شبكة المنتجات ─────────────────────────────────────────────────── */
.shopx__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.shopx__tile {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background: var(--paper-2); display: block;
}
.shopx__tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.shopx__tile:hover img { transform: scale(1.06); }
.shopx__tile-price {
  position: absolute; top: .5rem; inset-inline-start: .5rem;
  background: var(--red); color: #fff; font-family: var(--f-head);
  font-weight: 900; font-size: var(--t-xs); padding: .2rem .7rem;
  border-radius: var(--r-pill);
}
.shopx__tile-name {
  position: absolute; inset-inline: 0; bottom: 0; padding: 1.6rem .6rem .5rem;
  background: linear-gradient(to top, rgba(20,14,10,.88), transparent);
  color: #fff; font-size: var(--t-xs); font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── التقييمات ─────────────────────────────────────────────────────── */
.rev-list { display: grid; gap: .7rem; max-width: 680px; }
.rev {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s3);
}
.rev__top { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.rev__ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--sand);
  display: grid; place-items: center; font-weight: 800;
}
.rev__top b { display: block; font-size: var(--t-sm); }
.rev__at { margin-inline-start: auto; font-size: var(--t-xs); color: var(--muted); }
.rev p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.7; }

/* ── عن التاجر ─────────────────────────────────────────────────────── */
.shopx__about { max-width: 720px; }
.shopx__about p { font-size: var(--t-md); line-height: 1.9; color: var(--ink-2); margin-bottom: var(--s4); }
.shopx__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.shopx__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ═══════════════════════════════════════════════════════════════════════
   الشات
   ═══════════════════════════════════════════════════════════════════════ */

.chat-panel {
  position: fixed; inset: 0; z-index: 9990; display: none;
  background: rgba(34,27,21,.55);
}
.chat-panel.is-open { display: block; }

.chat-box {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  width: min(100%, 460px); background: var(--paper);
  display: flex; flex-direction: column; box-shadow: var(--sh-3);
  /* 100dvh بيتماشى مع شريط عنوان المتصفح لما بينزل ويطلع عالموبايل —
     بدونو خانة الكتابة بتختفي تحت حافة الشاشة. */
  height: 100dvh; max-height: 100dvh;
}
@supports not (height: 100dvh) {
  .chat-box { height: 100%; }
}

.chat-head {
  display: flex; align-items: center; gap: .6rem;
  padding: var(--s3); background: var(--white);
  border-bottom: 1px solid var(--line); flex: none;
}
.chat-head__ava {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--green-soft); color: var(--green-deep);
  display: grid; place-items: center; font-family: var(--f-head); font-weight: 900;
}
.chat-head__who { flex: 1; min-width: 0; }
.chat-head__who b { display: block; font-size: var(--t-sm); }
.chat-head__who span { font-size: var(--t-xs); color: var(--muted); }
.chat-head button {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); flex: none;
}
.chat-head button:hover { background: var(--sand); }
.chat-head svg { width: 20px; height: 20px; }

/* كرت المنتج فوق المحادثة */
.chat-product {
  display: flex; align-items: center; gap: .7rem; padding: .7rem var(--s3);
  background: var(--sand); border-bottom: 1px solid var(--line); flex: none;
}
.chat-product img { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.chat-product b { display: block; font-size: var(--t-xs); line-height: 1.4; }
.chat-product span { font-family: var(--f-head); font-weight: 900; color: var(--red); font-size: var(--t-sm); }

.chat-body {
  flex: 1; overflow-y: auto; padding: var(--s3);
  display: flex; flex-direction: column; gap: .6rem;
  overscroll-behavior: contain;
}

.bubble {
  max-width: 82%; padding: .7rem 1rem; border-radius: 18px;
  font-size: var(--t-base); line-height: 1.65; word-break: break-word;
  position: relative;
}
.bubble--me {
  align-self: flex-start; background: var(--green); color: #fff;
  border-end-start-radius: 5px;
}
.bubble--them {
  align-self: flex-end; background: var(--white);
  border: 1px solid var(--line); border-end-end-radius: 5px;
}
.bubble__meta {
  display: flex; align-items: center; gap: .3rem; justify-content: flex-end;
  font-size: .7rem; opacity: .75; margin-top: .25rem;
}
.bubble--me .bubble__meta { color: rgba(255,255,255,.85); }
.bubble__meta svg { width: 14px; height: 14px; }

.bubble img { border-radius: 12px; max-width: 100%; display: block; }
.bubble audio { width: 220px; max-width: 100%; }
.bubble a.map {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 800; text-decoration: underline;
}

.chat-day {
  align-self: center; font-size: var(--t-xs); color: var(--muted);
  background: var(--paper-2); padding: .2rem .9rem; border-radius: var(--r-pill);
}

/* ردود جاهزة */
.chat-quick {
  display: flex; gap: .4rem; overflow-x: auto; padding: .6rem var(--s3);
  background: var(--paper-2); border-top: 1px solid var(--line); flex: none;
}
.chat-quick button {
  white-space: nowrap; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: .5rem 1rem; font-size: var(--t-sm);
  font-weight: 700; min-height: 44px; flex: none;
}
.chat-quick button:hover { background: var(--sand); }

/* شريط الإدخال — زر المايك أكبر من زر الإرسال */
.chat-input {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem var(--s3) calc(.6rem + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line); flex: none;
}
.chat-input input[type="text"] {
  flex: 1; min-width: 0; min-height: 52px; padding: .7rem 1.1rem;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--paper); font-size: var(--t-base);
}
.chat-input input[type="text"]:focus { outline: none; border-color: var(--green); }

.chat-btn {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--paper-2);
}
.chat-btn:hover { background: var(--sand); }
.chat-btn svg { width: 24px; height: 24px; }

.chat-btn--mic {
  width: 64px; height: 64px; background: var(--red); color: #fff;
}
.chat-btn--mic svg { width: 30px; height: 30px; }
.chat-btn--mic:hover { background: var(--red-deep); }
.chat-btn--mic.is-rec { background: var(--green); animation: recPulse 1.2s infinite; }
@keyframes recPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,122,61,.6); }
  70%  { box-shadow: 0 0 0 16px rgba(0,122,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,122,61,0); }
}

.chat-btn--send { background: var(--green); color: #fff; }
.chat-btn--send:hover { background: var(--green-deep); }

.chat-rec {
  display: none; align-items: center; gap: .6rem; flex: 1;
  font-weight: 800; color: var(--red);
}
.chat-rec.is-on { display: flex; }
.chat-rec__dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--red);
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* لائحة المحادثات */
.convo-list { display: grid; gap: .5rem; }
.convo {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s3); text-align: start;
  transition: border-color .2s, transform .2s;
}
.convo:hover { border-color: var(--green); transform: translateY(-2px); }
.convo__ava {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--sand); display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 900;
}
.convo__b { flex: 1; min-width: 0; }
.convo__b b { display: block; font-size: var(--t-sm); }
.convo__b span {
  display: block; font-size: var(--t-xs); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.convo__n {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-size: .78rem; font-weight: 800;
  display: grid; place-items: center; flex: none;
}
.convo__prod {
  font-size: .7rem; background: var(--sand); color: var(--ink-2);
  padding: .1rem .5rem; border-radius: var(--r-pill); display: inline-block; margin-top: .2rem;
}

/* جرس الإشعارات */
.bell-dot {
  position: absolute; top: -2px; inset-inline-end: -2px;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--paper);
}
.bell-dot[hidden] { display: none; }

@media (max-width: 620px) {
  .shopx__id { margin-top: -34px; }
  .shopx__ava { width: 86px; height: 86px; font-size: 2.2rem; border-width: 4px; }
  .shopx__who h1 { font-size: var(--t-xl); }
  .shopx__grid { gap: 3px; }
  /* عالموبايل الشات بياخد الشاشة كاملة — بلا حواف ولا زوايا */
  .chat-box { width: 100%; inset-inline: 0; box-shadow: none; }
  .chat-panel { background: var(--paper); }
}

/* ═══════════════════════════════════════════════════════════════════════
   المكالمات — صوت وفيديو
   بتاخد الشاشة كاملة، والأزرار كبيرة حتى تنضغط بالإبهام بلا تدقيق.
   ═══════════════════════════════════════════════════════════════════════ */

.call-ui {
  position: fixed; inset: 0; z-index: 9995; display: none;
  background: #14100C; color: #fff;
  flex-direction: column;
  height: 100dvh;
}
@supports not (height: 100dvh) { .call-ui { height: 100%; } }
.call-ui.is-open { display: flex; }

.call-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }

/* بمكالمة الصوت ما منبيّن الفيديو أبداً */
.call-remote, .call-local { display: none; }
.call-ui.is-video .call-remote {
  display: block; width: 100%; height: 100%; object-fit: cover; background: #14100C;
}
.call-ui.is-video .call-local {
  display: block; position: absolute; inset-block-start: var(--s3); inset-inline-end: var(--s3);
  width: 108px; aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--r-md); border: 2px solid rgba(255,255,255,.35);
  box-shadow: var(--sh-2); background: #221B15;
}

/* اسم الطرف التاني وحالة المكالمة */
.call-who {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .7rem; text-align: center;
  padding: var(--s4); pointer-events: none;
}
.call-ui.is-video .call-who {
  inset-block-start: auto; inset-block-end: 0; justify-content: flex-end;
  background: linear-gradient(to top, rgba(20,16,12,.75), transparent);
  padding-block-end: var(--s4);
}
.call-ava {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--green-deep); color: #fff;
  display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 900; font-size: 2.8rem;
}
.call-ui.is-video .call-ava { display: none; }
.call-who b { font-family: var(--f-head); font-size: var(--t-lg); }
.call-who span:last-child { color: rgba(255,255,255,.7); font-size: var(--t-base); }

/* شريط الأزرار */
.call-bar {
  flex: none; display: flex; align-items: center; justify-content: center;
  gap: var(--s3); padding: var(--s4) var(--s3)
    calc(var(--s4) + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.06);
}
.call-btn {
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.15);
  transition: transform .15s ease, background .15s ease;
}
.call-btn:hover { transform: translateY(-2px); }
.call-btn svg { width: 26px; height: 26px; }
.call-btn.is-off { background: rgba(255,255,255,.4); color: var(--ink); }
.call-btn--end    { background: var(--red); }
.call-btn--end:hover { background: var(--red-deep); }
.call-btn--answer { background: var(--green); animation: callRing 1.1s ease-in-out infinite; }
.call-btn--answer:hover { background: var(--green-deep); }
.call-btn[hidden] { display: none; }

@keyframes callRing {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .call-btn--answer { animation: none; }
  .call-btn:hover   { transform: none; }
}

/* سجلّ المكالمة جوّا الشات */
.chat-call {
  align-self: center; display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--t-xs); color: var(--muted);
  background: var(--paper-2); padding: .35rem 1rem; border-radius: var(--r-pill);
}
.chat-call svg { width: 14px; height: 14px; }

/* الردّ التلقائي — بينبيّن إنّو مش من التاجر شخصياً */
.bubble--auto { background: var(--paper-2); border: 1px dashed var(--clay); color: var(--ink-2); }
.bubble__auto {
  display: block; font-size: .7rem; font-weight: 800; letter-spacing: .02em;
  color: var(--muted); margin-bottom: .25rem;
}
