:root {
  --bg: #f6f8fc;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fbff;
  --text: #1b2430;
  --muted: #526273;
  --line: #d8e2ee;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent2: #1d4ed8;
  --gold: #d97706;
  --ok: #047857;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 16px 40px rgba(28, 53, 87, 0.14);
  --shadow-sm: 0 8px 24px rgba(28, 53, 87, 0.1);
  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1100px 540px at 8% -10%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(900px 480px at 100% 0%, rgba(14, 165, 233, 0.08), transparent), var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  font-size: 1.02rem;
}

html[dir="rtl"] .main,
html[dir="rtl"] .main p,
html[dir="rtl"] .main h1,
html[dir="rtl"] .main h2,
html[dir="rtl"] .main h3,
html[dir="rtl"] .main li,
html[dir="rtl"] .main label {
  text-align: right;
}

html[dir="rtl"] .main p,
html[dir="rtl"] .main li,
html[dir="rtl"] .desc,
html[dir="rtl"] .promo-cap,
html[dir="rtl"] .feature p,
html[dir="rtl"] .hero-lead,
html[dir="rtl"] .hero-tagline {
  padding-inline-end: 12px;
  padding-inline-start: 12px;
  overflow-wrap: anywhere;
}

html[dir="rtl"] .card-body,
html[dir="rtl"] .feature,
html[dir="rtl"] .thankyou-summary,
html[dir="rtl"] .checkout-summary {
  text-align: right;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 20px;
}

.main {
  padding: 28px 0 56px;
}

/* ——— Top bar ——— */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #eef4ff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: normal;
  max-width: min(52vw, 420px);
}

.nav {
  display: flex;
  gap: 8px 18px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-inline-start: 4px;
  vertical-align: middle;
}

