:root {
  --blush: #FCE2E6;
  --pink: #F4A7C5;
  --lavender: #C3A3E2;
  --sky: #98D2EB;
  --mint: #A2EAC6;
  --yellow: #FEE387;
  --purple: #7D65A0;
  --white: #FFFFFF;
  --ink: #4A3B63;
  --muted: #8C7BA6;
  --danger: #E0607E;
  --radius: 22px;
  --shadow: 0 8px 24px rgba(125, 101, 160, .14);
  --shadow-lg: 0 16px 40px rgba(125, 101, 160, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; font-family: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif; color: var(--ink);
  background: var(--blush);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.7) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 64%, rgba(255,255,255,.6) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 85%, rgba(254,227,135,.6) 0 3px, transparent 4px);
  background-size: 220px 220px, 180px 180px, 260px 260px;
  line-height: 1.6; min-height: 100vh; padding-bottom: 84px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- الهيدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px dashed var(--pink);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; transition: height .25s ease; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--purple); transition: font-size .25s; }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: var(--shadow); transition: width .25s, height .25s; }
/* الشريط يصغر عند النزول، وزر السلة يبقى واضحًا */
.site-header.scrolled { box-shadow: 0 6px 18px rgba(125,101,160,.12); }
.site-header.scrolled .container { height: 52px; }
.site-header.scrolled .brand { font-size: 1rem; }
.site-header.scrolled .brand img { width: 38px; height: 38px; }
.top-nav { display: none; gap: 6px; }
.top-nav a { padding: 8px 16px; border-radius: 999px; font-weight: 700; transition: background .2s; }
.top-nav a:hover, .top-nav a.active { background: var(--blush); color: var(--purple); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; background: var(--purple); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-weight: 800; border: 0; box-shadow: var(--shadow);
  transition: transform .15s;
}
.cart-btn:active { transform: scale(.94); }
.badge-count {
  min-width: 22px; height: 22px; border-radius: 999px; background: var(--yellow); color: var(--ink);
  display: inline-grid; place-items: center; font-size: .8rem; padding: 0 6px;
}
.badge-count.bump { animation: bump .45s; }
@keyframes bump { 30% { transform: scale(1.5); } 60% { transform: scale(.9); } }

/* شريط سفلي للهاتف */
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 40; display: flex; background: #fff;
  border-top: 3px dashed var(--pink); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 16px; position: relative; }
.bottom-nav a .ico { font-size: 1.45rem; line-height: 1.2; }
.bottom-nav a.active { background: var(--blush); color: var(--purple); }
.bottom-nav .badge-count { position: absolute; top: -2px; inset-inline-start: 50%; margin-inline-start: 6px; }
.site-header .cart-btn .label { display: none; }
@media (min-width: 721px) {
  body { padding-bottom: 0; }
  .top-nav { display: flex; }
  .bottom-nav { display: none; }
  .site-header .cart-btn .label { display: inline; }
  .site-header .container { height: 72px; }
  .brand img { width: 54px; height: 54px; }
}

