/* ═══ Cart Page — Brutalist Design System ═══ */

.marketplace-container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-lg);
    color: var(--text-primary);
}

.market-header {
    margin-bottom: var(--space-lg);
}

.market-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.market-header p {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* ═══ Step Cards ═══ */
.step-card {
    background: var(--surface-color);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.step-card h3 {
    margin: 0 0 var(--space-md) 0;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-light);
}

/* ═══ Subject Selector ═══ */
.subject-selector {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-color);
    color: var(--text-primary);
    border: 2px solid var(--border-dark);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* ═══ Option Cards (Full / Custom) ═══ */
.option-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.option-card.selected {
    border-color: var(--border-dark);
    background: var(--accent-mint);
}

.radio-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.option-card.selected .radio-circle {
    border-color: var(--border-dark);
}

.option-card.selected .radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-primary);
}

.opt-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
}

.opt-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ═══ Chapter Checklist ═══ */
.chapter-list-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.chapter-list-hidden.show {
    max-height: 2000px;
}

.chapter-check-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.chapter-check-item:last-child {
    border-bottom: none;
}

.chapter-check-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.chapter-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #000;
    flex-shrink: 0;
}

/* ═══ Summary Box ═══ */
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-row.total-row {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 800;
    margin-top: 12px;
}

hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 12px 0;
}

/* ═══ Buttons ═══ */
.btn-buy-proceed {
    width: 100%;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: var(--radius-pill);
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.15s ease;
}

.btn-buy-proceed:hover {
    background: #222;
}

.btn-buy-proceed:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-upload {
    width: 100%;
    padding: 14px;
    background: var(--bg-color);
    border: 2px dashed var(--border-dark);
    border-radius: 16px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.btn-upload:hover {
    border-color: var(--text-secondary);
}

/* ═══ Back Button ═══ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-dark);
    margin-bottom: var(--space-md);
    transition: background-color 0.15s ease;
}

.back-btn:hover {
    background: var(--bg-color);
}

/* ═══ Status Banner ═══ */
.status-banner {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
}

.status-banner .status-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.status-banner h3 {
    border: none;
    padding: 0;
    margin-bottom: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.status-banner p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ═══ Order History ═══ */
.order-item {
    padding: var(--space-md);
    border-bottom: 2px solid var(--border-light);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.order-item-header strong {
    font-size: 0.95rem;
}

.order-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-dark);
}

.order-status.pending {
    background: var(--accent-peach);
}

.order-status.delivered {
    background: var(--accent-mint);
}

.order-item-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
