/* ==========================================================================
   Myasa Second Hand: warm "paper" surfaces, burgundy ink, rose accents,
   hang-tag prices — a calmer, trust-first look distinct from Clothes.
   ========================================================================== */

.v-resale { background: var(--bg); }

/* ---------- Hero ---------- */
.resale-hero { position: relative; overflow: hidden; background: #F6EEEA; isolation: isolate; padding-bottom: 18px; }
.resale-hero__art { position: absolute; inset: 0 0 60px; z-index: -2; background: none; }
.resale-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(246, 238, 234, .98) 0%, rgba(246, 238, 234, .85) 40%, rgba(246, 238, 234, 0) 66%); }
@media (max-width: 799px) { .resale-hero::before { background: rgba(246, 238, 234, .9); } }
.resale-hero__in { display: grid; gap: 22px; padding-block: 34px 18px; }
@media (min-width: 1000px) { .resale-hero__in { padding-block: 48px 22px; } }
.resale-hero__text { display: grid; gap: 12px; justify-items: start; max-width: 520px; }
.resale-hero__text .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--palette-rose); }
.resale-hero__text .eyebrow svg { width: 16px; height: 16px; }
.resale-hero__title { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.8rem); font-weight: 800; line-height: .98; color: var(--palette-burgundy); font-stretch: 80%; letter-spacing: -.02em; }
.resale-hero__text p { color: var(--text-2); font-size: var(--fs-17); max-width: 44ch; }
.resale-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.how { display: grid; gap: 10px; counter-reset: none; }
@media (min-width: 600px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; } }
.how li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .85); box-shadow: var(--shadow-1); backdrop-filter: blur(6px); }
.how__n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--palette-burgundy); color: var(--white); font-weight: 800; flex: none; }
.how strong { display: block; font-size: var(--fs-14); }
.how span { font-size: var(--fs-12); color: var(--text-2); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 6px; font-size: var(--fs-13); color: var(--text-2); font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 17px; height: 17px; color: var(--palette-rose); }

[data-resale-cats] .chip[aria-pressed="true"] { background: var(--palette-burgundy); border-color: var(--palette-burgundy); }
[data-resale-cats] .chip[aria-pressed="true"] .muted { color: rgba(255, 255, 255, .7); }

/* Seller shop header */
.seller-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; align-items: center; padding: 18px; border-radius: var(--r-lg); background: var(--bg-soft); margin-bottom: 22px; }
@media (min-width: 800px) { .seller-head { grid-template-columns: auto minmax(0, 1fr) auto; } }
.seller-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-24); }
.seller-head__main { display: grid; gap: 6px; min-width: 0; }
.seller-head__stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-13); color: var(--text-2); }
.seller-head__stats span { display: inline-flex; align-items: center; gap: 5px; }
.seller-head__stats svg { width: 15px; height: 15px; }
.seller-head > .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 800px) { .seller-head > .btn { grid-column: auto; } }

/* ---------- Listing detail ---------- */
.item { display: grid; gap: 24px; padding-block: 8px 28px; }
@media (min-width: 900px) { .item { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; } }
.item__gallery { display: grid; gap: 10px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .item__gallery { position: sticky; top: 92px; } }
.item__main { position: relative; aspect-ratio: 1 / 1.1; max-width: 100%; border-radius: var(--r-lg); }
.item__main .cond { left: 14px; top: 14px; }
.item__thumbs { display: flex; gap: 8px; }
.item__thumbs .gallery__thumb { width: 78px; aspect-ratio: 1; }
.item__info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.item__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.item__top .small svg { width: 13px; height: 13px; display: inline; vertical-align: -2px; color: var(--accent); }
.item__brand { font-weight: 800; color: var(--palette-rose); }
.item__name { font-size: var(--fs-24); font-weight: 750; line-height: 1.2; }
@media (min-width: 900px) { .item__name { font-size: var(--fs-30); } }
.item__price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hangtag--lg { height: 38px; font-size: var(--fs-20); padding: 0 14px 0 22px; clip-path: polygon(13px 0, 100% 0, 100% 100%, 13px 100%, 0 50%); }
.hangtag--lg::before { left: 10px; width: 5px; height: 5px; margin-top: -2.5px; }
.item__cond { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-soft); }
.item__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.item__actions .btn { flex: 1 1 160px; }
.offer-status { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--accent-soft); font-size: var(--fs-14); }
.offer-status svg { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.offer-status .link { margin-left: auto; }
.protect { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); }
.protect > svg { width: 28px; height: 28px; color: var(--success); flex: none; }
.protect p { font-size: var(--fs-13); color: var(--text-2); margin-top: 2px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: var(--fs-12); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.specs dd { font-weight: 650; }
.item__notes h2 { font-size: var(--fs-17); margin-bottom: 6px; }
.item__notes p { color: var(--text-2); max-width: 62ch; }
.seller-box { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--bg-soft); }
.seller-box > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.seller-box .small svg { width: 13px; height: 13px; display: inline; vertical-align: -2px; color: var(--star); fill: currentColor; }
.seller-box > svg { width: 20px; height: 20px; color: var(--text-2); }
.seller-box:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Chat (demo) */
.chat { display: grid; gap: 12px; }
.chat__item { display: flex; align-items: center; gap: 10px; }
.chat__log { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px 0; }
.chat__log:empty { display: none; }
.bubble { max-width: 80%; padding: 9px 12px; border-radius: 14px; font-size: var(--fs-14); }
.bubble small { display: block; font-size: var(--fs-11); opacity: .7; margin-top: 2px; }
.bubble--me { justify-self: end; background: var(--palette-burgundy); color: var(--white); border-bottom-right-radius: 4px; }
.bubble--sys { justify-self: start; background: var(--bg-sunk); color: var(--text-2); border-bottom-left-radius: 4px; }

