/* ============================================================
   وقفی نو — pages: products/details.html
   ============================================================ */

.detail-hero__media i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 5rem;
  color: var(--brand-600);
  background: linear-gradient(140deg, var(--brand-050), var(--surface-soft));
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .3s, box-shadow .3s;
}
.benefit-item:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.benefit-item i { color: var(--brand-500); margin-top: .25rem; flex-shrink: 0; }
/* ============================================================
   v19 spacing fixes (details page)
   ============================================================ */
/* two .section blocks in a row doubled the vertical gap (≈150px): the following section only keeps half */
.detail-section + .detail-section { padding-top: clamp(1rem, 3vw, 1.75rem); }
.detail-hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.detail-hero .breadcrumb { margin-bottom: .25rem; }
/* main column: same rhythm as the aside (was 1rem in the main column vs 1.25rem in the aside) */
.detail-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.detail-text { font-size: .9rem; line-height: 2; }
.detail-aside__title { display: flex; align-items: center; gap: .55rem; }
.detail-aside__card > .btn:first-of-type { margin-top: 1rem; }
/* 4 feature cards inside the narrow main column: 2×2 instead of 3 + 1 orphan */
.features-grid--two { gap: 1rem; }
@media (min-width: 37.5em) { .features-grid--two { grid-template-columns: repeat(2, 1fr); } }
.features-grid--two .feature-card { padding: 1.25rem 1.2rem; }
/* spec / contact rows: long values wrap instead of overflowing on phones */
.spec-row, .info-item { flex-wrap: wrap; align-items: center; row-gap: .35rem; }
.spec-row__value, .info-item__value { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 37.49em) {
  .detail-grid { gap: 1.5rem; }
  .detail-aside__card { padding: 1.25rem 1.1rem; }
  .spec-row, .info-item { padding: .8rem .95rem; }
  .spec-row__value, .info-item__value { text-align: right; flex-basis: 100%; }
  .detail-hero .container { gap: 1.5rem; }
}

/* ============================================================
   Product videos
   ============================================================ */
.section-head--compact { margin-bottom: 1.75rem; }
.video-section--alt { background: var(--surface-soft); }
.video-section__eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 700; color: var(--brand-600);
  background: var(--brand-050); padding: .3rem .8rem; border-radius: 100px; margin-bottom: .75rem;
}
.video-section__access-note {
  display: inline-flex; align-items: center; gap: .55rem; margin-top: .75rem;
  padding: .55rem .85rem; border: 1px solid var(--brand-100); border-radius: 999px;
  color: var(--brand-700); background: var(--brand-050); font-size: .8rem; font-weight: 650;
}
.video-section__access-note i { color: var(--brand-600); }
.product-loading-shell { min-height: 70vh; padding: 3rem 0; }
.product-skeleton { border-radius: var(--radius-lg); background: linear-gradient(100deg, var(--surface-soft) 25%, var(--brand-050) 45%, var(--surface-soft) 65%); background-size: 220% 100%; animation: product-shimmer 1.35s ease-in-out infinite; }
.product-skeleton--hero { height: clamp(15rem, 38vw, 28rem); margin-bottom: 1.5rem; }
.product-skeleton--line { height: 1.2rem; width: 62%; margin-bottom: .8rem; }
.product-skeleton--short { width: 38%; }
.product-skeleton--content { height: 15rem; margin-top: 2.25rem; }
@keyframes product-shimmer { to { background-position: -220% 0; } }

/* v22: big player + playlist (was a 2/3-column grid that left one video stuck in half of the row) */
.video-showcase { display: grid; gap: 1.25rem; align-items: start; }
.video-showcase--single { max-width: 56rem; margin-inline: auto; }
.video-showcase__stage { min-width: 0; }