/* ---------- عام ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 12px 26px; font-weight: 800; font-size: 1.05rem; background: var(--purple); color: #fff;
  box-shadow: 0 6px 0 #5f4c7d; transition: transform .12s, box-shadow .12s, filter .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #5f4c7d; }
.btn.pink { background: var(--pink); color: var(--ink); box-shadow: 0 6px 0 #d9829f; }
.btn.light { background: #fff; color: var(--purple); box-shadow: 0 6px 0 var(--lavender); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.small { padding: 7px 16px; font-size: .92rem; box-shadow: 0 4px 0 #5f4c7d; }
.btn.danger { background: var(--danger); box-shadow: 0 4px 0 #b64862; }

.section { padding: 34px 0 10px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.section-title h2 { margin: 0; font-size: 1.6rem; color: var(--purple); }
.section-title a { font-weight: 700; color: var(--purple); background: #fff; padding: 4px 14px; border-radius: 999px; font-size: .92rem; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.muted { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .92rem; box-shadow: var(--shadow); }
.notice { background: var(--yellow); border-radius: 16px; padding: 12px 16px; font-weight: 600; }
.notice.info { background: #e5f5fb; }
.notice.ok { background: #dcf7e9; }
.notice.warn { background: #fff1c7; }
.notice.err { background: #ffe0e8; color: #a3304f; }
.empty { text-align: center; padding: 40px 16px; }
.empty .big { font-size: 3.5rem; }

/* ---------- البطل ---------- */
.hero { padding: 26px 0 10px; }
.hero-box {
  position: relative; overflow: hidden; border-radius: 32px; padding: 20px 16px 26px; text-align: center;
  background: linear-gradient(135deg, #fff 0%, #fff6f8 60%, #f3ecfb 100%);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr; align-items: center; gap: 14px;
}
.hero-box .hero-art { order: -1; }
.hero-box h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.25; margin: 0 0 10px; color: var(--purple); }
.hero-box p { font-size: 1.12rem; margin: 0 0 20px; }
/* الشعار ثابت بدون تحريك أو تشويه */
.hero-logo { width: 200px; height: auto; aspect-ratio: 1; object-fit: contain; margin-inline: auto; filter: drop-shadow(0 14px 22px rgba(125,101,160,.25)); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; justify-content: center; }
.blob { position: absolute; border-radius: 50%; opacity: .55; z-index: 0; }
.hero-box > :not(.blob):not(.sparkle):not(.floaters):not(.hero-fufu) { position: relative; z-index: 1; }
.blob.b1 { width: 160px; height: 160px; background: var(--mint); top: -50px; inset-inline-start: -40px; }
.blob.b2 { width: 110px; height: 110px; background: var(--sky); bottom: -30px; inset-inline-end: 38%; }
.blob.b3 { width: 70px; height: 70px; background: var(--yellow); top: 20px; inset-inline-end: 20px; }
.sparkle { position: absolute; color: var(--yellow); font-size: 1.4rem; animation: twinkle 2.4s ease-in-out infinite; z-index: 1; }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.6) rotate(40deg); } }
@media (min-width: 721px) {
  .hero-box { grid-template-columns: 1.1fr .9fr; text-align: start; padding: 28px 22px; border-radius: 36px; gap: 20px; }
  .hero-box .hero-art { order: 0; }
  .hero-logo { width: min(320px, 100%); }
  .hero-chips { justify-content: flex-start; }
}

/* ---------- التصنيفات ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.cat {
  border-radius: var(--radius); padding: 18px 12px; text-align: center; font-weight: 800; font-size: 1.1rem;
  box-shadow: var(--shadow); transition: transform .2s; border: 3px solid #fff;
}
.cat .emoji { font-size: 2.3rem; display: block; transition: transform .3s; }
.cat:hover { transform: translateY(-4px) rotate(-1deg); }
.cat:hover .emoji { transform: scale(1.2) rotate(8deg); }
.cat[style*="--c"] { background: var(--c) !important; }
.cat:nth-child(4n+1) { background: var(--pink); }
.cat:nth-child(4n+2) { background: var(--sky); }
.cat:nth-child(4n+3) { background: var(--mint); }
.cat:nth-child(4n+4) { background: var(--yellow); }

/* ---------- المنتجات ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.p-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative;
  display: flex; flex-direction: column; cursor: pointer; transition: transform .25s, box-shadow .25s;
  border: 3px solid transparent;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--pink); }
.p-card .img { aspect-ratio: 1; background: #fff; position: relative; overflow: hidden; }
.p-card .img img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.p-card:hover .img img { transform: scale(1.07) rotate(-1.5deg); }
.p-card .img::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.7) 50%, transparent 65%);
  transform: translateX(120%); transition: transform .7s;
}
.p-card:hover .img::after { transform: translateX(-120%); }
.p-card .body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.p-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 6px; }
.price { font-weight: 800; color: var(--purple); font-size: 1.15rem; white-space: nowrap; }
.price small { font-size: .75em; font-weight: 700; }
.add-mini {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--mint); font-size: 1.5rem; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 4px 0 #74c9a0; transition: transform .12s;
  flex-shrink: 0;
}
.add-mini:active { transform: translateY(3px) scale(.92); box-shadow: 0 1px 0 #74c9a0; }
.add-mini:disabled { background: #eee; box-shadow: none; }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; padding: 2px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem; }
.tag.new { background: var(--yellow); }
.tag.out { background: #eee; color: #777; }
.tag.feat { background: var(--lavender); color: #fff; inset-inline-start: auto; inset-inline-end: 10px; }
.p-card.soldout .img img { filter: grayscale(.6); opacity: .7; }

/* ---------- الحركة ----------
   تُخفى العناصر فقط عند تفعيل JS (html.motion)، ومدة الظهور قصيرة حتى لا يتأخر السعر وزر الشراء */
