/* ---------- الأساس ---------- */
:root {
  --ink: #111111;
  --ink-soft: #6f6f6f;
  --line: #e4e4e4;
  --line-strong: #111111;
  --bg: #ffffff;
  --shot-bg: #f0f0f0;
  --ok: #1f7a4d;
  --sand: #f5f5f5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

.bag-ico {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  flex: none;
}

/* ---------- الشريط العلوي ---------- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 7px 26px;
  background: #111;
  color: #fff;
  font-size: 12px;
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar__group--end { justify-self: end; }

.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.topbar__link:hover { opacity: 0.75; }

.topbar__center {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.topbar__ship {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- الهيدر ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px 30px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.nav__link:hover { opacity: 0.6; }

.logo {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ---------- المنتج ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 44px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 32px 90px;
  align-items: start;
}

/* الصور — سلايدر */
.gallery { display: block; }

.slider {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background: var(--shot-bg);
}

.slider__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.shot {
  position: relative;
  flex: 0 0 100%;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  aspect-ratio: 3 / 4;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes shotIn {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}
.shot.is-active img {
  animation: shotIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .shot.is-active img { animation: none; }
}
.shot:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease;
}
.slider__nav:hover { background: #fff; }
.slider__nav svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.slider__nav--prev { inset-inline-start: 12px; }
.slider__nav--next { inset-inline-end: 12px; }

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cfcfcf;
  transition: width 0.2s ease, background 0.2s ease;
}
.dot.is-active { width: 20px; border-radius: 5px; background: var(--ink); }
.dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* التفاصيل */
.details { padding-top: 4px; }

.details__title {
  margin: 0 0 12px;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.35;
}

.price {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 500;
}

.desc {
  margin: 0 0 6px;
  color: #2f2f2f;
  font-size: 15px;
  line-height: 1.85;
  max-height: 5.55em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.desc ul { margin: 0; padding-inline-start: 18px; }
.desc li { margin-bottom: 8px; }

.desc.is-open {
  max-height: none;
  overflow: visible;
}

.read-more {
  display: inline-block;
  padding: 0 0 3px;
  margin-bottom: 26px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  font-size: 12px;
  font-weight: 600;
}

.field { margin-bottom: 20px; }

.field__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}

.field__label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.field__value {
  font-size: 13px;
  font-weight: 700;
}

.swatches { display: flex; gap: 10px; }

.swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 2px #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.swatch:hover { transform: scale(1.06); }
.swatch.is-active {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1.5px var(--ink);
}

.sizes { display: flex; gap: 8px; flex-wrap: wrap; }

.size {
  min-width: 42px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #dcdcdc;
  border-radius: 2px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.size:hover { border-color: #9a9a9a; }
.size.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

/* أزرار الشراء */
.buy-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.qty {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  height: 54px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  background: #fff;
}

.qty button {
  height: 100%;
  border: 0;
  background: none;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-soft);
}
.qty button:hover { color: var(--ink); }

.qty input {
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--solid {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}
.btn--solid:hover { background: #2b2b2b; border-color: #2b2b2b; }

.btn--ghost {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--block { display: flex; width: 100%; }

.checks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 12.5px;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  line-height: 1.5;
}
.check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  flex: none;
}

/* الأكورديون */
.accordions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.acc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 17px;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  text-align: start;
}
.acc__head:hover { background: #fafafa; }

.acc__chev {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.acc.is-open .acc__chev { transform: rotate(45deg); }

.acc__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.acc.is-open .acc__body { max-height: 320px; }

.acc__body p {
  margin: 0;
  padding: 0 17px 16px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.9;
}

/* ---------- الفوتر ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 30px 32px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer p { margin: 0 0 4px; }
.footer__small { font-size: 11.5px; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--ink);
}
.footer__links a { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.footer__links a:hover { border-bottom-color: var(--ink); }

/* ---------- الصفحات الداخلية ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 90px;
}

.page__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.page__lead {
  margin: 0 0 34px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.page h2 {
  margin: 32px 0 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.page h3 {
  margin: 20px 0 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.page p,
.page li {
  margin: 0 0 10px;
  color: #2f2f2f;
  font-size: 13.5px;
  line-height: 1.95;
}

.page ul {
  margin: 0 0 12px;
  padding-inline-start: 18px;
}

.page a { border-bottom: 1px solid var(--ink); }
.page a:hover { opacity: 0.65; }

.page__meta {
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

/* ---------- النوافذ ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 17, 17, 0.45);
  overflow-y: auto;
}

.modal[hidden] { display: none; }

.modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px 28px 26px;
  border-radius: 12px;
  background: #fff;
}

.modal__card--order { width: min(470px, 100%); }

.modal__close {
  position: absolute;
  top: 12px;
  inset-inline-start: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-soft);
}
.modal__close:hover { background: #f3f3f3; color: var(--ink); }

.modal__card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}

/* نموذج الطلب */
.order__intro {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.order__summary {
  background: var(--sand);
  border-radius: 6px;
  padding: 13px 15px;
  margin-bottom: 16px;
  font-size: 12.5px;
  display: grid;
  gap: 6px;
}
.order__summary div { display: flex; justify-content: space-between; gap: 12px; }
.order__summary span:first-child { color: var(--ink-soft); }
.order__summary span:last-child { font-weight: 600; text-align: end; }

.order__summary-total {
  border-top: 1px solid #e4e4e4;
  padding-top: 8px;
  margin-top: 2px;
}
.order__summary-total span:last-child { font-weight: 700; font-size: 13.5px; }

.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  height: 46px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease;
}
.field-input::placeholder { color: #b3b3b3; }
.field-input:focus { outline: none; border-color: var(--ink); }

textarea.field-input {
  height: auto;
  min-height: 82px;
  padding: 10px 12px;
  line-height: 1.7;
  resize: vertical;
}

.field-input.is-invalid { border-color: #d92d20; }

.form-hint { margin: 6px 0 0; font-size: 11px; color: var(--ink-soft); }

.form-error {
  margin: 0 0 12px;
  font-size: 12px;
  color: #c62a22;
  font-weight: 600;
}

.order__note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
}

.order-success { text-align: center; padding-top: 6px; }

.order-success__mark {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #eef7f1;
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.order-success h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.order-success__no { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-soft); }

.order-success__box {
  text-align: start;
  background: var(--sand);
  border-radius: 6px;
  padding: 14px;
  font-size: 12.5px;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.order-success__box div { display: flex; gap: 12px; }
.order-success__box span:first-child { color: var(--ink-soft); min-width: 58px; flex: none; }
.order-success__box span:last-child { white-space: pre-line; word-break: break-word; }

.order-success .btn { margin-top: 4px; }

/* ---------- التوست ---------- */
.toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: calc(100% - 40px);
  padding: 12px 22px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  transform: translate(50%, 16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-on { opacity: 1; transform: translate(50%, 0); }

/* ---------- الاستجابة ---------- */
@media (max-width: 1040px) {
  .product {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding: 24px 22px 70px;
  }
  .gallery { order: -1; }
  .details__title { font-size: 24px; }
}

@media (max-width: 860px) {
  .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 10px;
  }
  .logo { order: 1; font-size: 22px; }
  .nav {
    order: 2;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }
  .nav__link { font-size: 12px; }
  .topbar { grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 10px 16px; }
  .topbar__center { display: none; }
  .topbar__group { justify-content: center; width: 100%; }
  .topbar__group--end { justify-self: center; }
}

@media (max-width: 560px) {
  .header { padding: 14px 14px; }
  .page { padding: 34px 18px 70px; }
  .page__title { font-size: 23px; }
  .slider__nav { width: 32px; height: 32px; }
  .sizes { gap: 6px; }
  .size { min-width: 38px; height: 38px; }
  .accordions { grid-template-columns: minmax(0, 1fr); }
  .buy-row { grid-template-columns: 100px minmax(0, 1fr); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .details__title { font-size: 21px; }
  .topbar { font-size: 11px; }
  .topbar__ship { font-size: 11px; }
}
