/* ثلاث واحات — هوية المتجر على ثيم رائد */
@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@600;700;800&display=swap");

:root {
  --th-paper: #ecebe6;
  --th-card: #f7f6f2;
  --th-ink: #17201b;
  --th-muted: #5f6862;
  --th-oasis: #1e5c46;
  --th-radius: 28px;
  --th-display: "Alexandria", var(--font-main), sans-serif;
}

/* خلفية ورقية */
body.theme-raed { background-color: var(--th-paper); color: var(--th-ink); }

/* الشريط العلوي: حبة دائرية فوق الخلفية */
body.theme-raed .store-header .top-navbar { background-color: transparent; }
body.theme-raed .main-nav-container { background-color: transparent; box-shadow: none; }
body.theme-raed .main-nav-container > .inner > .container > div {
  background-color: var(--th-card);
  border-radius: 999px;
  padding-inline: 1.25rem;
}
body.theme-raed .main-nav-container.fixed-pinned > .inner { background-color: var(--th-paper); }

/* العناوين بخط Alexandria */
body.theme-raed .s-block__title h2,
body.theme-raed .s-slider-block__title h2 {
  font-family: var(--th-display);
  font-weight: 700;
}

/* البانرات بزوايا مستديرة */
body.theme-raed .banner-entry,
body.theme-raed .s-block--photos-slider img,
body.theme-raed .s-block--banners img { border-radius: var(--th-radius); }

/* بطاقة الكتاب: الغلاف بنسبة الكتاب وظل خفيف */
body.theme-raed .s-product-card-entry { background-color: transparent; box-shadow: none; }
body.theme-raed .s-product-card-image { background-color: transparent; }
body.theme-raed .s-product-card-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(23, 32, 27, 0.18);
  transition: transform 0.25s ease;
}
body.theme-raed .s-product-card-entry:hover .s-product-card-image img { transform: translateY(-6px); }
body.theme-raed .s-product-card-content-title a { color: var(--th-ink); font-weight: 700; }
body.theme-raed .s-product-card-price { color: var(--th-oasis); font-weight: 700; }