.motion .reveal { opacity: 0; transform: translateY(16px); transition: opacity .42s ease-out, transform .5s cubic-bezier(.2,.9,.3,1.15); }
.motion .reveal.from-r { transform: translateX(36px); }
.motion .reveal.from-l { transform: translateX(-36px); }
.motion .reveal-title { opacity: 0; transform: translateY(12px); transition: opacity .45s ease-out, transform .45s ease-out; }
.motion .reveal.in, .motion .reveal-title.in { opacity: 1; transform: none; }
.section-title h2::after { content: ''; display: block; height: 5px; width: 0; border-radius: 9px; background: linear-gradient(90deg, var(--pink), var(--lavender)); transition: width .6s .15s ease-out; }
.section-title.in h2::after, .section-title:not(.reveal-title) h2::after { width: 56px; }

/* استجابة السكوشي للمس */
.p-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.p-card.squish, .squish { animation: squish .55s cubic-bezier(.3,.7,.4,1.3); }
@keyframes squish {
  0% { transform: scale(1); } 25% { transform: scale(1.06, .9); } 50% { transform: scale(.96, 1.05); }
  75% { transform: scale(1.02, .98); } 100% { transform: scale(1); }
}

/* انتقال المنتج نحو السلة + لمعة */
.fly { position: fixed; z-index: 90; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; pointer-events: none;
  background: #fff; border: 3px solid var(--pink); box-shadow: var(--shadow-lg); top: 0; left: 0; will-change: transform, opacity; }
.fly img { width: 100%; height: 100%; object-fit: contain; }
.shine { position: relative; overflow: hidden; }
.shine::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.85) 50%, transparent 70%); animation: shine .6s ease-out; }
@keyframes shine { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.cart-btn, .bottom-nav a[href="/cart"] { overflow: visible; }

/* خلفية زخرفية باستيل بحركة Parallax */
.deco-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.deco { position: absolute; will-change: transform; opacity: .55; }
.deco.circle { border-radius: 50%; }
.deco.pill { border-radius: 999px; }
.deco.star { color: var(--yellow); font-size: 26px; opacity: .9; }
.deco.ring { border-radius: 50%; border: 6px solid var(--lavender); opacity: .35; }

/* قسم ألعاب الترند: البطاقات تتقدم أفقيًا مع التمرير بدون تثبيت الشاشة */
.trend { overflow: hidden; padding-bottom: 20px; }
.trend-rail { overflow: visible; }
.trend-track { display: flex; gap: 12px; will-change: transform; padding: 6px 16px; }
.trend-track .p-card { flex: 0 0 min(44vw, 220px); }
.trend-hint { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion .reveal, .motion .reveal-title { opacity: 1; transform: none; }
  .deco-layer { display: none; }
  .trend-rail { overflow-x: auto; }
  .trend-track { transform: none !important; }
}

/* فلترة */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex-shrink: 0; border: 3px solid #fff; background: #fff; border-radius: 999px; padding: 6px 18px; font-weight: 800;
  box-shadow: var(--shadow); transition: background .2s;
}
.filters button.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.search {
  width: 100%; border: 3px solid #fff; border-radius: 999px; padding: 12px 20px; font-size: 1rem; box-shadow: var(--shadow);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%237D65A0' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cpath d='m20 20-5-5'/%3E%3C/svg%3E") no-repeat left 16px center;
  margin-bottom: 12px;
}
.search:focus { outline: none; border-color: var(--lavender); }

