:root {
  --ink: #17243d;
  --purple: #6c4ee3;
  --sky: #dff5ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffdf9;
  font-family: Cairo, system-ui, sans-serif;
}

.site-header {
  background: #fffdf9eb;
  border-bottom: 1px solid #eeeaf4;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 0.3rem;
  align-items: end;
  line-height: 0.88;
  color: #222 !important;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-arabic {
  padding-top: 5px;
  padding-bottom:6px;
  grid-column: 1/-1;
  font-size: 1.62rem;
  font-weight: 800;
  letter-spacing: -0.07em;
  color: #6c4ee3;
}

.brand-tagline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.03rem;
  color: #100f0f;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  margin-right: 5px;
}

.brand-tagline b {
  font-family: Cairo, sans-serif;
  font-weight: 800;
}

.brand-tagline i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a5a1a0;
}

.brand-tagline em {
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  color: var(--purple);
}

.nav-link {
  color: #647089;
  font-weight: 600;
}

.cart-button {
  border: 0;
  background: var(--purple);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 50px;
}
.cart-button:hover {
  background: #4a1dfd;
  border-color: #4a1dfd;
}

.hero-section {
  overflow: hidden;
  padding: 5.8rem 0 5rem;
  background: radial-gradient(circle at 82% 22%, #dff5ff 0, transparent 22rem),
    radial-gradient(circle at 10% 80%, #eeeaff 0, transparent 21rem),
    #fffdf9;
}

.eyebrow,
.section-kicker {
  color: var(--purple);
  font-weight: 800;
}

.hero-section h1 {
  font-size: clamp(2.65rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 1rem 0;
}

.hero-section h1 span {
  color: var(--purple);
}

.hero-actions .btn {
  min-width: 132px;
}

.lead {
  color: #677289;
  max-width: 32rem;
  line-height: 2;
  margin-bottom: 1.7rem;
}

.btn-primary {
  background: var(--purple);
  border-color: var(--purple);
}

.btn-primary:hover {
  background: #4a1dfd;
  border-color: #5331da;
}

/* تنسيق الكتب الأفقية ببروز وعمق قوي جداً */
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  height: 380px;
  position: relative;
  max-width: 620px;
  margin: auto;
}

.hero-books-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  width: 100%;
}

.showcase-book {
  width: 185px;
  height: 265px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  flex-shrink: 0;
}

.showcase-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-book.main-book {
  transform: translateY(-22px) scale(1.05);
  width: 220px;
  height: 315px;
  box-shadow: 0 35px 65px -15px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.showcase-book:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.4);
}

.showcase-book.main-book:hover {
  transform: translateY(-30px) scale(1.05);
  box-shadow: 0 40px 75px -15px rgba(15, 23, 42, 0.55);
}

.hero-orbit {
  position: absolute;
  border: 2px dashed #b8aef1;
  border-radius: 50%;
  pointer-events: none;
}

