/* =========================================================================
   HamoonKPH — Sets / Lookbook
   Lookbook archive · set card · single Look configurator · PDP set module.
   Colours come from semantic tokens (accent-2 / sale). Mobile-first, RTL.
   ========================================================================= */

/* shared cover (image or on-brand ghosted placeholder) */
.hkph-set-cover { position: relative; display: block; overflow: hidden; background: var(--surface-subtle); }
.hkph-set-cover__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hkph-set-cover__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--hkph-500), var(--hkph-700)); color: rgba(255,255,255,.18);
  font-family: var(--font-fa); font-weight: var(--weight-title); font-size: 26px; text-align: center; padding: 12px; }

/* ----------------------------------------------------------- lookbook --- */
.hkph-lookbook__hero { position: relative; background: var(--hkph-500); overflow: hidden; }
.hkph-lookbook__ghost { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-fa); font-weight: 900; font-size: 22vw; line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; }
.hkph-lookbook__heroinner { position: relative; padding-block: 26px 30px; }
.hkph-lookbook__kicker { font-size: var(--text-caption); font-weight: var(--weight-strong); color: var(--accent-2, #A18565); }
.hkph-lookbook__title { font-size: 28px; font-weight: var(--weight-title); color: #fff; margin: 6px 0 0; }
.hkph-lookbook__sub { font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.8; margin: 9px 0 0; max-width: 460px; }
.hkph-lookbook__body { padding-block: 22px 34px; }

.hkph-lookbook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px)  { .hkph-lookbook-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1280px) { .hkph-lookbook-grid { grid-template-columns: repeat(4, 1fr); } }

.hkph-set-card { display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) var(--motion-ease); }
@media (min-width: 1024px) { .hkph-set-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); } }
.hkph-set-card__media { aspect-ratio: 4 / 5; }
.hkph-set-card__pieces { position: absolute; top: 9px; inset-inline-end: 9px; background: rgba(255,255,255,.94);
  color: var(--hkph-500); font-size: 10px; font-weight: var(--weight-strong); padding: 3px 9px; border-radius: var(--radius-pill); }