/* ---------- Sell form ---------- */
.sell-head { display: grid; gap: 4px; margin: 6px 0 20px; }
.sell-grid { display: grid; gap: 28px; align-items: start; padding-bottom: 40px; }
@media (min-width: 1000px) { .sell-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; } }
.sell-form { display: grid; gap: 18px; min-width: 0; }
.sell-step { display: grid; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sell-step h2 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-20); }
.sell-step__n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--palette-burgundy); color: var(--white); font-size: var(--fs-14); font-weight: 800; }
.sell-step > p svg { width: 16px; height: 16px; display: inline; vertical-align: -3px; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--bg-soft); text-align: center; cursor: pointer; transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.dropzone svg { width: 30px; height: 30px; color: var(--palette-rose); }
.dropzone:hover, .dropzone.is-over { border-color: var(--palette-rose); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photo-grid:empty { display: none; }
.photo { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 10px; overflow: hidden; background: var(--bg-sunk); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__cover { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; background: var(--palette-burgundy); color: var(--white); font-size: 10px; font-weight: 800; }
.photo__btn { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--palette-ink); }
.photo__btn svg { width: 14px; height: 14px; }
.photo__btn--left { right: auto; left: 6px; }
.photo--add { display: grid; place-items: center; align-content: center; gap: 2px; border: 2px dashed var(--line-strong); background: var(--surface); cursor: pointer; color: var(--text-2); }
.photo--add svg { width: 22px; height: 22px; }
.cond-field { border: 0; padding: 0; margin: 0; }
.cond-cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 800px) { .cond-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cond-card { position: relative; cursor: pointer; }
.cond-card input { position: absolute; opacity: 0; }
.cond-card__box { display: grid; gap: 6px; justify-items: start; height: 100%; padding: 12px; border-radius: var(--r-md); border: 1.5px solid var(--line-strong); transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.cond-card__box strong { font-size: var(--fs-14); }
.cond-card input:checked + .cond-card__box { border-color: var(--palette-burgundy); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--palette-burgundy); }
.cond-card input:focus-visible + .cond-card__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.parcel { cursor: pointer; position: relative; }
.parcel:has(input:checked) { background: var(--palette-burgundy); border-color: var(--palette-burgundy); color: var(--white); }
.parcel:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.earn { display: grid; gap: 6px; padding: 14px; border-radius: var(--r-md); background: var(--bg-soft); }
.earn__row { display: flex; justify-content: space-between; font-size: var(--fs-14); }
.earn__total { font-weight: 800; font-size: var(--fs-17); padding-top: 6px; border-top: 1px dashed var(--line-strong); }
.sell-submit { display: grid; gap: 10px; justify-items: start; }
.sell-preview { display: grid; gap: 12px; position: sticky; top: 96px; }
.sell-preview__card { max-width: 280px; }
@media (max-width: 999px) { .sell-preview { position: static; order: -1; grid-template-columns: 160px minmax(0, 1fr); align-items: start; } .sell-preview .eyebrow { grid-column: 1 / -1; } }
.sell-done { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 36px 0 60px; max-width: 560px; margin-inline: auto; }
.sell-done__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.sell-done__icon svg { width: 30px; height: 30px; }
.sell-done h2 { font-size: var(--fs-30); }
.sell-done__card { width: 220px; text-align: left; margin: 6px 0; }
.sell-done__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
