/* ==========================================================================
   Myasa Clothes: listing and product detail
   ========================================================================== */

.dept-tabs { padding-block: 10px 6px; }
.dept-tabs .chip[aria-pressed="true"] { background: var(--palette-fashion); border-color: var(--palette-fashion); color: var(--white); }

.dept-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 220px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 8px;
  isolation: isolate;
  background: var(--v-soft);
}
@media (min-width: 900px) { .dept-hero { min-height: 280px; } }
.dept-hero .art { position: absolute; inset: 0; z-index: -2; background: none; }
.dept-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .7) 38%, rgba(255, 255, 255, 0) 62%); }
.dept-hero__text { display: grid; gap: 8px; justify-items: start; padding: 24px; max-width: 460px; }
@media (min-width: 900px) { .dept-hero__text { padding: 36px 44px; } }
.dept-hero__text h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); font-weight: 800; line-height: 1.05; font-stretch: 85%; }
.dept-hero__text p { color: var(--text-2); max-width: 40ch; }
.dept-hero__text .btn { margin-top: 4px; }
.dept-hero--dark { color: var(--white); background: var(--palette-burgundy); }
.dept-hero--dark::before { background: linear-gradient(90deg, rgba(20, 5, 10, .82) 0%, rgba(20, 5, 10, .45) 40%, rgba(20, 5, 10, 0) 62%); }
.dept-hero--dark .dept-hero__text p { color: rgba(255, 255, 255, .85); }
.dept-hero--dark .eyebrow { color: #F6B73C; }
.dept-hero--dark .btn--dark { background: var(--white); color: var(--palette-ink); }
@media (max-width: 599px) {
  .dept-hero { align-items: flex-end; min-height: 300px; }
  .dept-hero::before { background: linear-gradient(0deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .8) 45%, rgba(255, 255, 255, 0) 70%); }
  .dept-hero--dark::before { background: linear-gradient(0deg, rgba(20, 5, 10, .9) 0%, rgba(20, 5, 10, .55) 45%, rgba(20, 5, 10, 0) 72%); }
}

.listing-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px; }
.quick-chips { margin-bottom: 12px; }
.circle--plain[aria-pressed="true"] .circle__img { box-shadow: 0 0 0 3px var(--palette-fashion); }
button.circle { color: var(--text); }

/* ---------- Product detail ---------- */
.pdp { display: grid; gap: 24px; padding-block: 8px 24px; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; } }
.pdp__gallery { display: grid; gap: 12px; min-width: 0; align-content: start; }
@media (min-width: 900px) { .pdp__gallery { position: sticky; top: 92px; } }
.pdp__stage { display: grid; gap: 10px; }
@media (min-width: 900px) { .pdp__stage { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; } }
.pdp__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 900px) { .pdp__thumbs { grid-template-columns: 1fr; align-content: start; } }
.pdp__main {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: var(--r-lg);
  cursor: zoom-in;
  order: -1;
}
@media (min-width: 900px) { .pdp__main { order: 0; } }
.pdp__main svg { transition: transform .18s ease-out; }
.pdp__v3d { display: grid; gap: 10px; grid-column: 1 / -1; }
.v3d {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: var(--r-lg);
  background: radial-gradient(circle at 50% 35%, #FFFFFF, var(--v-soft) 70%);
  overflow: hidden;
  cursor: grab;
}
.v3d:active { cursor: grabbing; }
.v3d canvas { width: 100% !important; height: 100% !important; }
.v3d__status { display: grid; place-items: center; align-content: center; gap: 8px; height: 100%; padding: 24px; text-align: center; color: var(--text-2); }
.v3d__status svg { width: 34px; height: 34px; color: var(--accent); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.v3d__controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.v3d__controls .small { margin-right: auto; color: var(--text-2); }

.pdp__info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.pdp__brand { font-weight: 800; color: var(--accent-ink); font-size: var(--fs-15); }
.pdp__name { font-family: var(--font-body); font-size: var(--fs-24); font-weight: 600; line-height: 1.25; letter-spacing: 0; margin-top: -10px; }
.pdp__rating { display: inline-flex; align-items: center; gap: 10px; }
.pdp__price { display: grid; gap: 2px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.pdp__price .price__now { font-size: var(--fs-30); }
.pdp__price .price__mrp, .pdp__price .price__off { font-size: var(--fs-17); }
.pdp__offers { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--v-soft); }
.offer-line { display: flex; align-items: center; gap: 10px; font-size: var(--fs-14); }
.offer-line svg { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.offer-line .link { margin-left: auto; }
.pdp__opts { display: grid; gap: 18px; }
.pdp__actions { display: flex; gap: 10px; }
.pdp__actions .btn { flex: 1; }
.pdp__pin { display: grid; gap: 8px; }
.pdp__pin p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); }
.pdp__pin p svg { width: 17px; height: 17px; color: var(--success); }
.pdp__perks { display: grid; gap: 8px; font-size: var(--fs-14); }
.pdp__perks li { display: flex; align-items: center; gap: 10px; }
.pdp__perks svg { width: 19px; height: 19px; color: var(--text-2); }
.pdp__acc { border-top: 1px solid var(--line); }
.pdp__acc details { border-bottom: 1px solid var(--line); }
.pdp__acc summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 750; cursor: pointer; list-style: none; }
.pdp__acc summary::-webkit-details-marker { display: none; }
.pdp__acc summary svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.pdp__acc details[open] summary svg { transform: rotate(180deg); }
.pdp__acc p, .pdp__acc ul { padding-bottom: 14px; color: var(--text-2); font-size: var(--fs-14); max-width: 62ch; }
.bullets { display: grid; gap: 6px; padding-left: 18px !important; list-style: disc; }
.pdp__mode .chip[aria-pressed="true"] { background: var(--palette-fashion); border-color: var(--palette-fashion); }

/* Reviews */
.reviews { display: grid; gap: 24px; }
@media (min-width: 800px) { .reviews { grid-template-columns: 280px minmax(0, 1fr); gap: 40px; } }
.reviews__sum { display: grid; gap: 8px; align-content: start; }
.reviews__avg { font-family: var(--font-display); font-size: var(--fs-48); font-weight: 800; line-height: 1; }
.dist { display: grid; gap: 6px; margin: 8px 0; }
.dist__row { display: grid; grid-template-columns: 28px 1fr 40px; align-items: center; gap: 8px; font-size: var(--fs-13); }
.dist__bar { height: 6px; border-radius: 6px; background: var(--bg-sunk); overflow: hidden; }
.dist__bar span { display: block; height: 100%; background: var(--star); border-radius: 6px; }
.star-pick { display: flex; gap: 4px; }
.star-pick button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--line-strong); }
.star-pick button svg { width: 28px; height: 28px; fill: currentColor; }
.star-pick button.on { color: var(--star); }

/* Sticky mobile buy bar (sits above the bottom navigation) */
.buybar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  z-index: calc(var(--z-bottom) - 1);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(35, 11, 21, .08);
  padding-block: 10px;
}
.buybar:empty { display: none; }
.buybar__in { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.buybar__in > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.buybar__price { font-weight: 800; font-size: var(--fs-20); }
.buybar .btn { min-width: 160px; }
@media (min-width: 900px) { .buybar { display: none; } }
.pg-product main, .pg-listing main { padding-bottom: 76px; }
@media (min-width: 900px) { .pg-product main, .pg-listing main { padding-bottom: 0; } }