.hkph-set-card__hot { position: absolute; top: 9px; inset-inline-start: 9px; background: var(--accent-2, #A18565);
  color: #fff; font-size: 9.5px; font-weight: var(--weight-strong); padding: 3px 9px; border-radius: var(--radius-sm); }
.hkph-set-card__body { padding: 11px 13px; display: flex; flex-direction: column; gap: 4px; }
.hkph-set-card__name { font-family: var(--font-fa); font-weight: var(--weight-title); font-size: 14px; color: var(--text-strong); }
.hkph-set-card__sub { font-size: 11px; color: var(--muted); }
/* Stack the struck original above the bundle price — two 7-digit Toman prices
   never fit side by side in a 2-up mobile card and used to clip off the edge. */
.hkph-set-card__price { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 3px; min-width: 0; }
.hkph-set-card__price del { font-size: 11px; color: var(--muted-2); text-decoration: line-through; }
.hkph-set-card__price ins { text-decoration: none; font-weight: var(--weight-title); color: var(--slate-700); }
.hkph-set-card__price .price { white-space: nowrap; }
.hkph-set-card__price del .price .unit { font-size: .85em; }

/* --------------------------------------------------------- single look --- */
.hkph-breadcrumb { display: flex; align-items: center; gap: 7px; padding-block: 14px 6px; font-size: 12px; color: var(--muted); }
.hkph-breadcrumb a { color: var(--muted); }
.hkph-breadcrumb a:hover { color: var(--hkph-600); }
.hkph-breadcrumb .is-current { color: var(--text-strong); font-weight: var(--weight-ui); }

.hkph-look { display: grid; gap: 18px; padding-bottom: 24px; }
.hkph-look__cover { aspect-ratio: 4 / 5; border-radius: var(--radius-xl); }
.hkph-look__tag { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--accent-2, #A18565); color: #fff;
  font-size: 11px; font-weight: var(--weight-strong); padding: 5px 12px; border-radius: var(--radius-pill); }
.hkph-look__title { font-family: var(--font-fa); font-weight: var(--weight-title); font-size: 24px; color: var(--hkph-500); margin: 0; }
.hkph-look__lead { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 7px 0 16px; }

.hkph-pieces { display: flex; flex-direction: column; gap: 12px; }
.hkph-piece { background: var(--surface, #fff); border: 1.5px solid var(--accent-2, #A18565); border-radius: var(--radius-lg); padding: 13px; }
.hkph-piece.is-ready { border-color: var(--border-soft); }
.hkph-piece__head { display: flex; align-items: center; gap: 11px; }
.hkph-piece__num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--hkph-500); color: #fff;
  font-size: 11px; font-weight: var(--weight-strong); display: flex; align-items: center; justify-content: center; }
.hkph-piece__thumb { flex: 0 0 auto; width: 52px; height: 64px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-subtle); }
.hkph-piece__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hkph-piece__info { flex: 1; min-width: 0; }
.hkph-piece__name { display: block; font-size: 13px; font-weight: var(--weight-strong); color: var(--text-strong); line-height: 1.4; }
.hkph-piece__price { font-size: 12px; color: var(--slate-700); margin-top: 3px; }
.hkph-piece__state { flex: 0 0 auto; font-size: 13px; font-weight: var(--weight-strong); color: var(--accent-2, #A18565); }
.hkph-piece.is-ready .hkph-piece__state { color: var(--success); }

.hkph-piece__opts { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 12px; }
.hkph-piece__opts .hkph-piece__opt { margin-top: 0; }
.hkph-piece__opt { margin-top: 12px; }
.hkph-piece__opt-label { font-size: 11px; font-weight: var(--weight-strong); color: var(--text-body); margin-bottom: 7px; }
.hkph-piece__swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.hkph-swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); transition: box-shadow var(--motion-fast); }
.hkph-swatch.is-selected { box-shadow: inset 0 0 0 1px rgba(0,0,0,.16), 0 0 0 2px var(--hkph-500); }
.hkph-piece__pills { display: flex; flex-wrap: wrap; gap: 7px; }
.hkph-pill { min-width: 46px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  text-align: center; padding: 8px 14px; border: 1px solid var(--border-default, #d8d3ce);
  background: #fff; color: var(--text-body); font-family: var(--font-fa); font-size: 13px; font-weight: var(--weight-ui);
  border-radius: var(--radius-sm); cursor: pointer; }
.hkph-pill.is-selected { border-color: var(--hkph-500); background: var(--hkph-500); color: #fff; }

.hkph-look__buy { margin-top: 16px; padding: 16px; border: 1.5px solid var(--accent-2, #A18565); border-radius: var(--radius-lg); background: var(--surface, #fff); }
.hkph-look__total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hkph-look__was { color: var(--muted-2); text-decoration: line-through; font-size: 13px; }
.hkph-look__bundle { font-size: 20px; font-weight: var(--weight-title); color: var(--slate-700); }
.hkph-look__disc { font-size: 11px; font-weight: var(--weight-strong); color: #fff; background: var(--accent-2, #A18565); padding: 4px 10px; border-radius: var(--radius-pill); }
.hkph-look__add[disabled] { opacity: .5; }
.hkph-look__hint { font-size: 11.5px; color: var(--accent-2, #A18565); font-weight: var(--weight-ui); margin: 9px 0 0; text-align: center; }
.hkph-look__desc { margin-top: 22px; }

@media (min-width: 1024px) {
  /* Image-forward lookbook: the look image is the hero, config kept tidy. */
  .hkph-look { grid-template-columns: minmax(0, 470px) minmax(0, 560px); gap: 36px; align-items: start; justify-content: center; }
  .hkph-look__cover { position: sticky; top: 88px; }
  .hkph-look__title { font-size: 28px; }
}

/* ------------------------------------------------------- PDP set module --- */
.hkph-setmodule { margin: 22px 0; padding: 18px; border: 1.5px solid var(--accent-2, #A18565); border-radius: var(--radius-lg);
  background: var(--surface, #fff); box-shadow: var(--shadow-card); }
.hkph-setmodule__head { display: flex; align-items: center; gap: 9px; }
.hkph-setmodule__head svg { color: var(--accent-2, #A18565); }
.hkph-setmodule__title { font-family: var(--font-fa); font-weight: var(--weight-title); font-size: 17px; color: var(--hkph-500); margin: 0; }
.hkph-setmodule__disc { margin-inline-start: auto; font-size: 11px; font-weight: var(--weight-strong); color: #fff;
  background: var(--accent-2, #A18565); padding: 4px 11px; border-radius: var(--radius-pill); }
.hkph-setmodule__lead { font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.hkph-setmodule__pieces { display: flex; gap: 12px; flex-wrap: wrap; }
.hkph-setmodule__piece { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; text-decoration: none;
  color: inherit; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 9px; }
.hkph-setmodule__piece:hover { border-color: var(--accent-2, #A18565); }
.hkph-setmodule__thumb { flex: 0 0 auto; width: 52px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-subtle); }
.hkph-setmodule__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hkph-setmodule__pname { flex: 1; min-width: 0; font-size: 12.5px; font-weight: var(--weight-ui); color: var(--text-strong); line-height: 1.4; }
.hkph-setmodule__pprice { font-size: 12px; color: var(--slate-700); white-space: nowrap; }
.hkph-setmodule__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.hkph-setmodule__total { display: flex; align-items: baseline; gap: 8px; }
.hkph-setmodule__tlabel { font-size: 12px; color: var(--muted); }
.hkph-setmodule__total del { font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
.hkph-setmodule__total ins { text-decoration: none; font-size: 18px; font-weight: var(--weight-title); color: var(--slate-700); }

/* ----------------------------------------- look gallery (set images) ---- */
.hkph-look__media .hkph-gallery__main { aspect-ratio: 4 / 5; border-radius: var(--radius-xl); overflow: hidden; position: relative; }
.hkph-look__media .hkph-gallery__main .hkph-set-cover__img { width: 100%; height: 100%; object-fit: cover; }
.hkph-look__media .hkph-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.hkph-look__media .hkph-gallery__thumbs::-webkit-scrollbar { display: none; }
.hkph-look__media .hkph-gallery__thumb { flex: 0 0 58px; aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border-soft); background: var(--surface-subtle); padding: 0; cursor: pointer; }
.hkph-look__media .hkph-gallery__thumb.is-active { border: 2px solid var(--hkph-500); }
.hkph-look__media .hkph-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* on-sale exclusion note */
.hkph-look__salenote { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--sale-strong, #A33A30);
  background: var(--sale-soft, #F7E9E7); border-radius: var(--radius-sm); padding: 9px 11px; margin: 0 0 10px; }
.hkph-look__salenote svg { flex: 0 0 auto; }

@media (min-width: 1024px) { .hkph-look__media { position: sticky; top: 88px; } }

/* --------------------------------------- out-of-stock / incomplete set --- */
/* A piece whose WHOLE product is out of stock: dimmed, no size/colour controls,
   and a clear «ناموجود» chip in place of the readiness tick. */
.hkph-piece.is-unavailable { border-color: var(--border-soft); opacity: .72; }
.hkph-piece.is-unavailable .hkph-piece__thumb img { filter: grayscale(1); }
.hkph-piece.is-unavailable .hkph-piece__state,
.hkph-piece.is-combo-oos .hkph-piece__state { color: var(--sale-strong, #A33A30); background: var(--sale-soft, #F7E9E7);
  font-size: 10.5px; font-weight: var(--weight-strong); padding: 3px 9px; border-radius: var(--radius-pill); }
/* combo-out piece: keep it interactive (pick another colour/size) but flag it. */
.hkph-piece.is-combo-oos { border-color: var(--sale, #C0563E); }

/* An option (colour/size) with no in-stock variation for the current selection —
   faded + struck, like the product page. Still clickable so the shopper sees
   «ناموجود» if they pick it. */
.hkph-swatch.is-oos { opacity: .4; position: relative; }
.hkph-swatch.is-oos::after { content: ""; position: absolute; inset-inline: -1px; top: 50%;
  height: 1.5px; background: var(--sale-strong, #A33A30); transform: rotate(-45deg); }
.hkph-pill.is-oos { opacity: .5; text-decoration: line-through; }

/* Incomplete set: the add-to-cart CTA is replaced by a clear note explaining
   which piece is gone + links to buy the still-available pieces on their own. */
.hkph-look__buy--incomplete { border-color: var(--border-default, #d8d3ce); background: var(--surface-subtle, #faf7f2); }
.hkph-look__incomplete-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-fa);
  font-weight: var(--weight-title); font-size: 15px; color: var(--text-strong); }
.hkph-look__incomplete-head svg { flex: 0 0 auto; color: var(--sale-strong, #A33A30); }
.hkph-look__incomplete-body { font-size: 12.5px; color: var(--muted); line-height: 1.9; margin: 8px 0 0; }
.hkph-look__incomplete-hint { font-size: 12px; color: var(--text-body); font-weight: var(--weight-ui); margin: 13px 0 8px; }
.hkph-look__alt { display: flex; flex-wrap: wrap; gap: 8px; }
.hkph-look__alt .btn { flex: 0 1 auto; }

/* «فعلاً ناقص» ribbon on a partly-out set card (kept subtle, bottom-start). */
.hkph-set-card__partial { position: absolute; bottom: 9px; inset-inline-start: 9px; background: rgba(0,0,0,.62);
  color: #fff; font-size: 9.5px; font-weight: var(--weight-strong); padding: 3px 9px; border-radius: var(--radius-sm); }
