*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg-solid);
  font: 16px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden; transition: color .3s;
}
body::before { content: ''; position: fixed; inset: 0; background: var(--bg); z-index: -2; transition: opacity .4s; }
[dir="rtl"] body, body[dir="rtl"] { font-family: Cairo, Inter, sans-serif; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { max-width: 1200px; margin: 0 auto; padding: 8px 14px 60px; outline: none; }

/* ---------- decor: clouds + confetti ---------- */
#decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute; width: 340px; height: 120px; border-radius: 120px; opacity: var(--cloud-opacity);
  background: var(--cloud); filter: blur(2px); transition: opacity .5s;
  box-shadow: 0 0 40px rgba(255, 255, 255, .5) inset;
  animation: drift 90s linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 170px; height: 150px; left: 50px; top: -80px; }
.cloud::after { width: 130px; height: 120px; left: 170px; top: -55px; }
.c1 { top: 18vh; left: -380px; transform: scale(.9); animation-duration: 95s; }
.c2 { top: 48vh; left: -380px; transform: scale(1.2); animation-duration: 120s; animation-delay: -40s; }
.c3 { top: 78vh; left: -380px; transform: scale(.7); animation-duration: 80s; animation-delay: -20s; }
.c4 { top: 6vh; left: -380px; transform: scale(.55); animation-duration: 70s; animation-delay: -55s; }
.c5 { top: 64vh; left: -380px; transform: scale(1); animation-duration: 105s; animation-delay: -80s; }
@keyframes drift { to { translate: calc(100vw + 760px) 0; } }
#confetti i {
  position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; opacity: .85;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0); }
  100% { transform: translate3d(40px, 105vh, 0) rotate(540deg); }
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 8px; z-index: 30; max-width: 1200px; margin: 8px auto 0; padding: 6px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: calc(100% - 20px); border-radius: 999px; background: var(--surface);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.topbar-home { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--primary); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.lang { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; border: 1px solid var(--border); }
.lang button { border: 0; background: none; padding: 6px 10px; min-width: 38px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; min-height: 40px;
  background: var(--primary); color: var(--primary-ink); text-decoration: none; font-weight: 700; font-size: 14px; border: 0;
  transition: transform .2s, box-shadow .2s;
}
.pill-btn:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 45%, transparent); }
.vendor-mode .topbar { display: none; }