.book-stack {
  position:absolute;
  z-index:3;
  bottom:72px;
  width:96px;
  height:178px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:3px solid #fff9;
  border-radius:8px 8px 4px 4px;
  color:#fff;
  font-weight:800;
  letter-spacing:.04em;
  box-shadow:0 18px 35px #21164a38, inset -10px 0 0 #ffffff18;
}
.book-stack::after { content:""; position:absolute; right:10px; top:12px; bottom:12px; width:2px; background:#ffffff45; }
.book-one { left:105px; transform:rotate(-8deg); background:linear-gradient(160deg,#ff8b71,#dc4f72); }
.book-two { left:205px; bottom:82px; height:205px; background:linear-gradient(160deg,#7b5ce4,#4d31ad); }
.book-three { left:305px; transform:rotate(7deg); background:linear-gradient(160deg,#ffc95f,#df8d27); color:#4d3412; }
.login-cover-stack { position:absolute; inset:0; z-index:3; }
.login-cover { position:absolute; bottom:60px; width:125px; height:205px; object-fit:cover; border:3px solid #fff; box-shadow:0 20px 38px #17102f66; }
.login-cover-1 { left:75px; transform:rotate(-8deg); }
.login-cover-2 { left:190px; bottom:72px; width:138px; height:225px; z-index:2; }
.login-cover-3 { left:315px; transform:rotate(8deg); }

.orbit-one {
  height: 286px;
  width: 286px;
  left: 4%;
  top: 6px;
}

.orbit-two {
  height: 360px;
  width: 360px;
  right: 0;
  top: -28px;
  border-color: #9dddf2;
}

.hero-quote {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 22px;
  background: #fff;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px #20244c1a;
  color: var(--purple);
  font-size: 0.85rem;
  font-weight: 700;
}

.catalogue-section {
  background: #f7f7fd;
}

.catalogue-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  margin: 0.35rem 0 0;
}

.books-filter-panel {
  padding: 1.25rem;
  border: 1px solid #e9e4f4;
  border-radius: 20px;
  background: #f8f6ff;
}
.books-filter-grid { display: grid; grid-template-columns: 2fr repeat(5, 1fr); gap: .85rem; align-items: end; }
.books-filter-panel label { display: block; margin-bottom: .4rem; color: #514a65; font-size: .78rem; font-weight: 800; }
.books-filter-panel .form-control, .books-filter-panel .form-select { min-height: 46px; border-color: #e2dced; border-radius: 11px; background-color: #fff; font-size: .85rem; }
.books-filter-panel .form-control:focus, .books-filter-panel .form-select:focus { border-color: #8069dc; box-shadow: 0 0 0 3px #6c4ee31a; }
.books-filter-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1rem; }
.books-filter-actions .btn { min-width: 120px; border-radius: 10px; }
.books-empty-state { padding: 4rem 1rem; margin-bottom: 2rem; border-radius: 20px; background: #f8f6ff; color: #716a82; text-align: center; }
.books-empty-state strong { display: block; margin-bottom: .5rem; color: #27175f; font-size: 1.2rem; }
.books-empty-state p { margin: 0; }

@media (max-width: 991px) {
  .books-filter-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-search { grid-column: span 2; }
}

@media (max-width: 575px) {
  .books-filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .books-filter-actions .btn { flex: 1; min-width: 0; }
}

.all-books-link {
  color: var(--purple);
  font-weight: 800;
  text-decoration: none;
}

.book-card {
  overflow: hidden;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 8px 25px #242a5512;
  transition: 0.25s;
}

.book-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 35px #242a5521;
}

.book-image-wrap {
  height: 265px;
  position: relative;
  overflow: hidden;
  background: #e9e8f4;
}

.book-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}

.book-card:hover .book-image {
  transform: scale(1.06);
}

.category-badge,
.heart-button {
  position: absolute;
  top: 14px;
}

.heart-button.is-favorite {
  background: #fff0f3;
  color: #e23b57;
  border-color: #ffc7d1;
  opacity: 1;
  transform: none;
}

.category-badge {
  right: 14px;
  padding: 0.35rem 0.8rem;
  color: #41358b;
  background: #fff;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
}

.heart-button {
  left: 14px;
  z-index: 5;
  width: 35px;
  height: 35px;
  background: #fff;
  color: #ff795e;
  border: 0;
  border-radius: 50%;
  font-size: 1.4rem;
}

.book-content {
  padding: 1.25rem;
}

.book-author {
  color: #79839a;
  font-size: 0.86rem;
  margin: 0 0 0.3rem;
}

.book-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

.book-price {
  color: var(--purple);
  font-size: 1.1rem;
}

.add-cart-btn {
  background: #f0edff;
  color: var(--purple);
  border-radius: 50px;
  font-weight: 800;
  padding: 0.5rem 0.9rem;
}

.add-cart-btn:hover {
  background: var(--purple);
  color: #fff;
}

.reading-banner {
  padding: 1.5rem 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  border-radius: 20px;
  background: var(--sky);
}

.reading-banner > span {
  font-size: 2.5rem;
}

.reading-banner strong {
  font-size: 1.15rem;
}

.reading-banner p {
  color: #657189;
  margin: 0;
}

.reading-banner a {
  margin-right: auto;
  color: var(--purple);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.page-shell {
  min-height: 70vh;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  margin: 0.35rem 0 2rem;
}

.toast-message {
  position: fixed;
  z-index: 20;
  top: 88px;
  left: 1.2rem;
  background: #193b30;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px #17243d30;
  animation: slide-in 0.45s ease both;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-message.toast-hiding {
  opacity: 0;
  transform: translateY(-12px);
}

.best-sellers-section {
  background: linear-gradient(180deg, #fff 0%, #f7f5ff 100%);
}

.best-seller-badge {
  position: absolute;
  top: auto;
  bottom: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #6c4ee3;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.age-badge {
  position: absolute;
  z-index: 5;
  top: 13px;
  right: 13px;
  padding: 0.42rem 0.75rem;
  border-radius: 10px;
  background: #7357dc;
  color: #fff;
  border: 1px solid #6548d1;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 7px 16px #5b3fd038;
  transform: rotate(3deg);
}

.favorites-empty {
  border: 1px dashed #d8d1f8;
  border-radius: 24px;
  background: #faf9ff;
}

.cart-list,
.order-summary,
.checkout-form,
.auth-card,
.admin-table-wrap {
  background: #fff;
  border: 1px solid #eceaf3;
  border-radius: 20px;
  box-shadow: 0 8px 25px #242a550f;
}

.cart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #efedf4;
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-row img {
  width: 70px;
  height: 85px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-row h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  font-weight: 800;
}

.cart-row span,
.order-summary p,
.small-line {
  color: #737d92;
  font-size: 0.87rem;
}

.remove-button {
  border: 0;
  color: #eb4e57;
  background: #fff0f1;
  border-radius: 50%;
  height: 28px;
  width: 28px;
  font-size: 1.25rem;
}

.order-summary {
  padding: 1.5rem;
  position: sticky;
  top: 96px;
}

.order-summary h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1.3rem;
}

.order-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.7rem 0;
}

.order-summary > .cart-items-preview,
.order-summary > .bg-light { display: block; }

.small-line {
  font-size: 0.84rem;
}

.small-line strong {
  color: var(--ink);
}

.order-summary hr {
  border-color: #ddd9e7;
}

.checkout-summary-item,
.checkout-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.checkout-summary-book { min-width: 0; }
.checkout-summary-book img { flex: none; }
.checkout-summary-book h6 { overflow-wrap: anywhere; }
.checkout-summary-amount { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.checkout-summary-row > :first-child { min-width: 0; }
.checkout-summary-row > strong { text-align: left; }
.checkout-summary-total { border-top: 1px solid #d9dce5; padding-top: 0.8rem; margin-top: 0.8rem; }
@media (max-width: 460px) {
  .checkout-summary-item { align-items: flex-start; }
  .checkout-summary-total { align-items: flex-start; flex-direction: column; }
}

.checkout-form,
.auth-card {
  padding: 1.7rem;
}

.checkout-form label,
.auth-card label {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 0.4rem;
  display: block;
}

.checkout-form .form-control,
.auth-card .form-control {
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.15rem;
  border-color: #dcd9e4;
}

.field-validation-error {
  color: #d3344d;
  font-size: 0.78rem;
}

.checkout-note {
  margin-top: 1.3rem;
  padding: 0.8rem 1rem;
  background: #eff8ff;
  color: #3e6685;
  font-size: 0.86rem;
  border-radius: 10px;
}

.empty-state,
.success-state {
  max-width: 600px;
  text-align: center;
  margin: 2rem auto;
  padding: 3rem 1.5rem;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 25px #242a550f;
}

.empty-state > div {
  font-size: 3.3rem;
}

.empty-state h2 {
  font-weight: 800;
}

.empty-state p,
.success-state p {
  color: #69758b;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.1rem;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 800;
  background: #38bc78;
  border-radius: 50%;
  box-shadow: 0 0 0 10px #e3f8ee;
}

.auth-card {
  max-width: 480px;
  margin: auto;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap table {
  margin: 0;
  min-width: 760px;
}

.admin-table-wrap th {
  background: #f4f2fb;
  color: #534a74;
}

.admin-table-wrap td,
.admin-table-wrap th {
  padding: 1rem;
}

.admin-table-wrap small {
  color: #788297;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

@keyframes slide-in {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .brand-arabic {
    font-size: 1.26rem;
  }
  .brand-latin {
    font-size: 0.94rem;
  }
  .hero-section {
    padding: 3.5rem 0;
  }
  .hero-art {
    transform: scale(0.85);
    margin: -10px auto -30px;
  }
  .reading-banner {
    padding: 1.25rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .reading-banner a {
    margin-right: 0;
    width: 100%;
  }
  .book-image-wrap {
    height: 230px;
  }
  .cart-row {
    gap: 0.65rem;
  }
  .cart-row img {
    width: 54px;
    height: 68px;
  }
}

.account-link {
  color: var(--ink);
  font-weight: 700;
  display: inline-block;
  padding: 10px 24px;
  border-radius: 50px;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.3s ease;
}

.account-link:hover {
  background: #4a1dfd;
  border-color: #4a1dfd;
  color: #ffffff;
}

.book-grid .book-card {
  border: 1px solid #ded8f3;
  border-radius: 18px;
}

.book-grid .book-image-wrap {
  height: 280px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, #fffdf7 0 18%, #f9f1fa 48%, #e8def8 100%);
  border-bottom: 1px solid #e4def5;
}

.book-grid .book-image-wrap::before,
.book-grid .book-image-wrap::after {
  content: none;
  position: absolute;
  pointer-events: none;
}

.book-grid .book-image-wrap::before {
  inset: 14px;
  border-radius: 16px;
  opacity: 0.42;
  background: repeating-linear-gradient(165deg, transparent 0 15px, #9d89dc20 16px, transparent 17px 29px);
}

.book-grid .book-image-wrap::after {
  width: 110px;
  height: 75px;
  left: -24px;
  bottom: -17px;
  border: 1px solid #8c72da30;
  border-radius: 50% 50% 0 0;
  transform: rotate(15deg);
  box-shadow: 18px -9px 0 -17px #8c72da55, 40px -18px 0 -35px #8c72da55;
}

.book-grid .book-image-wrap > a {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.book-grid .book-image {
  width: auto;
  max-width: 88%;
  height: 245px;
  object-fit: contain;
  padding: 0;
  border-radius: 5px;
  filter: drop-shadow(0 13px 10px #2a20502d);
}

.book-grid .book-content {
  padding: 1rem 1.1rem 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.book-grid .book-content h3 {
  font-size: 1.05rem;
  line-height: 1.55;
  order: 1;
}

.book-grid .book-author {
  order: 2;
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #8b8499;
}

.book-grid .book-content h3 a {
  color: inherit;
  text-decoration: none;
}

.book-grid .book-price {
  font-size: 1.05rem;
}

.book-grid .add-cart-btn {
  width: 100%;
  font-size: 0.84rem;
  padding: 0.58rem 0.8rem;
  border-radius: 10px;
}

.book-grid .book-content > .d-flex {
  order: 3;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding-top: 0.8rem !important;
  border-top: 1px solid #eeeaf7;
}

.book-grid .book-content > .d-flex form { width: 100%; }

.book-grid .heart-button {
  display: grid;
  place-items: center;
  opacity: 1;
  transform: none;
  cursor: pointer;
  pointer-events: auto;
  transition: 0.25s;
}

.book-card:hover .heart-button {
  opacity: 1;
  transform: none;
}

.back-link {
  color: #6a6480;
  font-weight: 700;
  text-decoration: none;
}

.book-detail-card {
  padding: 2.2rem;
  background: #fff;
  border: 1px solid #eeeaf4;
  border-radius: 28px;
  box-shadow: 0 15px 42px #242a5512;
}

.detail-cover {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.detail-cover img {
  width: auto;
  max-width: 100%;
  max-height: 500px;
  height: auto;
  display: block;
  object-fit: cover;
  padding: 0;
  filter: drop-shadow(0 16px 14px #17243d25);
  border-radius: 0;
}

.detail-category {
  display: inline-block;
  border-radius: 100px;
  background: #f0edff;
  color: var(--purple);
  padding: 0.36rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-author {
  color: #77718b;
  font-weight: 700;
}

.detail-description {
  color: #5e687d;
  line-height: 2.1;
  font-size: 1.02rem;
  max-width: 48rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.detail-meta span {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f8f8fc;
  color: #71798b;
  font-size: 0.85rem;
}

.detail-meta strong {
  display: block;
  color: var(--ink);
  margin-top: 0.15rem;
}

.detail-buy {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid #efedf4;
}

.detail-price {
  font-size: 1.7rem;
  color: var(--purple);
}

.detail-purchase {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 1px solid #e5e1ee;
  border-radius: 100px;
  background: #fff;
}

.quantity-control form {
  display: contents;
}

.quantity-control button,
.quantity-btn {
  border: 0;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #f2f0f8;
  color: var(--purple);
  font-size: 1.15rem;
  line-height: 1;
  transition: 0.2s;
}

.quantity-control button:hover,
.quantity-btn:hover {
  color: #fff;
  background: var(--purple);
  transform: scale(1.05);
}

.quantity-control strong,
.quantity-control output {
  min-width: 26px;
  text-align: center;
  font-family: "DM Sans", sans-serif;
  color: #17213b;
  font-weight: 700;
}

.quantity-control-large {
  padding: 0.35rem;
  gap: 0.3rem;
}

.quantity-control-large .quantity-btn {
  width: 35px;
  height: 35px;
}

.add-detail-btn {
  padding: 0.72rem 1.25rem;
  border-radius: 100px;
}

.stock-note {
  color: #25815a;
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 1rem;
}

.stock-note.out-of-stock { color:#dc3545; }
.add-detail-btn:disabled { background:#777b86; border-color:#777b86; cursor:not-allowed; opacity:.8; }
.auth-divider { display:flex; align-items:center; gap:.7rem; margin:1rem 0; color:#8c8b97; font-size:.85rem; }
.auth-divider::before, .auth-divider::after { content:""; height:1px; background:#dcd9e5; flex:1; }
.google-login-btn { width:100%; display:flex; align-items:center; justify-content:center; gap:.65rem; padding:.72rem 1rem; border:1px solid #d8d5e1; border-radius:100px; background:#fff; color:#272531; font-weight:700; }
.google-login-btn:hover { background:#f7f6fa; }
.google-login-btn svg { width:20px; height:20px; flex:none; }
.user-greeting { max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#5f5872; font-size:.88rem; font-weight:700; }

/* About page */
.about-hero { padding: 5.5rem 1rem; text-align: center; background: #f3efff; }
.about-hero span, .about-story .section-kicker, .about-faq .section-kicker { color: #ff6f61; font-weight: 800; }
.about-hero h1 { max-width: 980px; margin: 1.1rem auto 0; color: #27175f; font-size: clamp(1.7rem, 3vw, 2.65rem); font-weight: 800; line-height: 1.75; }
.about-story { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; padding-top: 5rem; padding-bottom: 4rem; }
.about-story-copy h2, .about-faq h2 { color: #27175f; font-size: 2rem; font-weight: 800; margin: .7rem 0 1.4rem; }
.about-story-copy p { color: #69627a; line-height: 2.1; margin-bottom: .8rem; }
.about-illustration { display: grid; place-items: center; min-height: 360px; border-radius: 34px; background: #f1ecff; overflow: hidden; }
.about-illustration svg { width: min(78%, 430px); }
.about-book-left { fill: #7357dc; }
.about-book-right { fill: #6042cf; }
.about-book-line { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: .75; }
.about-sun { fill: #ffca5a; }
.about-smile { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.about-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding-bottom: 5rem; }
.about-values article { padding: 2rem; border: 1px solid #e7e0f7; border-radius: 24px; background: #fff; }
.value-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 1.2rem; border-radius: 16px; color: #fff; font-size: 1.45rem; font-weight: 800; }
.value-safe { background: #ffc857; color: #604700; }
.value-age { background: #ff6f61; }
.value-print { background: #6c4ee3; }
.about-values h3 { color: #27175f; font-size: 1.1rem; font-weight: 800; }
.about-values p { color: #726b82; line-height: 1.8; margin: .6rem 0 0; }
.about-faq { max-width: 900px; padding-bottom: 5rem; text-align: center; }
.faq-list { margin-top: 2rem; text-align: right; }
.faq-list details { border-bottom: 1px solid #e7e0f2; }
.faq-list summary { position: relative; padding: 1.35rem 0 1.35rem 2rem; color: #27175f; font-weight: 800; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; left: .2rem; color: #ff6f61; font-size: 1.3rem; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { color: #746d84; line-height: 1.9; padding: 0 0 1.25rem; margin: 0; }
.about-contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 5rem; padding: 2.2rem; border-radius: 28px; background: #6c4ee3; color: #fff; text-align: center; }
.about-contact div { display: flex; flex-direction: column; gap: .45rem; }
.about-contact small { color: #ded6ff; }
.about-contact a, .about-contact strong { color: #fff; text-decoration: none; font-weight: 800; }

@media (max-width: 767px) {
  .about-hero { padding: 3.2rem 1rem; }
  .about-story { grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem; }
  .about-illustration { min-height: 280px; }
  .about-values { grid-template-columns: 1fr; padding-bottom: 3.5rem; }
  .about-contact { grid-template-columns: 1fr 1fr; padding: 1.5rem; }
}

.coupon-entry { display:flex; gap:.5rem; margin:1rem 0 .4rem; }
.coupon-entry .form-control { min-width:0; border-color:#ded8eb; }
.coupon-remove { border:0; background:transparent; color:#b14250; font-size:.78rem; text-decoration:underline; }
.discount-row { color:#168057; }

.policies-hero { padding:4.5rem 1rem; background:#f3efff; text-align:center; }
.policies-hero h1 { color:#27175f; font-weight:800; margin:.7rem 0; }
.policies-hero p { color:#706981; margin:0; }
.policies-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1.25rem; padding-top:4rem; padding-bottom:5rem; }
.policies-grid article { padding:2rem; border:1px solid #e8e1f3; border-radius:22px; background:#fff; }
.policies-grid article>span { color:#6c4ee3; font-weight:800; }
.policies-grid h2 { color:#27175f; font-size:1.25rem; font-weight:800; margin:.6rem 0 1rem; }
.policies-grid p { color:#6f687e; line-height:2; margin:0; }
.policies-grid a { color:#6c4ee3; font-weight:800; }
.coupon-entry { display:flex; gap:.5rem; margin:1rem 0 .4rem; }
.coupon-entry .form-control { min-width:0; border-color:#ded8eb; }
.coupon-remove { border:0; background:transparent; color:#b14250; font-size:.78rem; text-decoration:underline; }
.discount-row { color:#168057; }
@media(max-width:575px){.policies-grid{grid-template-columns:1fr;padding-top:2.5rem}}

.auth-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 9999;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(4px);
}

.auth-dialog {
  position: relative;
  z-index: 10;
  width: min(100%, 480px);
  padding: 2.4rem;
  background: #ffffff;
  border-radius: 16px;
  animation: dialog-in 0.35s ease-out both;
}

.auth-dialog .form-control {
  background-color: #ffffff !important;
  border: 1.5px solid #b8b3c8 !important; 
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: #24212b;
}

.auth-dialog .form-control:focus {
  border-color: #6f42c1 !important;
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15) !important;
  outline: none;
}

.auth-close {
  position: absolute;
  left: 1.3rem;
  top: 1.15rem;
  color: #918ca0;
  text-decoration: none;
  font-size: 1.7rem;
  line-height: 1;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.8rem;
  color: #24212b;
  line-height: 1;
}

.auth-brand span {
  font-size: 1.45rem;
  font-weight: 800;
}

.auth-brand small {
  font-family: "DM Sans", sans-serif;
  color: #97909b;
  margin-top: 0.3rem;
}

.auth-dialog h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.25rem 0;
}

.auth-intro {
  color: #6d7586;
  margin: 0 0 1.4rem;
}

.password-rules { background:#f3f0fc; color:#292044; border-radius:10px; padding:1rem; line-height:1.7; }
.password-visibility { display:flex!important; align-items:center; gap:.5rem; cursor:pointer; }
.password-visibility input { width:1rem; height:1rem; }
html[data-theme="dark"] .password-rules { background:#292d3a; color:#f4f2fa; }
html[data-theme="dark"] .auth-intro { color:#c3c6d2; }

.auth-dialog label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.95rem 0 0.42rem;
}

.auth-dialog .field-validation-error {
  display: block;
  margin-top: 0.3rem;
}

.auth-submit {
  padding: 0.78rem;
  margin-top: 1.5rem;
  border-radius: 100px;
}

.auth-switch {
  text-align: center;
  color: #687185;
  margin: 1.3rem 0 0;
}

.auth-switch a {
  color: var(--purple);
  font-weight: 800;
  text-decoration: none;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.checkout-form .form-control {
  border: 1px solid #333333 !important;
  background-color: #ffffff !important;
  border-radius: 10px !important;
  color: #000000 !important;
  padding: 12px 15px !important;
}

.checkout-form .form-control:focus {
  border-color: #6f42c1 !important;
  box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25) !important;
  outline: none !important;
}
.showcase-book {
  width: 185px;
  height: 265px;
  background: #fff;
  border-radius: 0px; /* زوايا حادة 100% بدون أي انحناء */
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.593);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  flex-shrink: 0;
}
.site-footer {
  margin-top: 4rem;
  background: #6c4ee3;
  color: #e4dfff;
  font-size: 0.82rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 3rem;
  padding-block: 2.5rem 2.2rem;
}

.site-footer h3 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.site-footer a,
.site-footer span {
  display: block;
  width: fit-content;
  margin-bottom: 0.42rem;
  color: #e4dfff;
  text-decoration: none;
}

.site-footer a:hover { color: #fff; }
.footer-brand strong { display: block; color: #fff; font-size: 1.45rem; }
.footer-brand small { display: block; color: #fff; margin-bottom: 0.8rem; }
.footer-brand p { max-width: 290px; margin: 0; line-height: 1.9; }
.footer-socials { display: flex; justify-content: flex-start; gap: 0.55rem; margin-bottom: 1rem; direction: rtl; }
.footer-socials a { width: 36px; height: 36px; margin: 0; display: grid; place-items: center; border: 1px solid #ffffff70; border-radius: 50%; color: #fff; }
.footer-socials svg { width: 20px; height: 20px; fill: currentColor; }
.footer-socials .facebook { background: #1877f2; border-color: #1877f2; }
.footer-socials .instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #df3484 45%, #7024c4 90%); border: 0; }
.footer-socials .instagram svg { fill: none; stroke: currentColor; stroke-width: 2; }
.footer-socials .instagram .instagram-dot { fill: currentColor; stroke: none; }
.footer-socials .whatsapp { background: #25d366; border-color: #25d366; }
.site-footer .hours-title { margin-top: 1rem; margin-bottom: 0.35rem; }
.footer-bottom { padding: 1rem; border-top: 1px solid #ffffff26; text-align: center; color: #ddd6ff; font-size: 0.75rem; }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; padding-block: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
.store-benefits { background: #fff; }
.benefit-item { display: flex; justify-content: center; align-items: center; gap: 0.8rem; }
.benefit-item > span { font-size: 1.7rem; }
.benefit-item h3 { margin: 0 0 0.15rem; font-size: 0.95rem; font-weight: 800; }
.benefit-item p { margin: 0; color: #817b91; font-size: 0.78rem; }
.category-browser { background: #faf9ff; }
.category-browser h2 { margin-top: 0.35rem; font-weight: 800; }
.category-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.7rem; max-width: 900px; margin-inline: auto; }
.category-links .category-card { min-width: 180px; min-height: 62px; padding: 0.9rem 1.5rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; border: 1px solid #bdaaf5; border-radius: 14px; background: #fff; color: #241a3a; text-decoration: none; box-shadow: 0 5px 16px #37266b0a; transition: 0.2s ease; }
.category-links .category-card:hover { color: #fff; background: #6c4ee3; border-color: #6c4ee3; transform: translateY(-2px); box-shadow: 0 10px 22px #6c4ee32e; }
.category-mark { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: hsl(var(--category-hue) 70% 54%); }
.category-name { font-size: 1.02rem; font-weight: 800; }
.category-card:hover .category-mark { background: #fff; }
.floating-whatsapp { position: fixed; z-index: 50; right: 1.35rem; bottom: 1.35rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 28px #163b2670; transition: transform 0.2s ease; }
.floating-whatsapp:hover { color: #fff; transform: translateY(-3px) scale(1.04); }
.floating-whatsapp svg { width: 31px; height: 31px; fill: currentColor; }

/* Global dark theme */
.theme-toggle { width:40px; height:40px; display:grid; place-items:center; border:1px solid #e4dfed; border-radius:50%; background:#f8f7fb; color:#453b61; font-size:1.15rem; cursor:pointer; }
.theme-toggle .theme-sun { display:none; }
.theme-toggle .theme-moon { display:block; }
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme="dark"] .theme-toggle .theme-sun { display:block; }
html[data-theme="dark"] .theme-toggle .theme-moon { display:none; }
html[data-theme="dark"] body { background:#11131a; color:#ececf3; }
html[data-theme="dark"] .site-header { background:#171922ed; border-color:#2d3040; }
html[data-theme="dark"] .brand-tagline { color:#eee; }
html[data-theme="dark"] .nav-link { color:#c5c7d2; }
html[data-theme="dark"] .navbar-toggler { background:#eee; }
html[data-theme="dark"] .theme-toggle, html[data-theme="dark"] .btn-light, html[data-theme="dark"] .account-link { background:#252835; border-color:#3a3e50; color:#f2f2f7; }
html[data-theme="dark"] .hero-section { background:linear-gradient(115deg,#171923,#1b172a); }
html[data-theme="dark"] .hero-section h1, html[data-theme="dark"] .page-title, html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3 { color:#f4f1ff; }
html[data-theme="dark"] .lead, html[data-theme="dark"] .text-muted, html[data-theme="dark"] .text-secondary { color:#adb0bf!important; }
html[data-theme="dark"] .catalogue-section, html[data-theme="dark"] .category-browser, html[data-theme="dark"] .store-benefits { background:#141620; }
html[data-theme="dark"] .book-card, html[data-theme="dark"] .category-links .category-card, html[data-theme="dark"] .form-card, html[data-theme="dark"] .book-detail-card, html[data-theme="dark"] .cart-list, html[data-theme="dark"] .order-summary, html[data-theme="dark"] .checkout-form, html[data-theme="dark"] .empty-state, html[data-theme="dark"] .about-values article, html[data-theme="dark"] .policies-grid article { background:#1c1f2a; border-color:#313545; color:#ececf3; box-shadow:0 10px 30px #0005; }
html[data-theme="dark"] .book-grid .book-image-wrap { background:radial-gradient(circle at 50% 42%,#313341 0 18%,#272836 48%,#1d1f2b 100%); }
html[data-theme="dark"] .book-content h3 a, html[data-theme="dark"] .category-links .category-card { color:#f3f0ff; }
html[data-theme="dark"] .book-author, html[data-theme="dark"] .benefit-item p, html[data-theme="dark"] .book-card p, html[data-theme="dark"] .order-summary p { color:#aaaebe; }
html[data-theme="dark"] .order-summary.bg-white { background:#1c1f2a!important; color:#ececf3; }
html[data-theme="dark"] .order-summary .text-dark { color:#f4f1ff!important; }
html[data-theme="dark"] .order-summary .text-muted, html[data-theme="dark"] .order-summary .text-secondary { color:#c3c6d2!important; }
html[data-theme="dark"] .order-summary .bg-light { background:#292d3a!important; color:#ececf3!important; }
html[data-theme="dark"] .order-summary .bg-light > div, html[data-theme="dark"] .order-summary .bg-light strong { color:#e8e9f2; }
html[data-theme="dark"] .order-summary .bg-light .text-primary, html[data-theme="dark"] .order-summary .bg-light .text-primary * { color:#a99aff!important; }
html[data-theme="dark"] .order-summary .border-bottom, html[data-theme="dark"] .order-summary .border-bottom-subtle { border-color:#3a3e4d!important; }
html[data-theme="dark"] .checkout-summary-total { border-color:#3a3e4d; }
html[data-theme="dark"] .books-filter-panel, html[data-theme="dark"] .orders-filter, html[data-theme="dark"] .inventory-filter { background:#1b1e29; border-color:#343849; }
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select, html[data-theme="dark"] textarea { background-color:#242733!important; border-color:#414658!important; color:#f1f1f5!important; }
html[data-theme="dark"] .form-control::placeholder, html[data-theme="dark"] textarea::placeholder { color:#858998; }
html[data-theme="dark"] .locked-email { background:#1b1d26!important; color:#aeb1bd!important; }
html[data-theme="dark"] .detail-meta span, html[data-theme="dark"] .checkout-note, html[data-theme="dark"] .bg-light { background:#252834!important; color:#bdc0cb!important; }
html[data-theme="dark"] .detail-meta strong, html[data-theme="dark"] .cart-row h3, html[data-theme="dark"] .checkout-form label { color:#f0eef7; }
html[data-theme="dark"] .quantity-control { background:#f7f5fb; border-color:#d7d2e2; }
html[data-theme="dark"] .quantity-control output { color:#17213b!important; }
html[data-theme="dark"] .cart-row, html[data-theme="dark"] .detail-buy { border-color:#343746; }
html[data-theme="dark"] .about-hero, html[data-theme="dark"] .policies-hero { background:#211c35; }
html[data-theme="dark"] .about-story-copy p, html[data-theme="dark"] .about-values p, html[data-theme="dark"] .faq-list p, html[data-theme="dark"] .policies-grid p { color:#b2afbd; }
html[data-theme="dark"] .about-illustration { background:#29233d; }
html[data-theme="dark"] .faq-list details { border-color:#353243; }
html[data-theme="dark"] .faq-list summary { color:#efebff; }
html[data-theme="dark"] .auth-dialog { background:#1d202a; color:#eee; }
html[data-theme="dark"] .auth-dialog h1, html[data-theme="dark"] .auth-brand { color:#f4f2fa; }
html[data-theme="dark"] .auth-divider::before, html[data-theme="dark"] .auth-divider::after { background:#3b3f50; }
html[data-theme="dark"] .google-login-btn { background:#272a36; border-color:#454959; color:#f4f2fa; }
html[data-theme="dark"] .user-greeting { color:#d8d5e2; }
html[data-theme="dark"] .reading-banner { background:#27233a; border-color:#3b3552; }
html[data-theme="dark"] .pagination .page-link { background:#20232e; border-color:#383c4c; color:#d8d4eb; }
html[data-theme="dark"] .pagination .active .page-link { background:#6c4ee3; border-color:#6c4ee3; color:#fff; }
html[data-theme="dark"] .books-empty-state { background:#1b1e29; color:#aaaebe; }
html[data-theme="dark"] .navbar-collapse.show { background:#1b1e29; border-color:#343849; }
html[data-theme="dark"] .benefit-item h3 { color:#f4f1ff!important; }
html[data-theme="dark"] .benefit-item p { color:#c2c5d1!important; }
html[data-theme="dark"] .favorites-empty { background:#1c1f2a!important; border-color:#44405b; color:#f2efff; box-shadow:0 10px 30px #0004; }
html[data-theme="dark"] .favorites-empty h2 { color:#f4f1ff!important; }
html[data-theme="dark"] .favorites-empty p { color:#b8bbc8!important; }
html[data-theme="dark"] .favorites-empty>div { color:#9b86f1; }
html[data-theme="dark"] .text-dark { color:#f4f1ff!important; }
html[data-theme="dark"] .book-stack { border-color:#ffffffd6; box-shadow:0 20px 45px #0009,0 0 24px #7c63e84d,inset -10px 0 0 #ffffff20; filter:saturate(1.2) brightness(1.16); }
html[data-theme="dark"] .login-cover { border-color:#eee9ff; box-shadow:0 22px 48px #000b,0 0 25px #6c4ee355; filter:brightness(1.08); }