/* ---------- نافذة المنتج ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-end; justify-content: center; background: rgba(74,59,99,.45); }
.modal.open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: #fff; width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; border-radius: 30px 30px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .3s cubic-bezier(.2,.9,.3,1.2); position: relative;
}
@keyframes up { from { transform: translateY(60%); } }
.sheet.from-card { animation: fade .25s ease-out; }
.gallery .main { will-change: transform; }
@media (min-width: 721px) { .modal { align-items: center; } .sheet { border-radius: 30px; } }
.sheet .close { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blush); font-size: 1.3rem; z-index: 3; }
.pd { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 721px) { .pd { grid-template-columns: 1fr 1fr; gap: 20px; } }
.gallery .main { aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #fff; border: 3px solid var(--blush); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; border: 3px solid transparent; cursor: pointer; }
.thumbs img.active { border-color: var(--pink); }
.pd h2 { margin: 6px 0; color: var(--purple); line-height: 1.35; }
.pd .price { font-size: 1.6rem; }
.stock { font-weight: 700; }
.stock.ok { color: #2f9a6a; } .stock.low { color: #c98a00; } .stock.out { color: var(--danger); }
.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--blush); border-radius: 999px; padding: 4px; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; font-size: 1.3rem; font-weight: 800; color: var(--purple); }
.qty button:active { transform: scale(.9); }
.qty span { min-width: 34px; text-align: center; font-weight: 800; font-size: 1.1rem; }

/* ---------- السلة والدفع ---------- */
.layout-2 { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 821px) { .layout-2 { grid-template-columns: 1.4fr 1fr; } }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 2px dashed var(--blush); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 76px; height: 76px; object-fit: contain; border-radius: 16px; background: #fff; border: 2px solid var(--blush); }
.cart-item h4 { margin: 0 0 4px; font-size: 1rem; }
.cart-item .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.link-btn { background: none; border: 0; color: var(--danger); font-weight: 700; padding: 2px 4px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { font-size: 1.3rem; font-weight: 800; color: var(--purple); border-top: 3px dashed var(--pink); margin-top: 6px; padding-top: 12px; }
.free-bar { height: 12px; border-radius: 999px; background: var(--blush); overflow: hidden; margin: 6px 0 4px; }
.free-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--sky)); border-radius: 999px; transition: width .4s; }
.sticky-cta { position: sticky; top: 84px; }