/* ---------- home header: banners | ALFA | banners ---------- */
.hero-head { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 10px; align-items: center; margin-top: 14px; }
.brand { text-align: center; position: relative; padding: 6px 0; }
.brand .crown { width: 46px; margin: 0 auto -4px; filter: drop-shadow(0 3px 6px rgba(214, 51, 132, .35)); animation: bob 4s ease-in-out infinite; }
.logo {
  margin: 0; font-family: 'Cinzel Decorative', serif; font-weight: 900; letter-spacing: .04em; line-height: 1;
  font-size: clamp(40px, 12vw, 104px);
  background: linear-gradient(100deg, #ff3f8e 0%, #ff9ac6 30%, #2aa7ef 55%, #ff3f8e 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(255, 255, 255, .9)) drop-shadow(0 8px 18px rgba(214, 51, 132, .35));
}
.script { margin: 2px 0 0; font-family: 'Great Vibes', cursive; font-size: clamp(16px, 4.6vw, 30px); color: #c2185b; }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.carousel {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  border: 3px solid #fff; background: #fff;
}
.carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; text-decoration: none; }
.carousel .slide.on { opacity: 1; }
.carousel img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 5s ease-out; }
.carousel .slide.on img { transform: scale(1); }
.carousel .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 8px; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(80, 10, 50, .78));
}
.carousel .cap b { display: block; font-family: var(--font-head); font-size: clamp(12px, 3.4vw, 20px); line-height: 1.1; }
.carousel .cap small { font-size: clamp(10px, 2.6vw, 13px); opacity: .95; }
.carousel .dots { position: absolute; top: 6px; left: 0; right: 0; display: flex; gap: 4px; justify-content: center; }
.carousel .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.carousel .dots i.on { background: #fff; width: 14px; border-radius: 4px; }

/* ---------- quick links ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 8px; }
.quick a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; text-decoration: none;
  background: var(--surface); border: 2px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  font-weight: 800; font-size: clamp(12px, 3.3vw, 16px); text-align: center; line-height: 1.15; color: var(--text);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), border-color .2s;
}
.quick a:hover { transform: translateY(-4px); border-color: var(--primary); }
.quick svg { width: clamp(42px, 13vw, 64px); height: auto; }

/* ---------- stories ---------- */
.stories { margin: 22px auto 10px; display: flex; flex-direction: column; align-items: center; }
.story-frame {
  position: relative; width: min(320px, 74vw); aspect-ratio: 9 / 14; border-radius: 26px; overflow: hidden;
  border: 4px solid #fff; outline: 4px solid var(--accent); box-shadow: 0 18px 40px rgba(42, 167, 239, .35);
  background: #222; user-select: none;
}
.story { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.story.on { opacity: 1; }
.story img, .story video { width: 100%; height: 100%; object-fit: cover; }
.story.on img { animation: kenburns 6s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.15) translateY(2%); } to { transform: scale(1) translateY(0); } }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.story-bars span { flex: 1; height: 3px; background: rgba(255, 255, 255, .45); border-radius: 3px; overflow: hidden; }
.story-bars span i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars span.done i { width: 100%; }
.story-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 50px 14px 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.story-cap p { margin: 0 0 8px; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.story-cap .shop { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #fff; color: #c2185b; font-weight: 800; font-size: 13px; text-decoration: none; }
.story-nav { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; z-index: 2; }
.story-nav button { background: none; border: 0; }
.story-label {
  margin-top: -18px; z-index: 4; position: relative; padding: 6px 26px; border-radius: 999px; color: #fff;
  font-family: 'Cinzel Decorative', serif; font-weight: 900; font-size: 22px; letter-spacing: .06em;
  background: linear-gradient(90deg, #2aa7ef, #ff3f8e); box-shadow: 0 8px 20px rgba(255, 63, 142, .4);
}
.story-bubbles { display: flex; gap: 12px; margin-top: 14px; overflow-x: auto; padding: 4px; max-width: 100%; scrollbar-width: none; }
.story-bubbles button {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; padding: 2px; border: 0;
  background: conic-gradient(#ff3f8e, #2aa7ef, #ff3f8e);
}
.story-bubbles button img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff; }
.story-bubbles button[aria-current="true"] { transform: scale(1.12); }

/* ---------- section titles ---------- */
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.sec-title h2 { margin: 0; font-family: var(--font-head); font-size: clamp(22px, 5.6vw, 32px); line-height: 1.15; }
.sec-title a { font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }

/* ---------- marketplace grid: Main Store in the middle ---------- */
.market { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; grid-auto-flow: dense; }
.main-block { grid-column: 2 / 4; grid-row: 1 / 3; }
@media (min-width: 900px) {
  .market { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .main-block { grid-column: 3 / 5; grid-row: 1 / 3; }
}
.tile-wrap { animation: floaty 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.vtile {
  position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; text-decoration: none; color: #fff;
  border: var(--tile-border); box-shadow: var(--shadow); background: #fff; transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s;
}
.vtile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.vtile:hover img { transform: scale(1.08); }
.vtile .lbl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 6px 6px; text-align: center;
  background: linear-gradient(transparent, rgba(60, 10, 50, .82));
}
.vtile .lbl b { display: block; font-size: clamp(11px, 3vw, 15px); line-height: 1.15; }
.vtile .lbl small { display: block; font-size: clamp(9px, 2.3vw, 12px); opacity: .9; line-height: 1.2; }
.vtile .swatch { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); }

.main-store {
  position: relative; display: block; height: 100%; min-height: 100%; border-radius: 22px; overflow: hidden; text-decoration: none;
  border: 5px solid #ff3f8e; box-shadow: 0 0 0 4px #fff, 0 18px 40px rgba(255, 63, 142, .45); color: #fff; background: #ffe3f0;
}
.main-store .show { position: absolute; inset: 0; }
.main-store .show img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s, transform 4s ease-out; transform: scale(1.1); }
.main-store .show img.on { opacity: 1; transform: scale(1); }
.main-store .badge {
  position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 2; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; background: #ff3f8e; color: #fff; font-weight: 800; font-size: clamp(12px, 3.4vw, 17px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2); border: 2px solid #fff;
}
.main-store .badge svg { width: 22px; height: 22px; }
.main-store .enter {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; text-align: center; padding: 10px; border-radius: 14px;
  background: rgba(255, 255, 255, .92); color: #c2185b; font-weight: 800; font-size: clamp(12px, 3.3vw, 16px);
}
.main-store .sparkle { position: absolute; z-index: 1; width: 18px; height: 18px; color: #fff; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
.etc-tile { display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 16px; background: linear-gradient(135deg, #23c3e6, #2aa7ef); color: #fff; font-weight: 900; font-size: clamp(16px, 5vw, 28px); text-decoration: none; text-align: center; padding: 6px; border: 3px solid #fff; box-shadow: var(--shadow); }

/* ---------- moving products ---------- */
.marquee { overflow: hidden; margin: 0 -14px; padding: 8px 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: scrollx var(--dur, 45s) linear infinite; }
.marquee.rev .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollx { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-name: scrollx-rtl; }
@keyframes scrollx-rtl { to { transform: translateX(50%); } }
.pcard {
  position: relative; display: block; width: 160px; flex: 0 0 auto; text-decoration: none; color: var(--text);
  background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s;
}
.pcard:hover { transform: translateY(-6px) rotate(-1deg); }
.pcard .ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .ph img { transform: scale(1.07); }
.pcard .meta { padding: 8px 10px 10px; }
.pcard .meta b { display: block; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .meta small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-weight: 800; color: var(--primary); }
.price s { color: var(--muted); font-weight: 500; font-size: .85em; margin-inline-start: 6px; }
.tag {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: var(--primary); color: var(--primary-ink);
}
[dir="rtl"] .tag { left: auto; right: 8px; }

/* floating hero products */
.floaters { position: relative; height: 0; }
.floater {
  position: absolute; width: 74px; aspect-ratio: 1; border-radius: 18px; overflow: hidden; border: 3px solid #fff;
  box-shadow: 0 10px 24px rgba(214, 51, 132, .3); animation: orbit 9s ease-in-out infinite; z-index: 1; pointer-events: none;
}
.floater img { width: 100%; height: 100%; object-fit: cover; }
@keyframes orbit {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  33% { transform: translate(10px, -14px) rotate(4deg); }
  66% { transform: translate(-8px, -6px) rotate(-2deg); }
}

/* ---------- join CTA ---------- */
.join {
  margin: 34px 0 10px; padding: 22px; border-radius: 28px; background: var(--surface); border: 2px dashed var(--primary-2);
  box-shadow: var(--shadow); display: grid; gap: 16px; align-items: center;
}
@media (min-width: 800px) { .join { grid-template-columns: 1.1fr 1fr; padding: 32px; } }
.join h2 { margin: 0 0 6px; font-family: var(--font-head); font-size: clamp(24px, 6vw, 36px); line-height: 1.1; }
.join p { margin: 0 0 14px; color: var(--muted); }
.theme-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ---------- theme cards ---------- */
.theme-card {
  position: relative; border-radius: 16px; overflow: hidden; border: 2px solid transparent; background: var(--bg-solid);
  text-align: start; padding: 0; color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .1); transition: transform .2s;
}
.theme-card::before { content: ''; position: absolute; inset: 0; background: var(--bg); }
.theme-card > * { position: relative; }
.theme-card .tc-top { height: 42px; display: flex; gap: 4px; align-items: center; padding: 8px; }
.theme-card .tc-top i { width: 22px; height: 22px; border-radius: 6px; background: var(--primary); }
.theme-card .tc-top i:nth-child(2) { background: var(--accent); }
.theme-card .tc-top i:nth-child(3) { background: var(--surface); border: 1px solid var(--border); }
.theme-card .tc-name { display: block; padding: 4px 8px 8px; font-family: var(--font-head); font-weight: 700; font-size: 13px; }
.theme-card[aria-pressed="true"] { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary); }
.theme-card:hover { transform: translateY(-3px); }

/* ---------- footer ---------- */
.foot { margin-top: 40px; text-align: center; }
.socials { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.socials a {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.socials a:hover { transform: translateY(-4px) rotate(-4deg); }
.socials a svg { width: 26px; height: 26px; }
.s-telegram { background: #229ed9; } .s-tiktok { background: #111; } .s-facebook { background: #1877f2; }
.s-instagram { background: radial-gradient(circle at 30% 110%, #fdcf58 0%, #fd5949 45%, #d6249f 60%, #285aeb 100%); }
.foot small { display: block; margin-top: 14px; color: var(--muted); }

/* ---------- vendor (isolated) ---------- */
.v-head { position: relative; margin: 10px -14px 0; }
.v-cover { height: 210px; overflow: hidden; position: relative; }
.v-cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); animation: slowpan 18s ease-in-out infinite alternate; }
@keyframes slowpan { to { transform: scale(1.15) translateY(-3%); } }
.v-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%, var(--bg-solid)); }
.v-exit {
  position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; min-height: 42px;
  border-radius: 999px; background: rgba(255, 255, 255, .92); color: #3b1746; text-decoration: none; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}
[dir="rtl"] .v-exit { left: auto; right: 12px; }
[dir="rtl"] .v-exit svg { transform: scaleX(-1); }
.v-id { position: relative; margin-top: -70px; padding: 0 16px; text-align: center; z-index: 2; }
.v-logo {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 8px; overflow: hidden; border: 4px solid var(--surface); background: var(--primary);
  display: grid; place-items: center; color: var(--primary-ink); font-family: var(--font-head); font-size: 36px; font-weight: 700; box-shadow: var(--shadow);
}
.v-logo img { width: 100%; height: 100%; object-fit: cover; }
.v-id h1 { margin: 0; font-family: var(--font-head); font-size: clamp(26px, 7vw, 44px); line-height: 1.1; }
.v-id p { margin: 6px auto 0; color: var(--muted); max-width: 560px; }
.v-tools { display: flex; gap: 8px; margin: 18px 0 12px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 14px; min-height: 46px;
}
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; padding: 10px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-weight: 600; font-size: 14px; min-height: 40px;
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .pgrid { grid-template-columns: repeat(4, 1fr); } }
.pgrid .pcard { width: auto; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ---------- product page ---------- */
.pp { display: grid; gap: 18px; margin-top: 12px; }
@media (min-width: 860px) { .pp { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px; font-weight: 700; color: var(--primary); text-decoration: none; min-height: 40px; }
[dir="rtl"] .back-link svg { transform: scaleX(-1); }
.gallery .big { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.gallery .big img { width: 100%; height: 100%; object-fit: cover; animation: popin .5s ease; }
@keyframes popin { from { opacity: 0; transform: scale(1.04); } }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery .thumbs button { width: 64px; height: 64px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: none; }
.gallery .thumbs button[aria-current="true"] { border-color: var(--primary); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.pp h1 { margin: 0 0 6px; font-family: var(--font-head); font-size: clamp(24px, 6vw, 34px); line-height: 1.15; }
.pp .price { font-size: 24px; }
.pp .desc { color: var(--muted); margin: 10px 0 0; }
.opt { margin-top: 14px; }
.opt > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.opt .chips { flex-wrap: wrap; overflow: visible; padding: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.qty button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; font-weight: 700; }
.qty output { min-width: 32px; text-align: center; font-weight: 800; }

/* ---------- forms ---------- */
.form { display: grid; gap: 12px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 16px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.err { color: #c62828; font-weight: 600; font-size: 14px; min-height: 1em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 14px;
  border: 0; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); transition: transform .15s, filter .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border); box-shadow: none; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: #d84343; color: #fff; }
.verify-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; font-size: 14px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.verify-note svg { flex: 0 0 22px; color: var(--accent); }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(30, 10, 40, .45); display: grid; place-items: center; padding: 16px; animation: fade .2s; backdrop-filter: blur(3px); }
.modal { width: min(440px, 100%); max-height: 90vh; overflow: auto; background: var(--surface-2); color: var(--text); border-radius: 24px; padding: 26px 22px; text-align: center; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); animation: rise .35s cubic-bezier(.3, 1.4, .5, 1); }
.modal h2 { font-family: var(--font-head); margin: 10px 0 6px; }
.modal .check { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); }
.modal .check svg { width: 40px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.96); } }
#toast { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 60; padding: 12px 18px; border-radius: 14px; background: #2b1630; color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; max-width: calc(100% - 32px); }
#toast.on { opacity: 1; translate: -50% -6px; }

/* ---------- generic pages ---------- */
.page-title { font-family: var(--font-head); font-size: clamp(28px, 7vw, 42px); margin: 18px 0 6px; line-height: 1.1; }
.lead { color: var(--muted); margin: 0 0 18px; }
.prose { background: var(--surface); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.prose h3 { font-family: var(--font-head); margin: 18px 0 6px; }
.prose h3:first-child { margin-top: 0; }
.vlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .vlist { grid-template-columns: repeat(4, 1fr); } }
.contact-card { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border-radius: 18px; border: 1px solid var(--border); margin-bottom: 10px; }
.contact-card .grow { flex: 1; }
.auth-wrap { max-width: 460px; margin: 20px auto; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- dashboard ---------- */
.dash { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .dash { grid-template-columns: 220px 1fr; align-items: start; } }
.dash-nav { display: flex; gap: 6px; overflow-x: auto; background: var(--surface); padding: 8px; border-radius: 18px; border: 1px solid var(--border); scrollbar-width: none; }
@media (min-width: 900px) { .dash-nav { flex-direction: column; position: sticky; top: 76px; } }
.dash-nav button { flex: 0 0 auto; text-align: start; border: 0; background: none; padding: 10px 14px; border-radius: 12px; font-weight: 700; min-height: 44px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.dash-nav button[aria-current="true"] { background: var(--primary); color: var(--primary-ink); }
.dash-nav .count { background: #fff; color: #c2185b; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.dash h2 { font-family: var(--font-head); margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat { background: var(--surface-2); border-radius: 16px; padding: 14px; border: 1px solid var(--border); }
.stat b { display: block; font-size: 28px; color: var(--primary); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.st-awaiting_call, .st-pending { background: #fff1c7; color: #7a5600; }
.st-verified, .st-approved { background: #d6f5e6; color: #0b6b45; }
.st-shipped { background: #dbeeff; color: #0c4f8a; }
.st-delivered { background: #e9e0ff; color: #4a2a9a; }
.st-cancelled, .st-suspended { background: #ffdede; color: #9a1f1f; }
.item-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); margin-bottom: 8px; border: 1px solid var(--border); }
.item-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.item-row .grow { flex: 1; min-width: 0; }
.item-row .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.thumb-edit { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb-edit figure { position: relative; margin: 0; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.thumb-edit figure img, .thumb-edit figure video { width: 100%; height: 100%; object-fit: cover; }
.thumb-edit figure button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 14px; line-height: 1; }
.upload-btn { width: 72px; height: 72px; border-radius: 12px; border: 2px dashed var(--primary-2); display: grid; place-items: center; color: var(--primary); background: var(--surface-2); cursor: pointer; }
.upload-btn input { display: none; }
.field .upload-btn { display: grid; margin: 0; }
.perm-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.perm-grid label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; min-height: 40px; }
.card-list .slide-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); margin-bottom: 8px; border: 1px solid var(--border); }
.card-list .slide-row img, .card-list .slide-row video { width: 72px; height: 90px; object-fit: cover; border-radius: 10px; }
.card-list .slide-row .form { gap: 6px; }
.card-list .slide-row input { min-height: 38px; padding: 6px 10px; }
.themes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .themes-grid { grid-template-columns: repeat(3, 1fr); } }
.themes-grid .theme-card .tc-top { height: 70px; }

/* ---------- RTL ---------- */
[dir="rtl"] .vtile .swatch { right: auto; left: 6px; }

/* ---------- small screens ---------- */
@media (max-width: 420px) {
  #app { padding: 6px 10px 50px; }
  .hero-head { gap: 6px; }
  .market { gap: 7px; }
  .quick { gap: 7px; }
  .quick a { padding: 10px 2px 8px; border-radius: 16px; }
  .vtile { border-radius: 12px; }
  .form .row2 { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #confetti { display: none; }
  .marquee { overflow-x: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* desktop header: landscape banners so the logo stays the hero */
@media (min-width: 900px) {
  .hero-head { grid-template-columns: 1fr 1.2fr 1fr; gap: 24px; }
  .carousel { aspect-ratio: 4 / 3; }
}