.video-card {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.video-card[hidden] { display: none; }
.video-card__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-card__frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;   /* iOS long-press "save video" */
}
.video-card__lock {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
  padding: 1rem; text-align: center; color: #fff;
  background: linear-gradient(140deg, var(--brand-700, #0e3a75), #0b1424);
}
.video-card__lock strong { font-size: 1.05rem; font-weight: 800; }
.video-card__lock span:last-child { font-size: .85rem; opacity: .8; }
.video-card__lock-icon {
  width: 4rem; height: 4rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  margin-bottom: .25rem;
}
.video-card__admin-badge {
  position: absolute; top: .75rem; inset-inline-start: .75rem; z-index: 1;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .6);
  padding: .25rem .7rem; border-radius: 100px; pointer-events: none;
}
.video-card__error {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem; text-align: center; font-size: .82rem; color: #fff; background: rgba(11, 20, 36, .88);
}
.video-card__caption {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem;
}
.video-card__heading { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.video-card__index { font-size: .72rem; font-weight: 700; color: var(--brand-600); }
.video-card__title { font-size: 1rem; font-weight: 800; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.video-card__caption .status-badge { flex-shrink: 0; text-decoration: none; }
.video-card__caption .status-badge i { font-size: .65rem; }
.video-card__caption .status-badge:has(i)::before { display: none; }

/* playlist */
.video-playlist {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
}
@media (min-width: 62em) { .video-playlist { max-height: 34rem; } }
.video-playlist__head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .95rem 1.1rem; border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.video-playlist__head strong { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.video-playlist__head strong i { color: var(--brand-600); }
.video-playlist__head span { font-size: .75rem; color: var(--ink-soft); }
.video-playlist__list { list-style: none; margin: 0; padding: .5rem; overflow-y: auto; display: grid; gap: .35rem; }
.video-playlist__item {
  width: 100%; display: flex; align-items: center; gap: .8rem;
  padding: .7rem .8rem; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
  transition: background .25s, border-color .25s;
}
.video-playlist__item:hover { background: var(--surface-soft); }
.video-playlist__item:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }
.video-playlist__item.is-active { background: var(--brand-050); border-color: var(--brand-100); }
.video-playlist__num {
  flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: var(--surface-soft); color: var(--ink-soft);
  transition: background .25s, color .25s;
}
.video-playlist__item.is-active .video-playlist__num { background: var(--brand-600); color: #fff; }
.video-playlist__text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.video-playlist__title {
  font-size: .86rem; font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-playlist__state { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--success); }
.video-playlist__item.is-locked .video-playlist__state { color: var(--ink-soft); }
@media (max-width: 61.99em) {
  .video-playlist__list { grid-auto-flow: column; grid-auto-columns: minmax(14rem, 1fr); overflow-x: auto; overflow-y: hidden; }
}

/* v63: all product videos use the same card grid, with no side playlist */
.video-showcase { max-width: 72rem; margin-inline: auto; }
.video-showcase--single { max-width: 38rem; }
.video-card__caption { padding: .75rem 1rem; }
.video-card__title { font-size: .92rem; }

/* Training selector belongs to the blue hero, not a detached white strip. */
.training-selector { display:flex; align-items:center; justify-content:center; gap:.75rem; margin:1.5rem auto 0; padding:.75rem 1rem; max-width:32rem; border:1px solid rgba(255,255,255,.24); border-radius:.9rem; background:var(--brand-700); color:#fff; box-shadow:0 12px 28px rgba(12,57,125,.2); }
.training-selector label { font-size:.85rem; font-weight:700; white-space:nowrap; }
.training-selector select { min-width:17rem; min-height:2.75rem; padding:.55rem 2.5rem .55rem .8rem; border:1px solid rgba(255,255,255,.38); border-radius:.65rem; background:var(--brand-800); color:#fff; font:inherit; font-weight:700; }
.training-selector select:focus-visible { outline:3px solid rgba(255,255,255,.8); outline-offset:2px; }
@media (max-width: 40em) { .training-selector { align-items:stretch; flex-direction:column; } .training-selector select { width:100%; min-width:0; } }

/* v52: product body must read like an article, not a narrow thumbnail. */
.product-detail__body {
  width: min(100%, 72rem);
  max-width: 72rem;
  margin-inline: auto;
  font-size: clamp(.98rem, 1.05vw, 1.08rem);
  line-height: 2.25;
  color: var(--ink);
}
.product-detail__body p { margin: 0 0 1.15rem; max-width: 78ch; }
.product-detail__body ul, .product-detail__body ol { margin: .75rem 0 1.25rem; padding-inline-start: 1.5rem; }
.product-detail__body li { margin-bottom: .45rem; }
.product-detail__body h2, .product-detail__body h3 { margin: 1.7rem 0 .7rem; line-height: 1.6; }
.product-detail__body img, .product-detail__body table { max-width: 100%; height: auto; }
.product-detail__body table { display: block; width: max-content; min-width: 100%; overflow-x: auto; }
@media (max-width: 37.49em) {
  .product-detail__body { font-size: .96rem; line-height: 2.05; }
}

/* v61: specs are a description list now (better semantics for search/answer engines) */
.specs { margin: 0; }
.specs dt, .specs dd { margin: 0; }
.detail-text + .detail-text { margin-top: .6rem; }

/* v62: training videos one by one (grid of cards, no playlist bar) */
.video-grid {
  display: grid; gap: 1.25rem; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  max-width: 72rem; margin-inline: auto;
}
.video-grid--single { grid-template-columns: minmax(0, 1fr); max-width: 38rem; }
.video-grid .video-card { height: 100%; }
.video-grid .video-card__caption { flex: 1; align-items: flex-start; }
