/* ============================================================
   SHOP + ACCOUNT — cart, checkout, payment result, orders, sign-in
   ============================================================ */
.sh-page { background: var(--bg-light); padding: 40px 0 96px; min-height: 60vh; }
.sh-page--auth { padding-top: 64px; }
.sh-narrow { max-width: 860px; }
.sh-title { font-size: 2rem; font-weight: 300; line-height: 1.2; margin: 0 0 20px; color: var(--text-primary); }
.sh-h2 { font-size: 0.95rem; font-weight: 700; margin: 0 0 14px; }
.sh-muted { color: var(--text-secondary); font-size: 0.75rem; margin: 0; }
.sh-note { font-size: 0.6rem; color: var(--text-secondary); line-height: 1.5; margin: 12px 0 0; }
.sh-help { font-size: 0.65rem; color: var(--text-secondary); line-height: 1.5; margin: -4px 0 16px; }
.sh-crumb { margin: 0 0 12px; font-size: 0.7rem; }
.sh-link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: 0.7rem; cursor: pointer; text-decoration: none; }
.sh-link:hover { text-decoration: underline; }
.sh-block { width: 100%; justify-content: center; }

.sh-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 24px; margin-bottom: 20px; min-width: 0; }
.sh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sh-grid--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sh-col { min-width: 0; }