/* صفحة الكتاب: الغلاف كاملاً كأنه على حامل */
body.theme-raed .container--product-details .details-slider {
  padding: 2.5rem 1.5rem;
  border-radius: var(--th-radius);
  background-color: var(--th-card);
}
body.theme-raed .container--product-details .details-slider .swiper,
body.theme-raed .container--product-details .details-slider .swiper-wrapper,
body.theme-raed .container--product-details .details-slider .swiper-slide,
body.theme-raed .container--product-details .magnify-wrapper { background-color: transparent; }
body.theme-raed .container--product-details .magnify-wrapper {
  display: flex; align-items: center; justify-content: center;
}
body.theme-raed .container--product-details .magnify-wrapper img {
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: 520px;
  object-fit: contain !important;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(23, 32, 27, 0.22);
}
body.theme-raed .container--product-details h1 {
  font-family: var(--th-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.35;
}

/* الأزرار الرئيسية بشكل حبة */
body.theme-raed .s-button-primary,
body.theme-raed .btn--primary { border-radius: 999px; }

/* شرائط الكتب: بطاقات بحجم الكتاب بدل البطاقات العريضة */
body.theme-raed .s-products-slider-card.swiper-slide { width: 180px !important; }
@media (max-width: 767px) {
  body.theme-raed .s-products-slider-card.swiper-slide { width: 140px !important; }
}
/* ---------- الواجهة المتحركة: عنوان كبير وأغلفة طافية ---------- */
.th-hero { margin-top: 1.5rem; }
.th-hero__inner {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 560px; padding: 3rem 1rem;
  border-radius: var(--th-radius); background-color: var(--th-card); overflow: hidden;
}
.th-hero__text { position: relative; z-index: 2; max-width: 640px; text-align: center; animation: th-rise 0.9s ease-out both; }
.th-hero__eyebrow { margin-bottom: 1rem; color: var(--th-oasis); font-weight: 600; font-size: 0.9rem; }
.th-hero__title {
  font-family: var(--th-display); font-weight: 800;
  font-size: clamp(2.25rem, 6.5vw, 4.75rem); line-height: 1.25; color: var(--th-ink); text-wrap: balance;
}
.th-hero__desc { margin: 1.25rem auto 2rem; max-width: 440px; color: var(--th-muted); font-size: 1.05rem; line-height: 1.9; }
.th-hero__covers { position: absolute; inset: 0; z-index: 1; }
.th-hero__cover {
  position: absolute; width: clamp(84px, 11vw, 150px); border-radius: 8px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(23, 32, 27, 0.22);
  animation: th-float 7s ease-in-out infinite;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.th-hero__cover img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.th-hero__cover:hover { transform: rotate(0deg) scale(1.06) !important; box-shadow: 0 24px 50px rgba(23, 32, 27, 0.3); }
.th-hero__cover--1 { top: 9%;  inset-inline-start: 5%;  transform: rotate(-9deg); }
.th-hero__cover--2 { top: 48%; inset-inline-start: 11%; transform: rotate(6deg);  animation-delay: -1.5s; animation-duration: 8s; }
.th-hero__cover--3 { top: 6%;  inset-inline-end: 6%;    transform: rotate(8deg);  animation-delay: -3s; }
.th-hero__cover--4 { top: 50%; inset-inline-end: 12%;   transform: rotate(-6deg); animation-delay: -4.5s; animation-duration: 9s; }
.th-hero__cover--5 { bottom: -6%; inset-inline-start: 27%; transform: rotate(-4deg); animation-delay: -2s; }
.th-hero__cover--6 { bottom: -8%; inset-inline-end: 28%;  transform: rotate(5deg);  animation-delay: -5s; animation-duration: 8.5s; }
@keyframes th-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes th-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 767px) {
  .th-hero__inner { min-height: 0; flex-direction: column; padding: 2rem 1rem 2.5rem; }
  .th-hero__covers { position: static; display: flex; justify-content: center; margin-bottom: 1.75rem; padding-inline-start: 14px; }
  .th-hero__cover { position: static; width: 72px; margin-inline-start: -14px; }
  .th-hero__cover--1, .th-hero__cover--3 { transform: rotate(-4deg); }
  .th-hero__cover--2, .th-hero__cover--4 { transform: rotate(4deg) translateY(6px); }
  .th-hero__cover--5, .th-hero__cover--6 { display: none; }
}
@media (prefers-reduced-motion: reduce) { .th-hero__cover, .th-hero__text { animation: none; } }
.th-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.75rem;
  border-radius: 999px; background-color: var(--th-ink); color: #fff; font-weight: 600; font-size: 0.95rem;
  transition: background-color 0.2s ease;
}
.th-btn:hover { background-color: var(--th-oasis); color: #fff; }

/* ---------- صف Goodreads في صفحة الكتاب ---------- */
.th-goodreads {
  display: flex; width: fit-content; align-items: center; gap: 0.6rem; margin: 0.25rem 0 1rem; padding: 0.5rem 0.9rem;
  border-radius: 999px; background-color: #f4f1ea; direction: ltr; transition: box-shadow 0.2s ease;
}
.th-goodreads:hover { box-shadow: 0 4px 14px rgba(56, 33, 16, 0.15); }
.th-goodreads__logo { color: #382110; font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; letter-spacing: -0.01em; }
.th-goodreads__logo b { font-weight: 700; }
.th-goodreads__stars { position: relative; display: inline-block; font-size: 1.05rem; line-height: 1; letter-spacing: 0.08em; color: #d8d2c4; }
.th-goodreads__stars::before { content: "★★★★★"; }
.th-goodreads__stars-fill { position: absolute; inset-block: 0; left: 0; overflow: hidden; white-space: nowrap; color: #e87400; }
.th-goodreads__stars-fill::before { content: "★★★★★"; }
.th-goodreads__score { color: #382110; font-weight: 700; font-size: 1rem; }
.th-goodreads__count, .th-goodreads__cta { color: #6b5b4b; font-size: 0.8rem; }
/* ---------- رفوف «روايات» و«فكر وأعمال وسيرة» بأغلفة تطفو بهدوء ---------- */
.th-band__panel {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: 285px; padding: 2rem 2.75rem 0; border-radius: var(--th-radius); overflow: hidden;
}
.th-band__title { font-family: var(--th-display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.25; color: var(--th-ink); }
.th-band__desc { margin-top: 0.5rem; color: var(--th-muted); font-size: 1rem; }
.th-band__all {
  display: inline-block; margin-top: 1rem; padding: 0.45rem 1rem; border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.7); color: var(--th-ink); font-weight: 600; font-size: 0.95rem;
  transition: background-color 0.2s ease;
}
.th-band__all:hover { background-color: #fff; }
.th-band__covers { position: relative; z-index: 1; display: flex; gap: 14px; align-self: flex-end; margin-bottom: 12px; }
.th-band__cover {
  flex: 0 0 118px; border-radius: 6px; overflow: hidden; box-shadow: 0 12px 26px rgba(23, 32, 27, 0.22);
  animation: th-bob 6s ease-in-out infinite; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.th-band__cover img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.th-band__cover:nth-child(odd) { margin-bottom: 10px; }
.th-band__cover:nth-child(2) { animation-delay: -1s; animation-duration: 6.5s; }
.th-band__cover:nth-child(3) { animation-delay: -2.2s; }
.th-band__cover:nth-child(4) { animation-delay: -3.1s; animation-duration: 7s; }
.th-band__cover:nth-child(5) { animation-delay: -4.3s; }
.th-band__cover:nth-child(6) { animation-delay: -5.2s; animation-duration: 6.8s; }
.th-band__cover:hover { transform: translateY(-10px); box-shadow: 0 20px 36px rgba(23, 32, 27, 0.3); }
.th-band__board { position: absolute; inset-inline: 0; bottom: 0; height: 12px; background-color: rgba(23, 32, 27, 0.12); }
@keyframes th-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@media (max-width: 1023px) { .th-band__cover:nth-child(n+5) { display: none; } }
@media (max-width: 767px) {
  .th-band__panel { flex-direction: column; align-items: stretch; gap: 1.25rem; min-height: 0; padding: 1.5rem 1.25rem 0; }
  .th-band__covers { align-self: stretch; gap: 10px; overflow-x: auto; padding-top: 10px; }
  .th-band__cover { flex-basis: 88px; }
  .th-band__cover:nth-child(n+5) { display: block; }
}
@media (prefers-reduced-motion: reduce) { .th-band__cover { animation: none; } }
/* ---------- شرائط المنتجات بهيئة الرف (ثابتة) ---------- */
.s-block--best-offers.th-tint {
  position: relative; margin-top: 2rem; padding: 1.75rem 1.5rem 2rem !important;
  border-radius: var(--th-radius); background-color: var(--th-tint); overflow: hidden;
}
.s-block--best-offers.th-tint::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 12px; background-color: rgba(23, 32, 27, 0.1);
}
.th-tint .s-slider-block__title h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; }
@media (max-width: 767px) { .s-block--best-offers.th-tint { padding: 1.25rem 1rem 1.75rem !important; } }
/* ---------- برامج وفعاليات ---------- */
.th-events { margin-top: 2rem; }
.th-events__panel { padding: 2rem 2rem 1.75rem; border-radius: var(--th-radius); background-color: var(--th-card); }
.th-events__head { margin-bottom: 1.5rem; }
.th-events__title { font-family: var(--th-display); font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.3; color: var(--th-ink); }
.th-events__desc { margin-top: 0.35rem; color: var(--th-muted); font-size: 0.95rem; }
.th-events__list { display: flex; gap: 2rem; overflow-x: auto; padding: 0.5rem 0.25rem 0.75rem; scroll-snap-type: x proximity; }
.th-event { flex: 0 0 auto; width: min-content; display: flex; flex-direction: column; scroll-snap-align: start; }
.th-event__poster { display: block; }
.th-event__poster img {
  display: block; height: 340px; width: auto; max-width: none; border-radius: 12px;
  box-shadow: 0 16px 34px rgba(23, 32, 27, 0.2); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.th-event__poster:hover img { transform: translateY(-6px); box-shadow: 0 24px 44px rgba(23, 32, 27, 0.26); }
.th-event__name { margin-top: 1rem; font-family: var(--th-display); font-weight: 800; font-size: 1.15rem; color: var(--th-ink); }
.th-event__sub { margin-top: 0.25rem; color: var(--th-muted); font-size: 0.88rem; line-height: 1.6; }
.th-event__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.th-event__when { color: var(--th-ink); font-weight: 600; font-size: 0.85rem; }
.th-event__tag { padding: 0.2rem 0.7rem; border-radius: 999px; background-color: #dfe8dc; color: var(--th-oasis); font-weight: 700; font-size: 0.8rem; }
.th-event__cta { align-self: flex-start; margin-top: 0.9rem; padding: 0.6rem 1.25rem; font-size: 0.88rem; }
@media (max-width: 767px) {
  .th-events__panel { padding: 1.5rem 1.1rem 1.25rem; }
  .th-events__list { gap: 1.25rem; }
  .th-event__poster img { height: 260px; }
}

/* صفحة الفعالية: البوستر بحجم معقول وزر الحجز الخارجي */
.content--single-page .content-entry img { display: block; max-width: min(100%, 560px); height: auto; margin: 0 auto 1.5rem; border-radius: 12px; }
.content--single-page a[href*="kykbs.com"] {
  display: inline-flex; margin-top: 0.75rem; padding: 0.85rem 1.75rem; border-radius: 999px;
  background-color: var(--th-ink); color: #fff !important; font-weight: 600; text-decoration: none !important;
}
.content--single-page a[href*="kykbs.com"]:hover { background-color: var(--th-oasis); }
.th-free { display: inline-block; padding: 0.3rem 0.9rem; border-radius: 999px; background-color: #dfe8dc; color: var(--th-oasis); font-weight: 800; font-size: 1.05rem; }