/* FILE: marketplace/public/MCM-resale-product.css */
/* VERSION: shop-mycarnivalmatch-resale-product-css.v1.1.0 */
/* ROLLBACK-ID: new-file */
/* CHANGE: Refines phone, tablet, and desktop layout; isolates detail-grid styles; and supports readonly buyer identity fields. */

body[data-mcm-page="resale-product"] {
  --MCM-background: #f2f2f7;
  --MCM-surface-soft: #f7f7fa;
}

.MCM-resale-product-section { padding: 0 0 44px; }
.MCM-resale-shell { width: min(42rem, calc(100% - 24px)); margin-inline: auto; }
.MCM-resale-context-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 52px;
  align-items: center;
  gap: 8px;
}
.MCM-resale-back-link {
  display: inline-flex;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: 2px;
  border-radius: 12px;
  color: var(--MCM-primary);
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
}
.MCM-resale-back-link svg { width: 22px; height: 22px; margin-left: -4px; }
.MCM-resale-context-title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.MCM-resale-context-spacer { justify-self: end; width: 44px; }
.MCM-resale-stack { display: grid; gap: 16px; }
.MCM-resale-card {
  overflow: hidden;
  border: 1px solid rgba(60,60,67,0.10);
  border-radius: 20px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 12px rgba(20,36,61,0.05);
}
.MCM-resale-card-body { padding: 20px; }
.MCM-resale-hero-wrap { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e5e5ea; }
.MCM-resale-hero-image { width: 100%; height: 100%; object-fit: cover; }
.MCM-resale-status-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255,255,255,0.90);
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.MCM-resale-status-badge svg { width: 15px; height: 15px; color: var(--MCM-success); }
.MCM-resale-status-badge[data-state="expired"] svg,
.MCM-resale-status-badge[data-state="unavailable"] svg { color: var(--MCM-danger); }
.MCM-resale-thumb-row { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.MCM-resale-thumb-row::-webkit-scrollbar { display: none; }
.MCM-resale-thumb {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 13px;
  padding: 0;
  background: var(--MCM-surface-soft);
}
.MCM-resale-thumb[aria-current="true"] { border-color: var(--MCM-primary); }
.MCM-resale-thumb img { width: 100%; height: 100%; object-fit: cover; }
.MCM-resale-product-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.MCM-resale-overline {
  margin: 0 0 4px;
  color: var(--MCM-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.MCM-resale-product-heading h1 { margin: 0; font-family: var(--font-display); font-size: clamp(25px, 7vw, 34px); line-height: 1.04; letter-spacing: -0.04em; }
.MCM-resale-price-wrap { text-align: right; white-space: nowrap; }
.MCM-resale-price { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 800; letter-spacing: -0.035em; }
.MCM-resale-price-label { margin: 2px 0 0; color: var(--MCM-muted); font-size: 12px; }
.MCM-resale-tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; border-top: 1px solid var(--MCM-background); padding-top: 16px; }
.MCM-resale-tag {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--MCM-background);
  color: #3a3a3c;
  font-size: 12px;
  font-weight: 650;
}
.MCM-resale-tag svg { width: 15px; height: 15px; }
.MCM-resale-tag[data-verified="true"] { background: rgba(52,199,89,0.11); color: #237b38; }
.MCM-resale-tag[data-verified="false"] { background: rgba(255,149,0,0.12); color: #8a4b00; }
.MCM-resale-action-card { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px; }
.MCM-resale-action {
  display: inline-flex;
  min-width: 44px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 17px;
  font-weight: 700;
  transition: transform 160ms var(--MCM-spring), opacity 160ms ease, background 160ms ease;
}
.MCM-resale-action-primary { background: var(--MCM-accent); color: #fff; }
.MCM-resale-action-secondary { background: rgba(118,118,128,0.12); color: var(--MCM-text); }
.MCM-resale-action:active { transform: scale(0.985); opacity: 0.72; }
.MCM-resale-action:disabled { cursor: not-allowed; opacity: 0.45; }
.MCM-resale-widget-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.MCM-resale-widget-card {
  min-height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(60,60,67,0.10);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 2px 12px rgba(20,36,61,0.05);
  text-align: center;
}
.MCM-resale-widget-card[hidden] { display: none; }
.MCM-resale-widget-grid:has(.MCM-resale-ad-card[hidden]) { grid-template-columns: 1fr; }
.MCM-resale-widget-label { margin: 0; color: var(--MCM-muted); font-size: 11px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.MCM-resale-countdown { display: grid; gap: 8px; width: 100%; }
.MCM-resale-countdown-value { margin: 0; color: var(--MCM-primary); font-family: var(--font-display); font-size: clamp(19px, 5vw, 27px); font-weight: 800; letter-spacing: -0.035em; }
.MCM-resale-countdown-copy { margin: 0; color: var(--MCM-muted); font-size: 12px; line-height: 1.35; }
.MCM-resale-ad-slot { width: 100%; min-height: 90px; overflow: hidden; }
.MCM-resale-section-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 19px; font-weight: 750; letter-spacing: -0.025em; }
.MCM-resale-body-copy { margin: 0; color: var(--MCM-muted); font-size: 15px; line-height: 1.5; }
.MCM-resale-body-copy strong { color: var(--MCM-text); }
.MCM-resale-sell-link { width: 100%; margin-top: 18px; }
.MCM-resale-tabs { scroll-margin-top: 16px; }
.MCM-resale-tab-list {
  display: flex;
  gap: 3px;
  border-radius: 11px;
  padding: 3px;
  background: rgba(118,118,128,0.12);
}
.MCM-resale-tab-button {
  flex: 1;
  min-width: 44px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--MCM-muted);
  font-size: 12px;
  font-weight: 650;
}
.MCM-resale-tab-button svg { width: 19px; height: 19px; }
.MCM-resale-tab-button[aria-selected="true"] { background: #fff; color: var(--MCM-text); box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
.MCM-resale-tab-panel { margin-top: 12px; }
.MCM-resale-tab-panel[hidden] { display: none; }
.MCM-resale-warning { padding: 13px 16px; border-bottom: 1px solid rgba(255,59,48,0.10); background: rgba(255,59,48,0.09); color: var(--MCM-danger); text-align: center; font-size: 12px; font-weight: 800; }
.MCM-resale-product-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.MCM-resale-price-list { overflow: hidden; border-radius: 14px; background: var(--MCM-background); }
.MCM-resale-price-row { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; font-size: 15px; }
.MCM-resale-price-row:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.72); }
.MCM-resale-price-row span:first-child { color: var(--MCM-muted); }
.MCM-resale-price-row strong { font-weight: 700; }
.MCM-resale-price-row-final { background: rgba(118,118,128,0.08); }
.MCM-resale-price-row-final span:first-child { color: var(--MCM-text); font-weight: 750; }
.MCM-resale-price-row-final strong { color: var(--MCM-accent); font-size: 17px; }
.MCM-resale-auth-note { margin: 0 0 14px; border-radius: 14px; padding: 12px; background: rgba(34,90,167,0.08); color: var(--MCM-primary-dark); font-size: 14px; font-weight: 650; line-height: 1.4; }
.MCM-resale-form { display: grid; gap: 12px; }
.MCM-resale-field { display: grid; gap: 6px; }
.MCM-resale-field label { color: var(--MCM-muted); font-size: 13px; font-weight: 700; }
.MCM-resale-input {
  width: 100%;
  min-height: 50px;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--MCM-background);
  color: var(--MCM-text);
  font-family: inherit;
  font-size: 17px;
  outline: none;
}
.MCM-resale-input:focus { border-color: rgba(34,90,167,0.48); background: #fff; }
.MCM-resale-input[readonly] { color: #3a3a3c; background: rgba(118,118,128,0.08); cursor: default; }
.MCM-resale-input[readonly]:focus { border-color: transparent; box-shadow: none; }
textarea.MCM-resale-input { min-height: 116px; resize: vertical; }
.MCM-resale-offer-field[hidden] { display: none; }
.MCM-resale-form-status { min-height: 20px; margin: 0; color: var(--MCM-muted); font-size: 13px; font-weight: 650; }
.MCM-resale-form-status[data-state="error"] { color: var(--MCM-danger); }
.MCM-resale-form-status[data-state="success"] { color: #237b38; }
.MCM-resale-form-disclaimer { margin: 0; color: var(--MCM-tertiary); font-size: 12px; line-height: 1.4; text-align: center; }
.MCM-resale-essentials-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.MCM-resale-essentials-header h2 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: -0.025em; }
.MCM-resale-essentials-header span { color: var(--MCM-muted); font-size: 12px; font-weight: 650; }
.MCM-resale-essential-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.MCM-resale-essential-card { overflow: hidden; border: 1px solid var(--MCM-line); border-radius: 18px; background: #fff; }
.MCM-resale-essential-card a { display: grid; grid-template-columns: 94px minmax(0,1fr); min-height: 94px; color: inherit; text-decoration: none; }
.MCM-resale-essential-card img { width: 94px; height: 94px; object-fit: cover; background: var(--MCM-background); }
.MCM-resale-essential-copy { display: grid; align-content: center; gap: 4px; padding: 12px; }
.MCM-resale-essential-copy h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.MCM-resale-essential-copy p { margin: 0; color: var(--MCM-muted); font-size: 12px; }
.MCM-resale-essential-copy strong { font-size: 15px; }
.MCM-resale-loading-card { min-height: 420px; }
.MCM-resale-loading-media { aspect-ratio: 4 / 5; background: rgba(118,118,128,0.12); }

.MCM-resale-action:focus-visible,
.MCM-resale-back-link:focus-visible,
.MCM-resale-thumb:focus-visible,
.MCM-resale-tab-button:focus-visible,
.MCM-resale-input:focus-visible {
  outline: 3px solid rgba(0,122,255,0.34);
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .MCM-resale-shell { width: min(42rem, calc(100% - 40px)); }
  .MCM-resale-hero-wrap { aspect-ratio: 16 / 11; }
  .MCM-resale-action-card { grid-template-columns: 1fr 1fr; }
  .MCM-resale-essential-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}


@media (min-width: 768px) {
  .MCM-resale-product-section { padding-top: 2rem; }
  .MCM-resale-shell { width: min(48rem, calc(100% - 64px)); }
  .MCM-resale-card,
  .MCM-resale-widget-card { border-radius: 24px; }
  .MCM-resale-card-body { padding: 24px; }
  .MCM-resale-tab-list { padding: 4px; border-radius: 13px; }
  .MCM-resale-tab-button { min-height: 54px; border-radius: 10px; }
  .MCM-resale-product-detail-grid { gap: 22px; }
}

@media (max-width: 719px) {
  .MCM-resale-product-section { padding-bottom: 20px; }
  .MCM-resale-context-bar { min-height: 48px; }
  .MCM-resale-product-heading { grid-template-columns: 1fr; }
  .MCM-resale-price-wrap { text-align: left; }
  .MCM-resale-card-body { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .MCM-resale-action { transition-duration: 1ms; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .MCM-resale-product-section { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
}