.form-grid { display: grid; gap: 14px; }
.field label { display: block; font-weight: 800; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; border: 3px solid var(--blush); border-radius: 16px; padding: 11px 14px; font-size: 1rem; background: #fff;
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lavender); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field input[dir="ltr"] { text-align: right; }
.steps { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.steps span { background: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .9rem; }
.steps span.on { background: var(--purple); color: #fff; }

.status-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: .9rem; }
.st-pending_payment { background: #fff1c7; color: #8a6400; }
.st-confirmed { background: #dcf7e9; color: #217a51; }
.st-preparing { background: #e5f5fb; color: #1f6f8f; }
.st-shipped { background: #efe6fb; color: var(--purple); }
.st-delivered { background: var(--mint); color: #1d5e40; }
.st-cancelled { background: #eee; color: #777; }
.pay-unpaid { background: #ffe0e8; color: #a3304f; }
.pay-paid { background: #dcf7e9; color: #217a51; }
.pay-refunded { background: #eee; color: #666; }

.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 80; opacity: 0;
  background: var(--purple); color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-lg);
  transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 721px) { .toast { bottom: 30px; } }

.site-footer { text-align: center; padding: 30px 16px; color: var(--muted); font-weight: 600; }
.site-footer img { width: 70px; height: auto; margin: 0 auto 8px; }
.skeleton { background: rgba(255,255,255,.7); border-radius: var(--radius); min-height: 240px; position: relative; overflow: hidden; }
.skeleton::before, .skeleton::after { content: ''; position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--lavender) 60%); opacity: .5; animation: bubbleUp 2.2s ease-in infinite; }
.skeleton::before { width: 34px; height: 34px; left: 30%; bottom: -40px; }
.skeleton::after { width: 22px; height: 22px; left: 62%; bottom: -30px; animation-delay: .9s; background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--pink) 60%); }
@keyframes bubbleUp { to { transform: translateY(-300px) scale(1.2); opacity: 0; } }
@keyframes sk { to { background-position: -200% 0; } }

/* =====================================================================
   الهوية المستوحاة من الشعار: جيلي لامع + قطرات سائلة
   ===================================================================== */
:root { --drip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 48'%3E%3Crect width='400' height='12'/%3E%3Crect x='30' width='14' height='34' rx='7'/%3E%3Crect x='95' width='10' height='22' rx='5'/%3E%3Crect x='150' width='18' height='44' rx='9'/%3E%3Crect x='232' width='12' height='26' rx='6'/%3E%3Crect x='292' width='16' height='38' rx='8'/%3E%3Crect x='356' width='11' height='20' rx='5.5'/%3E%3C/svg%3E"); }
.drip { height: 44px; background: var(--c, var(--pink)); -webkit-mask: var(--drip) repeat-x 0 0 / 400px 48px; mask: var(--drip) repeat-x 0 0 / 400px 48px; opacity: .9; }
.drip.flip { transform: scaleX(-1); }
.site-header { border-bottom: 0; }
.site-header::after { content: ''; position: absolute; inset-inline: 0; top: 100%; height: 22px; background: rgba(255,255,255,.85);
  -webkit-mask: var(--drip) repeat-x 0 0 / 260px 22px; mask: var(--drip) repeat-x 0 0 / 260px 22px; pointer-events: none; }

/* أزرار جيلي لامعة مثل حروف الشعار */
.jelly { position: relative; overflow: hidden; isolation: isolate; }
.jelly::before { content: ''; position: absolute; top: 7%; inset-inline-start: 10%; width: 22%; height: 16%; border-radius: 999px;
  background: rgba(255,255,255,.45); transform: rotate(-12deg); pointer-events: none; z-index: -1; }
.jelly::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.35); }
.btn.jelly { border: 3px solid rgba(255,255,255,.25); }
.add-mini.jelly::before { top: 16%; inset-inline-start: 22%; width: 28%; height: 22%; }
.cart-btn.jelly { overflow: visible; }
.cart-btn.jelly::before { inset-inline-start: 10%; width: 22%; }

/* الهيدر */
.head-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blush); color: var(--purple); display: grid; place-items: center; transition: transform .15s; }
.icon-btn:active { transform: scale(.9); }
.cart-btn svg { width: 20px; height: 20px; }
.bottom-nav a .ico { display: grid; place-items: center; height: 28px; }
.bottom-nav a .ico svg { width: 24px; height: 24px; }

/* بطاقات بلون التصنيف */
.p-card { --cat: var(--pink); }
.p-card:hover { border-color: var(--cat); }
.p-card .img { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--cat) 22%, #fff) 0, #fff 70%); }
.p-card .body { border-top: 3px dotted color-mix(in srgb, var(--cat) 55%, #fff); }
.cat-chip { background: color-mix(in srgb, var(--cat) 35%, #fff); }
.cat { color: var(--ink); position: relative; overflow: hidden; }
.cat .emoji { font-size: 2rem; }
.cat::after { content: ''; position: absolute; top: 10px; inset-inline-start: 14px; width: 34%; height: 18%; border-radius: 999px; background: rgba(255,255,255,.5); transform: rotate(-10deg); }
.filters button.active { background: var(--fc, var(--purple)); border-color: var(--fc, var(--purple)); color: var(--ink); }
.filters button[data-cat=""].active { background: var(--purple); color: #fff; }
.free-txt { color: #2f9a6a; }

/* ضغط السكوشي */
.squishable { touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.squishable img { transform-origin: 50% 85%; will-change: transform; }
.squish-hint { text-align: center; font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* شريط معلومات متحرك */
.marquee { overflow: hidden; background: var(--purple); color: #fff; font-weight: 700; padding: 8px 0; margin: 22px -6px 0; transform: rotate(-1.2deg); box-shadow: var(--shadow); }
.marquee .track { display: flex; width: max-content; animation: marquee 24s linear infinite; }
.marquee span { padding-inline: 18px; white-space: nowrap; }
.marquee span::after { content: '✦'; margin-inline-start: 36px; color: var(--yellow); }
@keyframes marquee { to { transform: translateX(50%); } }

/* العنوان كلمة كلمة */
.motion .words .w { display: inline-block; opacity: 0; transform: translateY(.5em) scale(.9); filter: blur(4px);
  animation: wordIn .55s cubic-bezier(.2,.9,.3,1.2) forwards; animation-delay: calc(var(--i) * 90ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; filter: none; } }

/* الواجهة الحية: منتجات تطفو وتتفاعل مع الإصبع أو ميلان الهاتف */
.hero-box { --px: 0; --py: 0; }
.floaters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.floater { position: absolute; width: var(--s, 70px); aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 5px;
  box-shadow: 0 10px 24px rgba(125,101,160,.25), inset 0 -4px 0 rgba(0,0,0,.05); border: 3px solid var(--c, var(--pink)); pointer-events: auto; cursor: pointer;
  translate: calc(var(--px) * var(--d, 12px)) calc(var(--py) * var(--d, 12px)); }
.floater .bob { width: 100%; height: 100%; animation: bob var(--t, 5s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.floater img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.floater::before { content: ''; position: absolute; top: 12%; inset-inline-start: 18%; width: 26%; height: 16%; border-radius: 999px; background: rgba(255,255,255,.8); transform: rotate(-20deg); z-index: 1; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(4deg); } }
.hero-fufu { position: absolute; z-index: 2; width: 84px; bottom: 8px; inset-inline-end: 6px; translate: calc(var(--px) * -8px) calc(var(--py) * -6px); pointer-events: none; }
.hero-fufu img { width: 100%; height: auto; animation: fufuHi 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes fufuHi { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-6deg) scale(1.03, .97); } 40% { transform: rotate(4deg); } 60% { transform: rotate(0) scale(.98, 1.02); } }
@media (min-width: 721px) { .hero-fufu { width: 120px; bottom: 18px; inset-inline-end: auto; inset-inline-start: 50%; } .floater { --s: 92px; } }

/* نافذة المنتج: زر الشراء ثابت أسفل الشاشة */
.sheet { padding-bottom: 0; }
.buy-bar { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 10px; align-items: center; margin: 14px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 2px dashed var(--blush); }
.buy-bar .grow { flex: 1; }
.buy-bar .btn { padding: 12px 16px; }

/* السلة الجانبية */
.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(74,59,99,.45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer-wrap.open { opacity: 1; visibility: visible; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 92vw); background: #fff; display: flex; flex-direction: column;
  border-radius: 0 28px 28px 0; box-shadow: var(--shadow-lg);
  transform: translateX(-105%); transition: transform .38s cubic-bezier(.2,.9,.3,1.05); }
.drawer-wrap.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.drawer-head h2 { margin: 0; color: var(--purple); }
.drawer .close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blush); font-size: 1.2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 18px; overscroll-behavior: contain; }
.drawer-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 3px dashed var(--pink); }
.drawer .empty { margin: auto 0; }
.drawer .cart-item { grid-template-columns: 64px 1fr auto; }
.drawer .cart-item img { width: 64px; height: 64px; }
.qty.small button { width: 32px; height: 32px; font-size: 1.1rem; }
.qty.small span { min-width: 26px; font-size: 1rem; }
.bubbles-load { display: flex; gap: 8px; justify-content: center; padding: 60px 0; }
.bubbles-load i { width: 14px; height: 14px; border-radius: 50%; background: var(--lavender); animation: dot 1s ease-in-out infinite; }
.bubbles-load i:nth-child(2) { background: var(--pink); animation-delay: .15s; }
.bubbles-load i:nth-child(3) { background: var(--sky); animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-12px) scale(1.15); } }
.empty-fufu { width: 110px; height: auto; margin: 0 auto 6px; animation: fufuHi 3.2s ease-in-out infinite; }

/* الشخصية «فوفو» تظهر عند التفاعل */
.buddy { position: fixed; z-index: 85; bottom: calc(86px + env(safe-area-inset-bottom)); left: 12px; display: flex; align-items: flex-end; gap: 4px; direction: ltr;
  pointer-events: none; opacity: 0; transform: translateY(40px) scale(.6); transform-origin: bottom left; transition: opacity .25s, transform .35s cubic-bezier(.2,1.4,.4,1); }
.buddy.show { opacity: 1; transform: none; }
.buddy img { width: 84px; height: auto; filter: drop-shadow(0 8px 14px rgba(125,101,160,.3)); }
.buddy.show.pose-happy img { animation: hop .6s cubic-bezier(.3,.7,.4,1.4) 2; }
.buddy .bubble { direction: rtl; background: #fff; border-radius: 18px 18px 18px 4px; padding: 6px 12px; font-weight: 800; color: var(--purple); box-shadow: var(--shadow); margin-bottom: 56px; font-size: .9rem; white-space: nowrap; }
@keyframes hop { 40% { transform: translateY(-16px) scale(.95, 1.06); } 70% { transform: translateY(0) scale(1.08, .92); } }
@media (min-width: 721px) { .buddy { bottom: 24px; } }
.dance { animation: dance 1s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes dance { 0%, 100% { transform: rotate(-8deg) translateY(0); } 25% { transform: rotate(0) translateY(-10px) scale(1.04, .96); } 50% { transform: rotate(8deg) translateY(0); } 75% { transform: rotate(0) translateY(-6px); } }
.order-fufu { width: 130px; height: auto; margin: 0 auto; }

/* انتقالات ناعمة بين الصفحات (View Transitions، بدون مكتبة) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.bottom-nav { view-transition-name: bottom-nav; }
::view-transition-old(root) { animation: vtOut .2s ease-in both; }
::view-transition-new(root) { animation: vtIn .3s cubic-bezier(.2,.9,.3,1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  .motion .words .w { opacity: 1; transform: none; filter: none; }
  .floater { translate: none; }
  .hero-fufu { translate: none; }
}

/* الهاتف: مساحة للشخصية أسفل الواجهة */
.hero-box { padding-bottom: 30px; }
@media (min-width: 721px) { .hero-box { padding-bottom: 28px; } .floaters .floater:nth-child(1) { top: 8% !important; inset-inline-start: 44% !important; } .floaters .floater:nth-child(3) { top: 66% !important; inset-inline-start: 40% !important; } }

/* =====================================================================
   فوفو SVG: التعابير والحركات
   ===================================================================== */
.fufu { display: inline-block; position: relative; line-height: 0; }
.fufu svg { width: 100%; height: auto; overflow: visible; }
.fufu .fu-inner, .fufu svg { transform-origin: 50% 92%; }
.fu-eyes-open { transition: transform .18s ease-out; }
.fu-eye { transform-box: fill-box; transform-origin: center; transition: transform .08s; }
.fufu.blink .fu-eye { transform: scaleY(.12); }
.fu-eyes-happy, .fu-eyes-wink, .fu-eyes-sleep, .fu-m-open, .fu-m-o, .fu-m-sad, .fu-tear, .fu-arm { display: none; }
.mood-happy .fu-eyes-open, .mood-wave .fu-eyes-open, .mood-wink .fu-eyes-open, .mood-sleep .fu-eyes-open { display: none; }
.mood-happy .fu-eyes-happy { display: inline; }
.mood-wave .fu-eyes-wink, .mood-wink .fu-eyes-wink { display: inline; }
.mood-sleep .fu-eyes-sleep { display: inline; }
.mood-happy .fu-m-smile, .mood-sleep .fu-m-smile, .mood-surprised .fu-m-smile, .mood-sad .fu-m-smile { display: none; }
.mood-happy .fu-m-open { display: inline; }
.mood-sleep .fu-m-o, .mood-surprised .fu-m-o { display: inline; }
.mood-sad .fu-m-sad, .mood-sad .fu-tear { display: inline; }
.mood-happy .fu-arm, .mood-wave .fu-arm { display: inline; }
.fu-arm { transform-box: fill-box; }
.fu-arm-l { transform-origin: 90% 50%; } .fu-arm-r { transform-origin: 10% 50%; }
.mood-wave .fu-arm-r { animation: fuWave .5s ease-in-out infinite alternate; }
.mood-happy .fu-arm-l { animation: fuWave .35s ease-in-out infinite alternate-reverse; }
.mood-happy .fu-arm-r { animation: fuWave .35s ease-in-out infinite alternate; }
@keyframes fuWave { from { transform: rotate(-18deg); } to { transform: rotate(22deg); } }
.mood-sleep svg { animation: fuBreath 2s ease-in-out infinite; }
@keyframes fuBreath { 50% { transform: scale(1.04, .96); } }
.mood-sad .fu-tear { animation: fuTear 1.2s ease-in infinite; }
@keyframes fuTear { from { transform: translateY(0); opacity: 1; } to { transform: translateY(18px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fufu * { animation: none !important; } }

/* =====================================================================
   رحلة فوفو
   ===================================================================== */
.companion { position: fixed; inset: 0; z-index: 39; pointer-events: none; }
.comp-pos { position: absolute; left: 0; top: 0; width: var(--s, 56px); will-change: transform; }
.comp-fufu { width: 100%; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .45s cubic-bezier(.3,1.6,.5,1), opacity .25s, margin .35s cubic-bezier(.3,1.4,.5,1); }
.fu-inner { transform-origin: 50% 90%; }
.companion .fufu { filter: drop-shadow(0 6px 10px rgba(125,101,160,.28)); }
.companion.unborn .comp-fufu, .companion.away .comp-fufu { transform: scale(.2); opacity: 0; pointer-events: none; }
.companion.away-soft .comp-fufu { opacity: 0; transition: opacity .15s; }
.comp-bubble { position: absolute; top: -6px; left: calc(100% + 4px); direction: rtl; white-space: nowrap; background: #fff; color: var(--purple);
  font-weight: 800; font-size: .88rem; padding: 5px 12px; border-radius: 16px 16px 16px 4px; box-shadow: var(--shadow);
  opacity: 0; transform: scale(.4) translateX(-10px); transform-origin: left bottom; transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.comp-bubble.show { opacity: 1; transform: none; }
@media (max-width: 720px) {
  /* في الهاتف فوفو يطل من طرف الشاشة حتى لا يغطي المنتجات، ويخرج كاملًا عند الكلام */
  .comp-fufu { margin-left: calc(var(--s) * -.42); }
  .companion.peek .comp-fufu { margin-left: 4px; }
  .companion .comp-bubble { left: calc(58% + 6px); }
  .companion.peek .comp-bubble { left: calc(100% + 10px); }
}
.companion.static { inset: auto; left: 8px; bottom: calc(90px + env(safe-area-inset-bottom)); }
.companion.static .comp-pos { position: relative; width: 56px; }

.jelly-thread { position: fixed; left: 0; top: 0; z-index: 38; pointer-events: none; overflow: visible; transition: opacity .4s; }
.jelly-thread path { fill: none; stroke-linecap: round; }
.jelly-thread .t-bg { stroke: rgba(195,163,226,.45); stroke-width: 3; stroke-dasharray: 1 11; }
.jelly-thread .t-fg { stroke: #A2EAC6; stroke-width: 5; filter: drop-shadow(0 2px 0 #7D65A0); }
.jelly-thread.unborn, .jelly-thread.away { opacity: 0; }
@media (max-width: 720px) { .jelly-thread .t-fg { stroke-width: 4; } }


.jelly-progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; z-index: 50; pointer-events: none; }
.jelly-progress i { display: block; height: 100%; background: linear-gradient(270deg, var(--pink), var(--lavender), var(--sky), var(--mint));
  transform: scaleX(var(--p, 0)); transform-origin: 100% 50%; border-radius: 0 0 0 6px; }

.spark { position: fixed; z-index: 95; pointer-events: none; font-size: 15px; font-weight: 800; text-shadow: 0 1px 0 rgba(125,101,160,.4); }

.jumper { position: absolute; left: 0; top: 0; width: var(--s, 56px); z-index: 39; pointer-events: none; }
.jumper .comp-fufu { pointer-events: none; }

.foot-fufu-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 10px; }
.foot-fufu { width: 96px; }

.wobble { animation: wobble .6s ease-out; transform-origin: 50% 100%; }
@keyframes wobble { 20% { transform: skewX(-9deg) scale(1.05, .95); } 45% { transform: skewX(6deg) scale(.98, 1.03); } 70% { transform: skewX(-3deg); } }

/* ملعب السكوشي */
.playground { position: relative; height: 360px; border-radius: 28px; overflow: hidden; background:
  radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px) 0 0 / 40px 40px, linear-gradient(180deg, #fff 0%, #f6efff 100%);
  box-shadow: var(--shadow), inset 0 -10px 0 color-mix(in srgb, var(--lavender) 35%, #fff); border: 3px solid #fff; user-select: none; -webkit-user-select: none; }
@media (min-width: 721px) { .playground { height: 440px; } }
.play-hint { position: absolute; top: 12px; left: 0; right: 0; text-align: center; margin: 0; color: var(--muted); font-weight: 700; font-size: .9rem; pointer-events: none; }
.play-actions { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; pointer-events: none; }
.play-actions .btn { pointer-events: auto; }
.ball { position: absolute; left: 0; top: 0; border-radius: 50%; touch-action: none; cursor: grab; will-change: transform; z-index: 2; }
.ball:active { cursor: grabbing; }
.ball .skin { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fff; border: 3px solid var(--c, var(--pink));
  box-shadow: 0 6px 12px rgba(125,101,160,.22), inset 0 -5px 0 rgba(0,0,0,.05); position: relative; }
.ball .skin img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.ball .skin::after { content: ''; position: absolute; top: 12%; left: 20%; width: 30%; height: 18%; border-radius: 999px; background: rgba(255,255,255,.75); transform: rotate(-25deg); }
.ball.blob .skin { background: radial-gradient(circle at 35% 30%, #fff 0 10%, var(--c) 55%); display: grid; place-items: center; color: var(--purple); font-weight: 800; }
.play-loading { position: absolute; inset: 0; display: grid; place-items: center; }

/* فوفو الصغير داخل السلة الجانبية */
.drawer-head { position: relative; }
.dh-title { display: flex; align-items: center; gap: 8px; }
.drawer-fufu { width: 46px; }
.dh-bubble { position: absolute; top: 12px; inset-inline-start: 150px; background: var(--blush); color: var(--purple); font-weight: 800; font-size: .88rem; padding: 4px 12px; border-radius: 14px 14px 14px 4px;
  opacity: 0; transform: scale(.4); transform-origin: right bottom; transition: opacity .2s, transform .3s cubic-bezier(.3,1.6,.5,1); pointer-events: none; white-space: nowrap; }
.dh-bubble.show { opacity: 1; transform: none; }