/* Alerts */
.sh-alert { border-radius: 6px; padding: 12px 16px; font-size: 0.7rem; line-height: 1.5; margin: 0 0 20px; border: 1px solid; }
.sh-alert--success { background: #edf7ef; border-color: #b7dfc0; color: #1e5b2d; }
.sh-alert--error { background: #fdecec; border-color: #f3b9b9; color: #8a1c1c; }
.sh-alert--info { background: #eaf3fa; border-color: #b9d6ec; color: #0e416c; }
.sh-paybar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sh-paybar .t2-button { flex-shrink: 0; }

/* Steps */
.sh-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; flex-wrap: wrap; }
.sh-steps li { display: flex; align-items: center; gap: 8px; font-size: 0.65rem; font-weight: 600; color: #8c949b; }
.sh-steps li:not(:last-child)::after { content: ''; width: 28px; height: 1px; background: #c9ced3; margin-left: 4px; }
.sh-steps span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #c9ced3; display: inline-flex; align-items: center; justify-content: center; font-size: 0.55rem; background: #fff; }
.sh-steps .is-current { color: var(--text-primary); }
.sh-steps .is-current span { background: var(--dark-grey); border-color: var(--dark-grey); color: #fff; }
.sh-steps .is-done { color: var(--primary); }
.sh-steps .is-done span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Empty state */
.sh-empty { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 48px 24px; text-align: center; }
.sh-empty h2 { font-size: 1.25rem; font-weight: 400; margin: 0 0 8px; }
.sh-empty p { font-size: 0.75rem; color: var(--text-secondary); margin: 0 0 24px; }

/* Cart items */
.sh-items { padding: 0; overflow: hidden; }
.sh-items__head, .sh-item { display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px; gap: 16px; align-items: center; padding: 16px 24px; }
.sh-items__head { background: var(--bg-light); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); }
.sh-items__head span:not(:first-child), .sh-item__amount { text-align: right; }
.sh-item { border-top: 1px solid var(--border-color); }
.sh-item__info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.sh-item__name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.sh-item__name:hover { color: var(--primary); }
.sh-item__meta { font-size: 0.6rem; color: var(--text-secondary); }
.sh-item__remove { font-size: 0.6rem; color: #b42318; }
.sh-item__qty input { width: 90px; margin-left: auto; display: block; }
.sh-item__amount { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.sh-items__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border-color); flex-wrap: wrap; }

/* Summary */
.sh-summary h2 { font-size: 0.95rem; font-weight: 700; margin: 0 0 16px; }
.sh-summary--sticky { position: sticky; top: 140px; }
.sh-summary__cta { width: 100%; justify-content: center; margin-top: 16px; }
.sh-summary .sh-link { display: inline-block; margin-top: 14px; }
.sh-currency { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 0.65rem; color: var(--text-secondary); }
.sh-currency span { margin-right: 4px; }
.sh-currency button, .sh-currency label {
  border: 1px solid var(--border-color); background: #fff; border-radius: 20px; padding: 5px 14px;
  font: inherit; font-size: 0.65rem; font-weight: 700; color: var(--text-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.sh-currency input { position: absolute; opacity: 0; pointer-events: none; }
.sh-currency .is-active { background: var(--dark-grey); border-color: var(--dark-grey); color: #fff; }
.sh-currency label:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.sh-totals { margin: 0; }
.sh-totals div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.7rem; border-bottom: 1px solid var(--border-color); }
.sh-totals dt { color: var(--text-secondary); }
.sh-totals dd { margin: 0; font-weight: 600; text-align: right; }
.sh-totals .sh-muted { font-weight: 400; font-size: 0.65rem; }
.sh-totals__total { border-bottom: 0 !important; padding-top: 12px !important; }
.sh-totals__total dt, .sh-totals__total dd { color: var(--text-primary); font-size: 0.9rem; font-weight: 700; }
.sh-assure { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border-color); }
.sh-assure li { position: relative; padding-left: 22px; font-size: 0.62rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.sh-assure li::before { content: '✓'; position: absolute; left: 0; color: #1e8a44; font-weight: 700; }
.sh-mini { list-style: none; margin: 0 0 8px; padding: 0; }
.sh-mini li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 0.7rem; }
.sh-mini li[hidden] { display: none; }
.sh-mini em { font-style: normal; color: var(--text-secondary); }
.sh-mini small { display: block; font-size: 0.58rem; color: var(--text-secondary); }
.sh-mini li > span:last-child { font-weight: 600; white-space: nowrap; }

/* Forms */
.sh-signin { font-size: 0.7rem; margin: -8px 0 20px; }
.sh-fieldset { border: 1px solid var(--border-color); margin: 0 0 20px; }
.sh-fieldset legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sh-fieldset legend + * { clear: both; }
.sh-num { width: 26px; height: 26px; border-radius: 50%; background: var(--dark-grey); color: #fff; font-size: 0.6rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sh-optional { font-size: 0.6rem; font-weight: 400; color: var(--text-secondary); }
.sh-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.sh-field { margin-bottom: 16px; min-width: 0; }
.sh-field label { display: block; font-size: 0.65rem; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.sh-field input, .sh-field select, .sh-field textarea, .sh-item__qty input {
  width: 100%; border: 1px solid #c9ced3; border-radius: 4px; padding: 10px 12px; font: inherit; font-size: 0.75rem;
  background: #fff; color: var(--text-primary); min-height: 44px; box-sizing: border-box;
}
.sh-field textarea { min-height: 80px; resize: vertical; }
.sh-field input[readonly], .sh-field input:disabled { background: var(--bg-light); color: var(--text-secondary); }
.sh-field input:focus, .sh-field select:focus, .sh-field textarea:focus, .sh-item__qty input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 99, 163, 0.15); }
.sh-field.has-error input, .sh-field.has-error select { border-color: #c62828; }
.sh-error { color: #c62828; font-size: 0.6rem; margin: 6px 0 0; }
.sh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.68rem; line-height: 1.5; cursor: pointer; }
.sh-check--block { margin: 0 0 14px; }
.sh-check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--primary); }
.sh-check.has-error span { color: #8a1c1c; }
.sh-check + .sh-error { margin: -10px 0 14px 28px; }
.sh-billing[hidden], #accountFields[hidden] { display: none; }
.sh-billing { padding-top: 4px; }

/* Payment result */
.sh-result { text-align: center; padding: 40px 32px; }
.sh-result h1 { font-size: 1.6rem; font-weight: 300; margin: 0 0 8px; }
.sh-result__icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: #fff; }
.sh-result--ok .sh-result__icon { background: #1e8a44; }
.sh-result--fail .sh-result__icon { background: #c62828; }
.sh-result--wait .sh-result__icon { background: none; border: 4px solid var(--border-color); border-top-color: var(--primary); }
.sh-spin { animation: sh-spin 0.9s linear infinite; }
@keyframes sh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sh-spin { animation: none; } }
.sh-lead { font-size: 0.8rem; color: var(--text-secondary); margin: 0 0 20px; }
.sh-next { text-align: left; max-width: 560px; margin: 0 auto 24px; padding: 16px 20px 16px 36px; background: var(--bg-light); border-radius: 6px; font-size: 0.7rem; line-height: 1.6; }
.sh-next li { margin-bottom: 4px; }
.sh-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Tables */
.sh-table { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
.sh-table th { text-align: left; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); padding: 10px 8px; border-bottom: 1px solid var(--border-color); }
.sh-table td { padding: 12px 8px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
.sh-table small { display: block; color: var(--text-secondary); font-size: 0.6rem; margin-top: 2px; }
.sh-table .num { text-align: right; white-space: nowrap; }
.sh-table tfoot td { border-bottom: 0; padding: 6px 8px; text-align: right; color: var(--text-secondary); }
.sh-table tfoot td.num { color: var(--text-primary); }
.sh-table__total td { font-size: 0.85rem; font-weight: 700; color: var(--text-primary) !important; padding-top: 12px !important; border-top: 1px solid var(--border-color); }
.sh-table a { color: var(--primary); text-decoration: none; }
.sh-table__actions { text-align: right; white-space: nowrap; }
.sh-table__actions a { margin-left: 12px; }

/* Status badges */
.sh-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.58rem; font-weight: 700; background: #eceef1; color: #3a4147; white-space: nowrap; }
.sh-badge--pending { background: #fff4d6; color: #7a5300; }
.sh-badge--paid { background: #e3f0fb; color: #0e416c; }
.sh-badge--fulfilled { background: #e3f4e7; color: #1e5b2d; }
.sh-badge--failed, .sh-badge--cancelled { background: #fdecec; color: #8a1c1c; }
.sh-badge--refunded, .sh-badge--review { background: #f1e9fb; color: #4b2a7a; }

/* Order page */
.sh-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sh-order-head .sh-title { margin-bottom: 6px; }
.sh-order-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sh-track { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0 0 20px; padding: 0; background: #fff; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.sh-track li { padding: 16px 20px 16px 48px; position: relative; font-size: 0.68rem; border-right: 1px solid var(--border-color); }
.sh-track li:last-child { border-right: 0; }
.sh-track li::before { content: ''; position: absolute; left: 18px; top: 18px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9ced3; box-sizing: border-box; }
.sh-track li.is-done::before { background: #1e8a44; border-color: #1e8a44; }
.sh-track strong { display: block; }
.sh-track span { color: var(--text-secondary); font-size: 0.6rem; }
.sh-details p { font-size: 0.7rem; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.sh-details a { color: var(--primary); }
.sh-callout { background: #fffaf0; border-color: #f4dfae; }
.sh-callout p { font-size: 0.7rem; line-height: 1.6; margin: 0; }

/* Auth + account */
.sh-auth { max-width: 520px; margin: 0 auto; padding: 32px; }
.sh-auth .sh-muted { margin: -8px 0 20px; }
.sh-auth__links { font-size: 0.68rem; text-align: center; margin: 20px 0 0; }
.sh-auth__links a, .sh-signin a { color: var(--primary); }
.sh-account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sh-account-head .sh-title { margin: 0 0 4px; }
.sh-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin: 0 0 24px; overflow-x: auto; }
.sh-tabs a { padding: 10px 16px; font-size: 0.7rem; font-weight: 600; color: var(--text-secondary); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sh-tabs a.is-active { color: var(--text-primary); border-bottom-color: var(--gold); }

/* Responsive */
@media (max-width: 1000px) {
  .sh-grid, .sh-grid--even { grid-template-columns: minmax(0, 1fr); }
  .sh-summary--sticky { position: static; }
}
@media (max-width: 640px) {
  .sh-page { padding: 24px 0 64px; }
  .sh-title { font-size: 1.5rem; }
  .sh-card { padding: 18px 16px; }
  .sh-row { grid-template-columns: minmax(0, 1fr); }
  .sh-items { padding: 0; }
  .sh-items__head { display: none; }
  .sh-items__head + .sh-item { border-top: 0; }
  .sh-item { grid-template-columns: minmax(0, 1fr) auto; padding: 16px; }
  .sh-item__info { grid-column: 1 / -1; }
  .sh-item__qty input { margin-left: 0; }
  .sh-items__foot { padding: 16px; }
  .sh-track { grid-template-columns: minmax(0, 1fr); }
  .sh-track li { border-right: 0; border-bottom: 1px solid var(--border-color); }
  .sh-track li:last-child { border-bottom: 0; }
  .sh-steps li:not(:last-child)::after { width: 10px; }
  .sh-result { padding: 28px 16px; }
  .sh-auth { padding: 24px 16px; }
  /* Stack table rows as cards */
  .sh-table thead { display: none; }
  .sh-table, .sh-table tbody, .sh-table tr, .sh-table td { display: block; width: 100%; }
  .sh-table tbody tr { border-bottom: 1px solid var(--border-color); padding: 8px 0; }
  .sh-table tbody td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .sh-table tbody td::before { content: attr(data-label); color: var(--text-secondary); font-size: 0.6rem; text-align: left; }
  .sh-table tbody td[data-label="Item"] { display: block; text-align: left; font-weight: 600; }
  .sh-table tbody td[data-label="Item"]::before { content: none; }
  .sh-table tfoot, .sh-table tfoot tr { display: table; width: 100%; }
  .sh-table tfoot tr { display: flex; justify-content: space-between; }
  .sh-table tfoot td { display: block; width: auto; }
  .sh-table__actions { text-align: left !important; justify-content: flex-start !important; }
  .sh-table__actions::before { content: none !important; }
  .sh-table__actions a { margin: 0 16px 0 0; }
}

/* Education eligibility + uploaded files */
.sh-h3 { font-size: 0.75rem; font-weight: 700; margin: 16px 0 8px; }
.sh-list { margin: 0 0 16px; padding-left: 20px; font-size: 0.68rem; line-height: 1.6; color: var(--text-primary); }
.sh-edu { border-left: 4px solid var(--gold); }
.sh-edu input[type="file"] { padding: 8px; min-height: 0; background: var(--bg-light); }
.sh-files { list-style: none; margin: -4px 0 16px; padding: 0; }
.sh-files li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; margin-bottom: 6px; font-size: 0.65rem; overflow-wrap: anywhere; }
.sh-files small { color: var(--text-secondary); margin-left: 6px; }
.sh-files li::before { content: '✓'; color: #1e8a44; font-weight: 700; margin-right: 4px; }
.sh-files li > span { flex: 1; }
.sh-rows { width: 100%; border-collapse: collapse; font-size: 0.68rem; }
.sh-rows th { text-align: left; font-weight: 400; color: var(--text-secondary); padding: 4px 12px 4px 0; width: 42%; vertical-align: top; }
.sh-rows td { padding: 4px 0; overflow-wrap: anywhere; }

/* Special price + coupon */
.sh-was { color: var(--text-secondary); font-weight: 400; }
.sh-sale { color: #b42318; }
.sh-sale-badge { display: inline-block; background: #fdecec; color: #b42318; font-size: 0.55rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.sh-totals__discount dt, .sh-totals__discount dd { color: #1e8a44 !important; font-weight: 600; }
.sh-coupon { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border-color); }
.sh-coupon label { display: block; font-size: 0.65rem; font-weight: 600; margin-bottom: 6px; }
.sh-coupon__row { display: flex; gap: 8px; }
.sh-coupon__row input { flex: 1; min-width: 0; border: 1px solid #c9ced3; border-radius: 4px; padding: 8px 12px; font: inherit; font-size: 0.7rem; text-transform: uppercase; min-height: 44px; }
.sh-coupon__row .t2-button { flex-shrink: 0; }
.sh-coupon__applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; font-size: 0.65rem; background: #edf7ef; color: #1e5b2d; padding: 10px 12px; border-radius: 6px; }
.sh-coupon__applied.is-invalid { background: #fdecec; color: #8a1c1c; }
