/* JoyStore storefront design system */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --soft: #f3efe9;
  --ink: #1c1a1f;
  --muted: #6e6a73;
  --line: #e8e2da;
  --accent: #6d4fa3;
  --accent-ink: #ffffff;
  --accent-soft: #efe9f8;
  --sale: #b4432d;
  --success: #2f7d55;
  --warning: #b7791f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 34px rgba(28, 26, 31, .08);
  --font-body: "Inter", "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

html { font-size: 15px; scroll-behavior: smooth; }
@media (min-width: 992px) { html { font-size: 16px; } }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
:lang(ar), [dir="rtl"] { font-family: "Cairo", var(--font-body); }
.ar { font-family: "Cairo", var(--font-body); direction: rtl; unicode-bidi: plaintext; }
.container-xl { max-width: 1320px; }
.section { padding: 64px 0; }
.section-sm { padding: 36px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.display-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 6px 0 0; }
.link-arrow { text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.text-muted-2 { color: var(--muted) !important; }

/* Buttons & forms */
.btn { border-radius: 999px; font-weight: 600; padding: .62rem 1.35rem; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus { background: #000; color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-accent:hover { background: #5a3f8c; color: #fff; }
.btn-outline-ink { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline-ink:hover { background: var(--ink); color: #fff; }
.btn-light-soft { background: var(--soft); border: 1px solid var(--line); color: var(--ink); }
.btn-lg { padding: .85rem 1.8rem; }
.btn-icon { width: 42px; height: 42px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .7rem .9rem; background-color: #fff; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(109, 79, 163, .15); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-label { font-weight: 600; font-size: .86rem; margin-bottom: .35rem; }
.field-validation-error, .text-danger { color: var(--sale) !important; font-size: .82rem; }
.input-validation-error { border-color: var(--sale) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden-focusable:focus { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* Announcement + header */
.announcement { background: var(--ink); color: #f4efe8; font-size: .8rem; text-align: center; padding: 8px 12px; letter-spacing: .03em; }
.site-header { background: rgba(250, 248, 245, .94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.header-row { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.brand { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; text-decoration: none; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.brand img { max-height: 40px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .93rem; }
.main-nav a:hover, .main-nav a.active { background: var(--soft); color: var(--ink); }
.header-search { flex: 1; max-width: 380px; margin-inline-start: auto; position: relative; }
.header-search input { border-radius: 999px; padding-inline-start: 40px; background: #fff; }
.header-search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-link { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; color: var(--ink); background: transparent; border: 0; }
.icon-link:hover { background: var(--soft); color: var(--ink); }
.cart-badge { position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.cart-badge.bump { animation: bump .4s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }
.mobile-toggle { display: none; }
@media (max-width: 991.98px) {
  .main-nav, .header-search.desktop { display: none; }
  .mobile-toggle { display: grid; }
  .header-row { gap: 10px; }
  .brand { font-size: 1.4rem; }
  .header-actions { margin-inline-start: auto; }
}
.offcanvas-nav a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 1.05rem; }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #efe7dc 0%, #f4eef7 55%, #e9e2f3 100%); border-radius: 0 0 28px 28px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; min-height: 560px; padding: 56px 0; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.04; letter-spacing: -.02em; margin: 14px 0 18px; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero p.lead { color: var(--muted); max-width: 470px; font-size: 1.08rem; }
.hero-visual { position: relative; height: 480px; }
.hero-card { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-card.one { width: 58%; height: 86%; inset-inline-start: 4%; top: 6%; transform: rotate(-3deg); }
.hero-card.two { width: 48%; height: 64%; inset-inline-end: 2%; bottom: 2%; transform: rotate(4deg); }
.hero-chip { position: absolute; inset-inline-start: 50%; top: 10%; background: #fff; border-radius: 999px; padding: 10px 16px; box-shadow: var(--shadow); font-weight: 700; font-size: .85rem; z-index: 2; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.hero-stats span { color: var(--muted); font-size: .82rem; }
@media (max-width: 991.98px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding: 40px 0 48px; }
  .hero-visual { height: 320px; }
}

/* Feature strip */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.perk { display: flex; gap: 12px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.perk .perk-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.perk strong { display: block; font-size: .92rem; }
.perk span { color: var(--muted); font-size: .8rem; }
@media (max-width: 991.98px) { .perks { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .perks { grid-template-columns: 1fr; } }

/* Category tiles */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-tile { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--soft); text-decoration: none; }
.category-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-tile:hover img { transform: scale(1.05); }
.category-tile .tile-label { position: absolute; left: 14px; right: 14px; bottom: 14px; background: rgba(255, 255, 255, .92); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.category-tile .tile-label strong { font-size: 1rem; color: var(--ink); }
.category-tile .tile-label small { color: var(--muted); }
@media (max-width: 991.98px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

/* Product grid & card */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1199.98px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px) { .product-grid, .product-grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }
.product-card { position: relative; }
.product-card .media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.product-card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease, transform .6s ease; }
.product-card .media img.hover { opacity: 0; }
.product-card:hover .media img.hover { opacity: 1; }
.product-card:hover .media img.main { transform: scale(1.03); }
.product-card .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; z-index: 2; flex-wrap: wrap; }
.badge-pill { font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 5px 9px; border-radius: 999px; background: #fff; color: var(--ink); text-transform: uppercase; }
.badge-pill.sale { background: var(--sale); color: #fff; }
.badge-pill.new { background: var(--ink); color: #fff; }
.badge-pill.soldout { background: #fff; color: var(--muted); }
.product-card .info { padding: 12px 2px 0; }
.product-card .cat { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.product-card h3 { font-size: .98rem; font-weight: 600; margin: 3px 0 6px; line-height: 1.35; }
.product-card h3 a { text-decoration: none; }
.price { font-weight: 700; }
.price .now { color: var(--ink); }
.price .now.sale { color: var(--sale); }
.price .was { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-inline-start: 6px; font-size: .9em; }
.swatches { display: flex; gap: 5px; margin-top: 8px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); display: inline-block; }

/* Promo banner */
.promo { border-radius: 24px; padding: 54px 48px; background: var(--ink); color: #f6f1ea; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.promo::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(157, 128, 214, .55), transparent 65%); inset-inline-end: -80px; top: -120px; }
.promo h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin: 10px 0; }
.promo p { color: #cfc8d8; }
.promo .code { display: inline-block; border: 1.5px dashed #b8a5e0; border-radius: 12px; padding: 10px 18px; font-weight: 800; letter-spacing: .14em; color: #fff; }
.promo-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo-mini { border-radius: 20px; padding: 34px; min-height: 220px; display: flex; flex-direction: column; justify-content: end; text-decoration: none; }
.promo-mini h3 { font-family: var(--font-display); font-size: 1.7rem; margin: 6px 0 12px; }
.promo-mini.a { background: #e9dfd2; }
.promo-mini.b { background: #e5ddf3; }
@media (max-width: 767.98px) { .promo { grid-template-columns: 1fr; padding: 36px 24px; } .promo-split { grid-template-columns: 1fr; } }

/* Shop */
.page-banner { background: var(--soft); border-bottom: 1px solid var(--line); padding: 38px 0 30px; }
.page-banner h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 6px 0 4px; }
.breadcrumb { font-size: .82rem; margin: 0; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; }
@media (max-width: 991.98px) { .shop-layout { grid-template-columns: 1fr; } .filters-desktop { display: none; } }
.filter-block { border-bottom: 1px solid var(--line); padding: 18px 0; }
.filter-block:first-child { padding-top: 0; }
.filter-block h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 12px; }
.filter-links a { display: flex; justify-content: space-between; text-decoration: none; padding: 5px 0; color: var(--muted); font-size: .93rem; }
.filter-links a.active, .filter-links a:hover { color: var(--ink); font-weight: 600; }
.chip-group { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .82rem; text-decoration: none; cursor: pointer; }
.chip.active, .chip:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); display: inline-block; }
.chip-swatch.active { box-shadow: 0 0 0 2px var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar .form-select { width: auto; border-radius: 999px; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pagination .page-link { border-radius: 50% !important; width: 40px; height: 40px; display: grid; place-items: center; margin: 0 3px; border: 1px solid var(--line); color: var(--ink); }
.pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty-state { text-align: center; padding: 70px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 20px; }
.empty-state .empty-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 18px; }
.empty-state h3 { font-family: var(--font-display); }
.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; }

/* Product details */
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; }
@media (max-width: 991.98px) { .pdp { grid-template-columns: 1fr; gap: 28px; } }
.gallery { display: grid; grid-template-columns: 84px 1fr; gap: 14px; position: sticky; top: 96px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumbs button { border: 2px solid transparent; border-radius: 12px; overflow: hidden; padding: 0; background: var(--soft); aspect-ratio: 4 / 5; }
.gallery-thumbs button.active { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { border-radius: 20px; overflow: hidden; background: var(--soft); aspect-ratio: 4 / 5; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 575.98px) { .gallery { grid-template-columns: 1fr; position: static; } .gallery-thumbs { flex-direction: row; order: 2; overflow-x: auto; } .gallery-thumbs button { width: 70px; flex-shrink: 0; } }
.pdp-info h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 8px 0 4px; }
.pdp-price { font-size: 1.5rem; margin: 14px 0 6px; }
.option-label { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 10px; display: flex; justify-content: space-between; }
.option-label span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn { min-width: 54px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; padding: 0 12px; }
.size-btn.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.size-btn:disabled, .size-btn.unavailable { color: #b8b3bb; text-decoration: line-through; background: var(--soft); }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.color-btn { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.color-btn.active { box-shadow: 0 0 0 2px var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 44px; border: 0; background: transparent; font-size: 1.1rem; }
.qty input { width: 44px; text-align: center; border: 0; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-note { font-size: .88rem; font-weight: 600; margin-top: 14px; }
.stock-note.in { color: var(--success); }
.stock-note.low { color: var(--warning); }
.stock-note.out { color: var(--sale); }
.pdp-perks { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; display: grid; gap: 12px; font-size: .9rem; color: var(--muted); }
.pdp-perks div { display: flex; gap: 10px; align-items: center; }
.accordion-button:not(.collapsed) { background: transparent; color: var(--ink); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }

/* Cart & checkout */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; }
@media (max-width: 991.98px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-item img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: var(--soft); }
.cart-item h3 { font-size: 1rem; margin: 0 0 4px; }
.cart-item .meta { color: var(--muted); font-size: .85rem; }
.cart-item .issue { color: var(--sale); font-size: .82rem; font-weight: 600; margin-top: 6px; }
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; position: sticky; top: 96px; }
.summary-card h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; font-size: 1.15rem; font-weight: 800; }
.summary-row .discount { color: var(--success); }
.ship-progress { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: .85rem; margin-bottom: 18px; }
.ship-progress .bar { height: 6px; border-radius: 999px; background: #fff; margin-top: 8px; overflow: hidden; }
.ship-progress .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.checkout-section { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; margin-bottom: 20px; }
.checkout-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; }
.pay-option { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.pay-option.selected { border-color: var(--ink); background: #fcfbfa; }
.pay-option.disabled { opacity: .55; cursor: not-allowed; }
.mini-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.mini-line .thumb { position: relative; }
.mini-line img { width: 58px; height: 70px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.mini-line .qty-badge { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--ink); color: #fff; border-radius: 999px; font-size: .68rem; min-width: 20px; height: 20px; display: grid; place-items: center; }
.success-hero { text-align: center; padding: 50px 20px 30px; }
.success-hero .check { width: 78px; height: 78px; border-radius: 50%; background: #e3f3ea; color: var(--success); display: grid; place-items: center; margin: 0 auto 18px; }

/* Account */
.auth-wrap { min-height: calc(100vh - 300px); display: grid; place-items: center; padding: 50px 16px; }
.auth-card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 38px; box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--font-display); font-size: 2rem; margin: 6px 0 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 34px; }
@media (max-width: 991.98px) { .account-layout { grid-template-columns: 1fr; } }
.account-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; align-self: start; }
.account-nav a, .account-nav button { display: block; width: 100%; text-align: start; padding: 11px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; border: 0; background: transparent; }
.account-nav a.active, .account-nav a:hover, .account-nav button:hover { background: var(--soft); color: var(--ink); }
.card-soft { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.status-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.status-Pending { background: #fdf3dc; color: #8a5a00; }
.status-Confirmed { background: #e4ecfb; color: #2c4f95; }
.status-Processing { background: #efe9f8; color: #5a3f8c; }
.status-Shipped { background: #e2f1f6; color: #1d6377; }
.status-Delivered { background: #e3f3ea; color: #24683f; }
.status-Cancelled { background: #f8e4e0; color: #973522; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-block-end: 18px; padding-inline-start: 26px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 10px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* Footer */
.site-footer { background: #17151a; color: #c8c2cf; margin-top: 80px; padding: 60px 0 26px; font-size: .92rem; }
.site-footer h5 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 16px; }
.site-footer a { color: #c8c2cf; text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid #2d2a32; margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: #8c8592; }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #3a3640; display: grid; place-items: center; padding: 0; }

/* Toasts */
.toast-stack { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 36px); }
.app-toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; min-width: 260px; animation: toastIn .3s ease; }
.app-toast.error { background: var(--sale); }
.app-toast a { color: #fff; font-weight: 700; margin-inline-start: auto; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; margin-inline-start: 8px; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-display); font-size: 1.5rem; margin-top: 28px; }

/* ---------- Language switch ---------- */
.lang-switch .lang-badge { position: absolute; bottom: 3px; inset-inline-end: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .6rem; font-weight: 700; line-height: 1; display: grid; place-items: center; letter-spacing: 0; }
.promo-cta { text-align: end; }

/* ---------- Order progress steps ---------- */
.order-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; overflow-x: auto; }
.order-steps li { flex: 1 1 0; min-width: 72px; text-align: center; position: relative; font-size: .82rem; color: var(--muted); }
.order-steps li::after { content: ""; position: absolute; top: 15px; inset-inline-start: calc(50% + 20px); width: calc(100% - 32px); height: 2px; background: var(--line); }
.order-steps li:last-child::after { display: none; }
.order-steps li.done::after { background: var(--accent); }
.order-steps .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; background: var(--soft); color: var(--muted); font-weight: 700; }
.order-steps li.done .dot { background: var(--accent); color: #fff; }
.order-steps li.done .label { color: var(--ink); font-weight: 600; }

/* ---------- Cart item regions ---------- */
.cart-thumb img, .cart-thumb > span { width: 96px; }
.cart-total { text-align: end; white-space: nowrap; }

/* ---------- Arabic / right-to-left ---------- */
[dir="rtl"] { --font-body: "Cairo", Tahoma, "Segoe UI", sans-serif; --font-display: "Cairo", Tahoma, serif; }
/* Letter-spacing breaks the joining of Arabic letters, and uppercase has no meaning in Arabic. */
[dir="rtl"] body * { letter-spacing: normal !important; }
[dir="rtl"] .eyebrow, [dir="rtl"] .product-card .cat, [dir="rtl"] .filter-block h4, [dir="rtl"] .option-label, [dir="rtl"] .site-footer h5, [dir="rtl"] .badge-pill { text-transform: none; }
[dir="rtl"] .hero h1 em { font-style: normal; }
[dir="rtl"] .hero h1, [dir="rtl"] .display-title, [dir="rtl"] .section-head h2, [dir="rtl"] .page-banner h1, [dir="rtl"] .pdp-info h1 { font-weight: 800; line-height: 1.3; }
[dir="rtl"] .hero-card.one { transform: rotate(3deg); }
[dir="rtl"] .hero-card.two { transform: rotate(-4deg); }
/* Numbers, phones, SKUs and codes stay left-to-right inside Arabic text. */
[dir="rtl"] .price, [dir="rtl"] .summary-row span:last-child, [dir="rtl"] code { unicode-bidi: plaintext; }

/* ---------- Responsive refinements ---------- */
@media (max-width: 991.98px) {
  .section { padding: 44px 0; }
  .summary-card, .gallery { position: static; }
  .account-nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px; scrollbar-width: none; }
  .account-nav a, .account-nav button { white-space: nowrap; width: auto; padding: 9px 12px; }
  .account-nav form { flex-shrink: 0; }
  .promo-cta { text-align: start; }
}
@media (max-width: 575.98px) {
  html { font-size: 14.5px; }
  .container-xl { padding-inline: 16px; }
  .section { padding: 34px 0; }
  .section-sm { padding: 24px 0; }
  .header-row { min-height: 60px; gap: 6px; }
  .icon-link { width: 38px; height: 38px; }
  .lang-switch .lang-badge { bottom: 1px; }
  .brand-dot { display: none; }
  .hero { border-radius: 0 0 20px 20px; }
  .hero-inner { padding: 28px 0 36px; gap: 20px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; margin-top: 24px; }
  .hero-stats strong { font-size: 1.25rem; }
  .btn-lg { padding: .75rem 1.3rem; font-size: 1rem; }
  .hero .btn-lg { flex: 1 1 auto; }
  .product-card h3 { font-size: .9rem; }
  .product-card .badges { top: 8px; inset-inline-start: 8px; }
  .badge-pill { font-size: .62rem; padding: 4px 7px; }
  .category-grid { gap: 12px; }
  .category-tile .tile-label { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .cart-item { grid-template-columns: 76px 1fr; gap: 12px; }
  .cart-thumb img, .cart-thumb > span { width: 76px; }
  .cart-total { grid-column: 2; text-align: start; }
  .checkout-section, .summary-card, .card-soft { padding: 18px; border-radius: 16px; }
  .auth-card { padding: 26px 20px; border-radius: 18px; }
  .auth-wrap { padding: 28px 12px; }
  .page-banner { padding: 26px 0 20px; }
  .toolbar .form-select { max-width: 60vw; }
  .pdp-info h1 { font-size: 1.6rem; }
  .qty button { width: 36px; }
  .promo { padding: 28px 20px; border-radius: 18px; }
  .promo-mini { padding: 24px; min-height: 170px; }
  .site-footer { margin-top: 48px; padding-top: 40px; }
  .toast-stack { inset-inline: 12px; bottom: 12px; }
  .app-toast { min-width: 0; }
  .order-steps li { min-width: 60px; font-size: .72rem; }
  .order-steps li::after { display: none; }
  .empty-state { padding: 44px 16px; }
}
@media (hover: none) {
  .product-card .media img.hover { display: none; }
}
