/* ============================================================
   Dikr books & shop — /كتب/ and /المتجر/
   Builds on the site tokens in style.css (light + body.dark).
   ============================================================ */
.store-body {
  --st-card: #ffffff;
  --st-ink: #16242f;
  --st-muted: #5f6b76;
  --st-line: rgba(15, 40, 60, .08);
  --st-shadow: 0 1px 2px rgba(15, 40, 60, .04), 0 10px 28px rgba(15, 40, 60, .07);
  --st-hover: 0 2px 4px rgba(15, 40, 60, .05), 0 20px 44px rgba(20, 110, 170, .15);
  --st-gold: #c99a3a;
  --st-green: #0f9d76;
  --st-radius: 22px;
}
body.dark.store-body {
  --st-card: #1c1c1e;
  --st-ink: #f2f2f7;
  --st-muted: #a1a1a8;
  --st-line: rgba(255, 255, 255, .08);
  --st-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 28px rgba(0,0,0,.35);
  --st-hover: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 44px rgba(0,0,0,.5);
  --st-gold: #e6bd62;
  --st-green: #34d3a2;
}
.st-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 56px; color: var(--st-ink); }
.st-wrap a { color: var(--blue-dark); }
body.dark .st-wrap a { color: var(--blue); }

/* ── Hero (index with items) ───────────────────────────────── */
.st-hero {
  position: relative; overflow: hidden; text-align: center;
  margin: 24px 0 20px; padding: 48px 24px 40px; border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(70,191,255,.18), transparent 70%), var(--page-bg);
  border: 1px solid var(--blue-border); box-shadow: var(--st-shadow);
}
.st-hero::before, .st-soon::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 6l5 9 10-3-3 10 9 6-9 6 3 10-10-3-5 9-5-9-10 3 3-10-9-6 9-6-3-10 10 3z' fill='none' stroke='%2346bfff' stroke-opacity='.13' stroke-width='1'/%3E%3C/svg%3E");
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 20%, transparent 75%);
}
.st-eyebrow { position: relative; display: inline-flex; gap: 8px; align-items: center; color: var(--blue-dark); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
body.dark .st-eyebrow { color: var(--blue); }
.st-hero h1 { position: relative; font-size: clamp(28px, 5vw, 42px); line-height: 1.3; margin-bottom: 10px; }
.st-hero p { position: relative; color: var(--st-muted); font-size: 17px; max-width: 620px; margin: 0 auto; line-height: 1.8; }

/* ── Filters ───────────────────────────────────────────────── */
.st-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 22px; }
.st-filters button {
  font: inherit; font-size: 15px; cursor: pointer; padding: 7px 16px; border-radius: 999px;
  background: var(--st-card); color: var(--st-ink); border: 1px solid var(--st-line); box-shadow: var(--st-shadow);
}
.st-filters button small { color: var(--st-muted); margin-inline-start: 4px; }
.st-filters button.is-on { background: var(--blue); color: #fff; border-color: transparent; }
.st-filters button.is-on small { color: rgba(255,255,255,.8); }

/* ── Cards ─────────────────────────────────────────────────── */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.st-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--st-ink) !important;
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: var(--st-radius);
  box-shadow: var(--st-shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.st-card[hidden] { display: none; }
.st-card:hover { transform: translateY(-3px); box-shadow: var(--st-hover); }
.st-card-vis {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 4.4; padding: 22px;
  background: radial-gradient(90% 80% at 50% 30%, rgba(70,191,255,.14), transparent 70%), var(--sys-bg);
}
.st-card-vis img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-card-vis.is-book img { border-radius: 3px 8px 8px 3px; box-shadow: -6px 8px 18px rgba(10,30,50,.28), inset 3px 0 0 rgba(255,255,255,.2); transform: perspective(700px) rotateY(-8deg); transition: transform .3s; }
.st-card:hover .st-card-vis.is-book img { transform: perspective(700px) rotateY(0); }
.st-card-vis.is-prod { padding: 0; }
.st-card-vis.is-prod img { width: 100%; height: 100%; object-fit: cover; }
.st-card.is-soon .st-card-vis img { filter: saturate(.85); }
.st-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.st-card-title { font-size: 18px; line-height: 1.5; }
.st-card-sub { color: var(--st-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.st-chip { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; background: var(--blue-bg); color: var(--blue-dark); }
body.dark .st-chip { color: var(--blue); }
.st-price { margin-inline-start: auto; font-weight: 700; font-size: 17px; font-family: -apple-system, 'Segoe UI', sans-serif; }
.st-price s, .st-bigprice s { color: var(--st-muted); font-weight: 400; font-size: .8em; }
.st-soon-tag { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--st-gold); }
.st-ribbon {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1;
  background: linear-gradient(135deg, #f3cf7a, #c99a3a); color: #3b2a07; font-weight: 700; font-size: 13px;
  padding: 3px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(201,154,58,.35);
}
.st-ph { display: grid; place-items: center; width: 60%; aspect-ratio: 3/4; border-radius: 10px; background: var(--blue-bg); color: var(--blue); font-size: 36px; }

/* ── Coming soon ───────────────────────────────────────────── */
.st-soon {
  position: relative; overflow: hidden; margin: 24px 0 8px; padding: 44px 40px; border-radius: 30px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center;
  background: radial-gradient(90% 120% at 100% 0%, rgba(70,191,255,.20), transparent 60%),
              radial-gradient(70% 90% at 0% 100%, rgba(201,154,58,.14), transparent 60%), var(--page-bg);
  border: 1px solid var(--blue-border); box-shadow: var(--st-shadow);
}
.st-soon-glow { position: absolute; width: 380px; height: 380px; inset-inline-end: -120px; top: -140px; border-radius: 50%; background: rgba(70,191,255,.18); filter: blur(70px); pointer-events: none; }
.st-soon-text { position: relative; }
.st-soon-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: #8a6212; background: rgba(243,207,122,.28); border: 1px solid rgba(201,154,58,.35);
}
body.dark .st-soon-badge { color: #f3cf7a; background: rgba(243,207,122,.12); }
.st-soon-badge i { animation: st-turn 3s ease-in-out infinite; }
@keyframes st-turn { 0%, 40% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
.st-soon h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.3; margin: 14px 0 12px; }
.st-soon p { color: var(--st-muted); font-size: 17.5px; line-height: 1.9; max-width: 520px; }
.st-soon-follow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; color: var(--st-muted); font-size: 15px; }
.st-soon-follow a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; text-decoration: none;
  background: var(--st-card); border: 1px solid var(--st-line); color: var(--st-ink) !important; transition: transform .2s, background .2s;
}
.st-soon-follow a:hover { transform: translateY(-2px); background: var(--blue); color: #fff !important; }

/* Shelf: three drawn books / product tiles (or real «soon» covers) */
.st-shelf { position: relative; height: 300px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding-bottom: 18px; }
.st-shelf-board { position: absolute; bottom: 0; left: 6%; right: 6%; height: 14px; border-radius: 6px; background: linear-gradient(180deg, #d9b97a, #a8823f); box-shadow: 0 10px 24px rgba(80,50,10,.25); }
body.dark .st-shelf-board { background: linear-gradient(180deg, #7a6236, #4f3d1d); }
.st-shelf-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  width: 128px; height: 186px; padding: 14px 12px; border-radius: 4px 10px 10px 4px; color: #fff;
  box-shadow: -8px 10px 24px rgba(10,30,50,.30); transform-origin: bottom center;
  animation: st-float 6s ease-in-out infinite;
}
.st-shelf-item.n0 { transform: rotate(-6deg); z-index: 1; margin-inline-end: -18px; animation-delay: -1s; }
.st-shelf-item.n1 { height: 214px; width: 146px; z-index: 2; animation-delay: -3s; }
.st-shelf-item.n2 { transform: rotate(6deg); z-index: 1; margin-inline-start: -18px; animation-delay: -5s; }
@keyframes st-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.st-shelf-item b { font-size: 17px; line-height: 1.4; position: relative; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.st-shelf-item small { font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 10px; letter-spacing: .08em; opacity: .75; position: relative; }
.st-shelf-item.t-night   { background: linear-gradient(160deg, #1d3a5f, #0d1b2e); }
.st-shelf-item.t-emerald { background: linear-gradient(160deg, #11795c, #08402f); }
.st-shelf-item.t-sand    { background: linear-gradient(160deg, #e9c98c, #b8873a); color: #3b2a07; }
.st-shelf-item.t-sand b  { text-shadow: none; }
.st-bk-spine { position: absolute; inset-block: 0; inset-inline-start: 0; width: 10px; border-radius: 4px 0 0 4px; background: rgba(0,0,0,.22); }
.st-bk-orn {
  width: 52px; height: 52px; position: relative; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cpath d='M28 4l5.5 9.5L44 10l-3.5 10.5L50 28l-9.5 7.5L44 46l-10.5-3.5L28 52l-5.5-9.5L12 46l3.5-10.5L6 28l9.5-7.5L12 10l10.5 3.5z' fill='none' stroke='%23f3cf7a' stroke-width='2'/%3E%3Ccircle cx='28' cy='28' r='8' fill='none' stroke='%23f3cf7a' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.st-shelf.is-shop .st-shelf-item { border-radius: 16px; }
.st-shelf.is-shop .st-shelf-item i { font-size: 38px; color: #f3cf7a; position: relative; }
.st-shelf.is-shop .st-shelf-item.t-sand i { color: #5b3d0a; }
.st-shelf-item.is-img { padding: 0; background: none; overflow: hidden; }
.st-shelf-item.is-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── Sections ──────────────────────────────────────────────── */
.st-sec { margin-top: 34px; }
.st-sec > h2 { font-size: 24px; margin-bottom: 14px; }
.st-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.st-feat { background: var(--st-card); border: 1px solid var(--st-line); border-radius: var(--st-radius); box-shadow: var(--st-shadow); padding: 20px; }
.st-feat i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--blue-bg); color: var(--blue-dark); font-size: 18px; margin-bottom: 10px; }
body.dark .st-feat i { color: var(--blue); }
.st-feat h3 { font-size: 18px; margin-bottom: 4px; }
.st-feat p { color: var(--st-muted); font-size: 15px; line-height: 1.8; }
.st-free { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.st-free a {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--st-ink) !important;
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: 18px; box-shadow: var(--st-shadow); transition: transform .2s, box-shadow .2s;
}
.st-free a:hover { transform: translateY(-2px); box-shadow: var(--st-hover); }
.st-free i { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(201,154,58,.14); color: var(--st-gold); font-size: 17px; }
.st-free span { display: flex; flex-direction: column; }
.st-free small { color: var(--st-muted); font-size: 14px; }
.st-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.st-trust > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 16px; border-radius: 18px; background: var(--st-card); border: 1px solid var(--st-line); }
.st-trust i { grid-row: 1 / 3; color: var(--st-green); font-size: 20px; margin-top: 4px; }
.st-trust span { color: var(--st-muted); font-size: 14.5px; line-height: 1.7; }

/* ── Item page ─────────────────────────────────────────────── */
.st-preview { margin-top: 18px; padding: 10px 16px; border-radius: 14px; background: rgba(243,207,122,.25); color: #6b4c0e; font-weight: 700; }
body.dark .st-preview { color: #f3cf7a; background: rgba(243,207,122,.1); }
.st-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 16px; font-size: 14.5px; color: var(--st-muted); }
.st-crumbs a { text-decoration: none; }
.st-crumbs [aria-current] { color: var(--st-ink); }
.st-item-top { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 34px; align-items: start; }
.st-gallery { position: sticky; top: 84px; }
.st-gal-main {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.05; padding: 34px; border-radius: 28px;
  background: radial-gradient(90% 80% at 50% 30%, rgba(70,191,255,.18), transparent 70%), var(--st-card);
  border: 1px solid var(--st-line); box-shadow: var(--st-shadow);
}
.st-gal-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-gallery.is-book .st-gal-main img { border-radius: 3px 10px 10px 3px; box-shadow: -10px 14px 30px rgba(10,30,50,.32), inset 4px 0 0 rgba(255,255,255,.2); }
.st-gallery.is-prod .st-gal-main { padding: 0; overflow: hidden; }
.st-gallery.is-prod .st-gal-main img { width: 100%; height: 100%; object-fit: cover; }
.st-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.st-thumbs button { flex: 0 0 64px; height: 64px; padding: 4px; border-radius: 12px; cursor: pointer; background: var(--st-card); border: 2px solid var(--st-line); }
.st-thumbs button.is-on { border-color: var(--blue); }
.st-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.st-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.st-info h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.35; }
.st-sub { font-size: 19px; color: var(--st-muted); margin-top: 6px; line-height: 1.7; }
.st-summary { font-size: 17px; line-height: 1.9; margin-top: 14px; }
.st-buy { margin-top: 20px; padding: 18px; border-radius: 22px; background: var(--st-card); border: 1px solid var(--st-line); box-shadow: var(--st-shadow); }
.st-buy.is-soon p { margin-top: 10px; color: var(--st-muted); line-height: 1.8; }
.st-bigprice { font-size: 30px; font-weight: 800; font-family: -apple-system, 'Segoe UI', sans-serif; margin-bottom: 12px; }
.st-buy-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.st-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; text-decoration: none; font-weight: 700;
  background: var(--sys-bg); color: var(--st-ink) !important; border: 1px solid var(--st-line); transition: transform .15s, background .2s;
}
.st-btn small { font-weight: 400; color: var(--st-muted); font-family: -apple-system, 'Segoe UI', sans-serif; }
.st-btn:hover { transform: translateY(-1px); }
.st-btn.is-main { flex-basis: 100%; justify-content: center; padding: 14px 18px; font-size: 18px; color: #fff !important; border: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-darker)); box-shadow: 0 8px 22px rgba(13,136,196,.3); }
.st-btn.is-main small { color: rgba(255,255,255,.85); }
.st-buy-note { margin-top: 10px; font-size: 13.5px; color: var(--st-muted); }
.st-facts { margin-top: 18px; border-radius: 18px; overflow: hidden; border: 1px solid var(--st-line); }
.st-facts div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 16px; background: var(--st-card); }
.st-facts div:nth-child(even) { background: var(--sys-bg); }
.st-facts dt { color: var(--st-muted); }
.st-facts dd { font-weight: 700; overflow-wrap: anywhere; }
.st-body { max-width: 760px; }
.st-body h2 { font-size: 23px; margin: 20px 0 8px; }
.st-body h3 { font-size: 19px; margin: 16px 0 6px; }
.st-body p, .st-body li { font-size: 18px; line-height: 2; }
.st-body p { margin-bottom: 12px; }
.st-body ul { padding-inline-start: 22px; margin-bottom: 12px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .st-soon { grid-template-columns: 1fr; padding: 32px 22px 26px; text-align: center; }
  .st-soon p { margin: 0 auto; }
  .st-soon-follow { justify-content: center; }
  .st-shelf { height: 250px; }
  .st-shelf-item { width: 104px; height: 152px; }
  .st-shelf-item.n1 { width: 120px; height: 176px; }
  .st-shelf-item b { font-size: 14.5px; }
  .st-item-top { grid-template-columns: 1fr; gap: 22px; }
  .st-gallery { position: static; }
  .st-gal-main { aspect-ratio: auto; height: 360px; }
  .st-feats, .st-trust { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .st-wrap { padding: 0 16px 44px; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .st-card-vis { padding: 14px; }
  .st-card-body { padding: 10px 12px 12px; }
  .st-card-title { font-size: 16px; }
  .st-card-sub { display: none; }
  .st-free { grid-template-columns: 1fr; }
  .st-facts div { grid-template-columns: 110px 1fr; }
  .st-shelf-item.n0, .st-shelf-item.n2 { width: 92px; height: 134px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-shelf-item, .st-soon-badge i { animation: none; }
}