/* ——— Hero ——— */
.hero {
  margin: 0 0 28px;
  padding: 36px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(255, 255, 255, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

.hero-chip {
  display: inline-flex;
  margin-bottom: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.hero p {
  margin: 0 0 22px;
  color: #1e293b;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-lead {
  font-weight: 600;
  color: #0f172a !important;
}

.hero-media {
  position: relative;
  min-height: 240px;
}

.hero-book {
  position: absolute;
  border-radius: 14px;
  border: 1px solid #cfe0f2;
  background: #fff;
  box-shadow: 0 14px 30px rgba(30, 64, 175, 0.18);
  object-fit: contain;
}

.hero-book-main {
  width: min(100%, 250px);
  inset-inline-start: 40px;
  top: 10px;
  transform: rotate(-5deg);
}

.hero-book-alt {
  width: min(100%, 220px);
  inset-inline-start: 130px;
  top: 62px;
  transform: rotate(8deg);
}

/* ——— Trust strip ——— */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  color: #1f2a37;
  font-size: 0.92rem;
}

.trust-item strong {
  color: #0f172a;
  font-weight: 700;
  margin-inline-end: 6px;
  font-size: 1.05rem;
}

.trust-item-0 {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.trust-item-1 {
  background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.trust-item-2 {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.trust-item-3 {
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

/* ——— Promo banners ——— */
.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--text);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.promo-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.promo-card img {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f8fbff;
  padding: 8px;
}

.promo-cap {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #334155;
  font-weight: 600;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, #f8fbff, #fff7ed);
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  flex-shrink: 0;
}

/* ——— Features ——— */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.feature {
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
}

.feature p {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
}

/* ——— Catalog ——— */
.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.catalog-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.catalog-head span {
  color: var(--muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(59, 130, 246, 0.25);
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  background: #f5f8fd;
  padding: 14px;
  transition: transform 0.35s ease;
}

.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-body h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.desc {
  margin: 0;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.55;
  flex: 1;
}

.price {
  color: #0b7a75;
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(90deg, #ecfeff, #eef2ff);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  transition: background 0.15s ease, transform 0.12s ease;
  min-height: 44px;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--accent-soft);
  text-decoration: none;
}

.btn-danger {
  background: var(--danger);
  color: #1a0a0a;
}

/* ——— Forms ——— */
.form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form .row {
  margin-bottom: 15px;
}

.hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 14px;
}

.alert {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.alert-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #991b1b;
}

.alert-ok {
  background: rgba(4, 120, 87, 0.1);
  border: 1px solid rgba(4, 120, 87, 0.2);
  color: #065f46;
}

/* ——— Tables ——— */
table.wide {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

table.wide th,
table.wide td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

table.wide th {
  background: #f3f7fe;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

/* ——— Footer ——— */
.foot {
  margin-top: auto;
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.06));
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  text-align: right;
}

.foot-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.foot h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.foot p,
.foot a {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.foot a {
  color: var(--accent);
}

.foot-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.foot-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #cfe0f5;
  background: #f8fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none !important;
}

.foot-icon-btn:hover {
  background: #eaf2ff;
}

.foot-muted {
  color: #64748b !important;
  font-size: 0.82rem !important;
}

.foot-check {
  color: #16a34a;
  font-weight: 700;
}

.foot-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #7d8a99;
  font-size: 0.85rem;
}

/* ——— Admin ——— */
.admin-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #1e2836;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill:hover {
  color: var(--text);
  text-decoration: none;
  border-color: rgba(59, 130, 246, 0.35);
}

.pill-new {
  background: rgba(59, 130, 246, 0.12);
}
.pill-processing {
  background: rgba(240, 193, 75, 0.1);
}
.pill-done {
  background: rgba(52, 211, 153, 0.1);
}
.pill-cancelled {
  background: rgba(248, 113, 113, 0.1);
}

/* ——— Info / prose ——— */
.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.prose p {
  color: #3f4f61;
}

/* ——— Admin orders list ——— */
.admin-orders-scroll {
  overflow-x: auto;
  margin-bottom: 24px;
}

.admin-orders-table {
  min-width: 1100px;
}

.admin-orders-table th,
.admin-orders-table td {
  font-size: 0.85rem;
  vertical-align: middle;
}

.admin-mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
}

.admin-ua {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ref {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-date {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-inline-form {
  display: inline;
  margin: 0;
}

.admin-act-btn {
  padding: 6px 10px !important;
  font-size: 0.8rem !important;
}

.admin-status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-st-new {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
.admin-st-processing {
  background: rgba(240, 193, 75, 0.15);
  color: #fcd34d;
}
.admin-st-done {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}
.admin-st-cancelled {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.admin-subh {
  margin: 24px 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.admin-ua-full {
  font-size: 0.78rem;
  word-break: break-word;
}

.admin-break {
  word-break: break-all;
  font-size: 0.82rem;
}

/* ——— Checkout summary ——— */
.checkout-summary {
  margin-bottom: 28px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.checkout-summary-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
}

.checkout-summary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-summary-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.checkout-summary-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.checkout-summary-thumb {
  width: 48px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.checkout-summary-thumb--ph {
  background: #0a0d12;
}

.checkout-summary-main {
  flex: 1;
  min-width: 0;
}

.checkout-summary-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.checkout-summary-detail {
  font-size: 0.88rem;
  color: var(--muted);
}

.checkout-summary-sub {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  white-space: nowrap;
}

.checkout-summary-total {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.checkout-summary-total-label {
  color: var(--muted);
  font-weight: 600;
}

.checkout-summary-total-val {
  font-size: 1.35rem;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.checkout-form-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ——— Cart page ——— */
.cart-page {
  max-width: 920px;
}

.cart-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
}

.cart-intro {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
  max-width: 52rem;
}

.cart-empty-msg {
  color: var(--muted);
  font-size: 1.02rem;
}

.cart-table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.cart-table.wide {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.cart-table .cart-col-product {
  min-width: 200px;
}

.cart-table .cart-col-unit,
.cart-table .cart-col-line {
  white-space: nowrap;
}

.cart-table .cart-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1e293b;
}

.cart-product-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
}

.cart-thumb {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0d12;
  flex-shrink: 0;
}

.cart-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 6px;
  line-height: 1.3;
}

.cart-product-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}

.cart-qty-input {
  width: 88px !important;
  padding: 10px 12px !important;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem !important;
}

.cart-qty-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cart-stock-warn {
  display: block;
  margin-top: 8px;
  color: var(--danger);
  font-size: 0.82rem;
}

.cart-qty-hint {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.82rem;
}

.cart-remove-btn {
  padding: 8px 12px !important;
  font-size: 0.88rem !important;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.cart-grand-wrap {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.cart-grand {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cart-grand-label {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.cart-grand-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.cart-grand-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 520px) {
  .hero {
    padding: 26px 18px;
  }
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero-media {
    min-height: 180px;
    margin-top: 8px;
  }
  .hero-book-main {
    width: 150px;
    inset-inline-start: 24px;
  }
  .hero-book-alt {
    width: 136px;
    inset-inline-start: 128px;
    top: 46px;
  }
  .brand {
    font-size: 0.95rem;
  }
  .cart-product-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.product-text-only {
  max-width: 72rem;
  margin: 0 auto;
}

.product-text-only-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.35;
}

.product-text-only-body {
  color: #0f172a;
  line-height: 1.75;
  font-size: 1.05rem;
}

.product-text-only-back {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.product-text-only-back a {
  color: var(--accent);
  font-weight: 600;
}

.hero-tagline {
  font-weight: 700;
  color: #1e3a8a !important;
}

.delivery-badge {
  margin: -4px 0 18px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed #f59e0b;
  background: #fff8e8;
  color: #92400e;
  font-weight: 700;
}

.card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.card-image-link {
  display: block;
  overflow: hidden;
}

.card-image-link:hover .card-img {
  transform: scale(1.035);
}

.product-link {
  font-size: 0.93rem;
  font-weight: 700;
}

.card-delivery-note {
  margin: 0;
  color: #92400e;
  font-size: 0.88rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 8px 10px;
}

.card-buy-form {
  display: flex;
  margin-top: auto;
}

.card-qty-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-qty-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.card-btn {
  width: 100%;
}

.product-page-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.product-page-store {
  direction: rtl;
}

.product-store-main {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.product-store-buybox {
  position: sticky;
  top: 88px;
  border: 2px dashed #c8b9ff;
  border-radius: 14px;
  background: #fcfbff;
  box-shadow: 0 12px 32px rgba(33, 26, 74, 0.12);
  padding: 16px;
}

.product-store-price-row {
  margin: 8px 0 10px;
}

.product-order-cta {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(180deg, #5d3ff2, #4b2be2);
  box-shadow: 0 8px 18px rgba(93, 63, 242, 0.35);
  animation: orderPulse 2s ease-in-out infinite;
}

.product-order-cta.is-loading {
  opacity: 0.88;
  transform: scale(0.99);
}

.product-store-secure-note {
  margin: 8px 0 0;
  color: #526273;
  font-size: 0.86rem;
  text-align: center;
}

.product-store-details {
  margin-top: 18px;
  border: 1px solid #e4ecf8;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
}

.product-inline-checkout {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-inline-checkout-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
  color: #1e293b;
  text-align: center;
}

.product-inline-checkout-form {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #d8d2fb;
  border-radius: 10px;
  padding: 12px 10px;
}

.product-inline-checkout-form .row {
  margin-bottom: 8px;
}

.product-inline-checkout-form label {
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}

.product-inline-checkout-form input,
.product-inline-checkout-form textarea {
  border: 1px solid #d6d2ea;
  background: #fff;
  border-radius: 6px;
  min-height: 40px;
  font-size: 0.95rem;
}

.product-inline-checkout-submit {
  margin-top: 6px;
}

@keyframes orderPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(93, 63, 242, 0.35);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(93, 63, 242, 0.42);
  }
}

.product-page-audience {
  margin: 0 0 18px;
  color: #1d4ed8;
  font-weight: 700;
}

.product-page-main {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}

.product-page-media {
  display: grid;
  gap: 12px;
}

.product-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.product-cover {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: contain;
  max-height: 460px;
  background: #f5f8fd;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #1e293b;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-prev {
  right: 10px;
}

.carousel-next {
  left: 10px;
}

.product-carousel-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
}

.carousel-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  cursor: pointer;
}

.carousel-thumb img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.carousel-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.product-cover-placeholder {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #f3f6fb;
}

.product-video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.product-video-wrap-facebook {
  max-width: 360px;
  margin: 0 auto;
  padding-top: 640px;
  height: 0;
}

.product-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.product-video-section {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.product-video-section h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.product-video-btn {
  width: 100%;
}

.product-price-box {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff 58%, #fff7ed);
  border: 1px solid #93c5fd;
  display: grid;
  gap: 8px;
}

.product-price-label {
  color: #0f172a;
  font-weight: 700;
}

.product-price-value {
  color: #075985;
  font-size: 2.2rem;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.product-delivery-note {
  color: #b45309;
  font-weight: 700;
}

.product-price-cta {
  margin-top: 4px;
}

.product-empty-desc {
  color: var(--muted);
}

.product-highlights {
  margin: 14px 0 18px;
  padding-inline-start: 18px;
}

.product-highlights li {
  margin-bottom: 8px;
}

.product-buy-form {
  display: none;
}

.product-gallery {
  margin-top: 22px;
}

.product-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.product-gallery-grid img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fbff;
  cursor: zoom-in;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-cover:hover,
.product-gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-img {
  max-width: min(96vw, 1300px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.image-lightbox-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.thankyou-page {
  max-width: 900px;
  margin: 0 auto;
  text-align: right;
}

.thankyou-checkout-style {
  max-width: 760px;
  direction: rtl;
}

.thankyou-card {
  background: #fff;
  border: 1px solid #dbe4f4;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(20, 45, 74, 0.1);
  padding: 24px;
}

.thankyou-card-title {
  text-align: center;
  margin: 0 0 6px;
  color: #27364d;
  font-size: 2rem;
}

.thankyou-card-subtitle {
  text-align: center;
  margin: 0 0 18px;
  color: #64748b;
}

.thankyou-invoice {
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin: 16px 0;
}

.thankyou-invoice-head,
.thankyou-invoice-line {
  display: grid;
  grid-template-columns: 1.7fr 0.5fr 0.8fr;
  gap: 10px;
  align-items: center;
  padding: 12px 4px;
}

.thankyou-invoice-head {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.thankyou-invoice-line {
  border-top: 1px solid #edf2f7;
  color: #1e293b;
}

.thankyou-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.thankyou-item-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid #dbe4f4;
  object-fit: cover;
  background: #f8fbff;
  flex-shrink: 0;
}

.thankyou-item-thumb-ph {
  display: inline-block;
  background: #eef2f7;
}

.thankyou-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #1e293b;
}

.thankyou-item-text small {
  color: #64748b;
  font-size: 0.8rem;
}

.thankyou-totals {
  margin-top: 10px;
}

.thankyou-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: #374151;
}

.thankyou-totals .is-grand {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1f2f46;
}

.thankyou-actions-center {
  justify-content: center;
  margin-top: 20px;
}

.thankyou-home-btn {
  min-width: 250px;
  background: linear-gradient(180deg, #5d3ff2, #4b2be2);
}

.thankyou-hero {
  padding: 22px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
  border: 1px solid #bfdbfe;
  margin-bottom: 16px;
}

.thankyou-hero-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 8px;
}

.thankyou-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.thankyou-hero p {
  margin: 0;
  color: #334155;
}

.thankyou-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.thankyou-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #dbe7f3;
}

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

.thankyou-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.thankyou-steps article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.thankyou-steps h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.thankyou-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.thankyou-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 700px) {
  html[dir="rtl"] .main {
    padding-inline: 8px;
  }

  .top-inner {
    justify-content: center;
    text-align: center;
  }

  .brand-wrap {
    width: 100%;
    justify-content: center;
  }

  .brand {
    max-width: 100%;
    text-align: center;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 10px 16px;
  }

  .wrap {
    padding: 0 14px;
  }

  .main {
    padding: 20px 0 40px;
  }

  .hero,
  .feature,
  .card,
  .checkout-summary,
  .thankyou-hero,
  .thankyou-summary,
  .product-video-section,
  .product-gallery,
  .cart-grand-wrap {
    margin-inline: auto;
  }

  .hero-inner,
  .card-body,
  .feature,
  .promo-cap,
  .thankyou-page,
  .checkout-summary,
  .product-page-content,
  .product-text-only-body {
    text-align: center !important;
  }

  .hero h1,
  .hero p,
  .desc,
  .feature p,
  .product-text-only-body,
  .cart-intro,
  .checkout-form-note {
    padding-inline: 14px !important;
  }

  .form {
    max-width: 100% !important;
    margin-inline: auto;
    padding-inline: 8px;
  }

  .form input,
  .form select,
  .form textarea {
    text-align: center;
  }

  .card-img,
  .promo-card img,
  .product-cover,
  .product-gallery-grid img,
  .checkout-summary-thumb,
  .cart-thumb {
    margin-inline: auto;
    display: block;
  }

  .cart-product-inner {
    align-items: center;
    text-align: center;
  }

  .catalog-head,
  .checkout-summary-total,
  .cart-grand {
    justify-content: center;
    text-align: center;
  }

  .checkout-summary,
  .cart-page,
  .thankyou-page,
  .product-page,
  .product-video-section,
  .product-gallery {
    margin-inline: 8px !important;
  }

  .product-highlights {
    padding-inline: 18px;
    text-align: right;
  }

  .grid {
    grid-template-columns: 1fr;
  }
  .card-buy-form,
  .product-buy-form {
    display: block;
  }
  .product-page-main {
    grid-template-columns: 1fr;
  }
  .product-store-main {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .product-store-buybox {
    position: static;
    top: auto;
    padding: 16px;
  }
  .product-store-details {
    padding: 14px;
  }
  .product-inline-checkout {
    padding: 12px;
  }
  .product-inline-checkout-form {
    padding: 12px 10px;
  }
  .thankyou-card {
    padding: 16px;
  }
  .thankyou-card-title {
    font-size: 1.5rem;
  }
  .thankyou-invoice-head,
  .thankyou-invoice-line {
    grid-template-columns: 1fr;
    text-align: right;
    gap: 6px;
    padding: 10px 0;
  }
  .thankyou-item-main {
    justify-content: flex-start;
  }
  .thankyou-totals .is-grand {
    font-size: 1.2rem;
  }
  .btn {
    width: 100%;
  }
  .product-video-wrap-facebook {
    max-width: 290px;
    padding-top: 515px;
  }
  .thankyou-actions .btn {
    width: 100%;
  }

  .foot-grid {
    text-align: center;
  }

  .foot-icons {
    justify-content: center;
  }
}
