/* ==========================================================================
   Section Shop — buyer-facing forms (spec §8)
   Extends style.css base .field/.btn/.card/.badge using the shared tokens.
   Mobile-first; breakpoint: 760px (var(--bp-mobile)).
   ========================================================================== */

.form-page {
    padding: 40px 0 64px;
    background: var(--surface-alt);
    min-height: 60vh;
}

.form-page h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

.container--narrow { max-width: 780px; }

.form-page__lead {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin-bottom: 24px;
}

/* Required / optional markers */
.req  { color: var(--error); font-weight: 700; }
.opt  { color: var(--muted); font-weight: 400; font-size: .85rem; }

/* The form itself */
.form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
}
@media (min-width: 760px) {
    .form-card { padding: 32px; }
}

.form-card fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 16px;
}
.form-card legend {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    padding: 0;
}

.field__sublabel { font-weight: 500 !important; font-size: .9rem; }

/* Side-by-side fields on desktop, stacked on mobile */
.form-row { display: grid; gap: 0 16px; }
@media (min-width: 760px) {
    .form-row { grid-template-columns: 1fr 1fr; }
    .form-row--three { grid-template-columns: 1fr 1fr 1fr; }
}

/* Buyer-type radios as selectable cards */
.radio-cards {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
@media (min-width: 760px) {
    .radio-cards { grid-template-columns: repeat(4, 1fr); }
}

.radio-card {
    position: relative;
    cursor: pointer;
    margin: 0;
}
.radio-card input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.radio-card__body {
    display: block;
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
    color: var(--navy);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.radio-card:hover .radio-card__body { border-color: var(--gold); }
.radio-card input:checked + .radio-card__body {
    border-color: var(--gold);
    background: #FDF6E3;
    box-shadow: 0 0 0 1px var(--gold);
}
.radio-card input:focus-visible + .radio-card__body {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Region checkbox chips — responsive grid */
.checkbox-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) {
    .checkbox-grid { grid-template-columns: repeat(3, 1fr); }
}

.checkbox-list {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
}

.checkbox-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-weight: 500;
    font-size: .95rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin: 0;
    transition: border-color .15s ease, background-color .15s ease;
}
.checkbox-chip:hover { border-color: var(--gold); }
.checkbox-chip:has(input:checked) {
    border-color: var(--gold);
    background: #FDF6E3;
}
.checkbox-chip input { accent-color: var(--gold-dark); width: 18px; height: 18px; flex: none; }
.checkbox-chip--wide { padding: 11px 14px; }

/* Consent row */
.checkbox-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
}
.checkbox-consent input { accent-color: var(--gold-dark); width: 20px; height: 20px; flex: none; margin-top: 3px; }

.form-actions { margin-top: 8px; }
.form-actions .field__hint { text-align: center; margin-top: 12px; }

/* File input */
.field input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: var(--surface-alt);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Offer lot summary card (spec §8.3 — fixed context at the top of the form)
   -------------------------------------------------------------------------- */
.lot-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    background: var(--navy);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.lot-summary__dev {
    color: var(--gold);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 2px;
}
.lot-summary__title { color: #fff; margin: 0; font-size: 1.4rem; }
.lot-summary__specs { color: #C9D6E6; margin: 4px 0 0; font-size: .95rem; }
.lot-summary__side { text-align: right; display: grid; gap: 6px; justify-items: end; }
.lot-summary__price { color: var(--gold); font-size: 1.5rem; font-weight: 800; margin: 0; }

/* --------------------------------------------------------------------------
   Result panels (success / error / confirmation pages)
   -------------------------------------------------------------------------- */
.result-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 22px;
    margin-bottom: 24px;
}
@media (min-width: 760px) {
    .result-panel { padding: 36px; }
}
.result-panel--success { border-left-color: var(--success); }
.result-panel--error   { border-left-color: var(--error); }

.result-panel h1, .result-panel h2 { margin-top: 0; }

.result-panel__errors {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--error);
}
.result-panel--error .result-panel__errors { margin-bottom: 0; }

.result-panel__steps { padding-left: 22px; }
.result-panel__steps li { margin-bottom: 8px; }

.result-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Watchlist
   -------------------------------------------------------------------------- */
.watchlist__heading {
    margin-top: 32px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
    font-size: 1.2rem;
}
.watchlist__empty { color: var(--muted); }
.watchlist__browse { margin-top: 32px; }

.watch-card__dev {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 4px;
}
.watch-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.watch-card__actions .btn { padding: 9px 16px; font-size: .92rem; }
.watch-remove { margin: 0; }
