/* ================================================================
   cart.css — Cart page, checkout, product/checkout dialogs
   ================================================================ */

/* ---- Cart Page ---- */
.cart-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; margin-top: 28px; }
.large-lines { margin: 0; overflow: visible; }
.large-lines .cart-line { grid-template-columns: 58px minmax(0, 1fr) auto; padding: 13px; background: var(--surface); }
.large-lines .cart-line-art { width: 58px; height: 58px; }
.large-lines .cart-line-copy strong { font-size: 12px; }
.checkout-card { position: sticky; top: 98px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.checkout-card > div { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.checkout-card > div strong { color: var(--ink); }
.checkout-card hr { margin: 17px 0; border: 0; border-top: 1px solid var(--line); }
.checkout-card .total-row strong { font-size: 20px; }

/* ---- Dialogs (shared) ---- */
dialog { width: min(440px, calc(100% - 24px)); padding: 0; color: var(--ink); background: var(--surface); border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(23, 23, 20, .25); }
dialog::backdrop { background: rgba(23, 23, 20, .55); backdrop-filter: blur(5px); }
dialog form { position: relative; padding: 26px; }
.dialog-close { position: absolute; top: 13px; right: 13px; z-index: 2; display: grid; width: 31px; height: 31px; place-items: center; color: #706e66; background: rgba(255,255,255,.85); border-radius: 99px; font-size: 20px; }
.dialog-art { display: grid; height: 120px; place-items: center; margin: -12px -12px 20px; color: white; background: radial-gradient(circle at 35% 25%, #ffa27d, #ef5a2f 58%, #9e3218); border-radius: 16px; font-family: Georgia, serif; font-size: 54px; font-weight: 700; }
dialog h2 { margin: 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; letter-spacing: -.04em; }
.dialog-description { margin: 8px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.option-group { margin: 17px 0; }
.option-group label, .checkout-dialog label { display: block; margin-bottom: 8px; color: #55534d; font-size: 9px; font-weight: 900; }
.option-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.option-buttons button { min-height: 34px; padding: 0 11px; color: #66635b; background: #eeeae0; border-radius: 9px; font-size: 8px; font-weight: 900; }
.option-buttons button.active { color: white; background: var(--ink); }
.dialog-lines-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.dialog-lines-group > .secondary-button { margin-top: 0; }
.dialog-lines-group > label { display: block; margin: 12px 0 8px; color: #55534d; font-size: 9px; font-weight: 900; }
.dialog-lines { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.dialog-lines:empty { display: none; }
.dialog-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 8px 10px; color: var(--ink); background: #f3f0e8; border-radius: 10px; font-size: 9px; font-weight: 700; }
.dialog-line span { flex: 1; line-height: 1.35; }
.dialog-line button { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; color: #706e66; background: rgba(255,255,255,.85); border-radius: 8px; font-size: 16px; }
.quantity-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; margin-top: 18px; border-top: 1px solid var(--line); }
.quantity-row > span { font-size: 9px; font-weight: 900; }
.quantity-row > div { display: flex; align-items: center; gap: 12px; }
.quantity-row button { display: grid; width: 28px; height: 28px; place-items: center; color: var(--accent-dark); background: var(--accent-soft); border-radius: 8px; font-size: 17px; }
.quantity-row strong { min-width: 12px; font-size: 11px; text-align: center; }

/* ---- Checkout Dialog ---- */
.checkout-dialog form { display: grid; gap: 13px; }
.checkout-header { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.checkout-icon { display: grid; width: 52px; height: 52px; place-items: center; flex: 0 0 52px; color: white; background: var(--accent); border-radius: 16px; box-shadow: 0 8px 24px rgba(239, 90, 47, .28); }
.checkout-icon.brand-logo-icon { background: #fff; padding: 4px; overflow: hidden; }
.checkout-icon.brand-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.checkout-icon svg { width: 22px; height: 22px; stroke: none; fill: currentColor; }
.checkout-header-text h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; letter-spacing: -.04em; }
.checkout-description { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.checkout-fields { display: grid; gap: 16px; }
.checkout-fields .field-label input,
.checkout-fields .field-label textarea,
#quick-register-step .field-label input { width: 100%; min-height: 48px; padding: 11px 14px; margin-top: 2px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; outline: none; font-size: 11px; transition: border-color .18s ease, box-shadow .18s ease; }
.checkout-fields .field-label textarea { min-height: 80px; resize: vertical; }
.checkout-fields .field-label input::placeholder,
.checkout-fields .field-label textarea::placeholder { color: #b8b4aa; }
.checkout-fields .field-label input:focus,
.checkout-fields .field-label textarea:focus,
#quick-register-step .field-label input:focus { border-color: #e5ac9a; box-shadow: 0 0 0 4px rgba(239, 90, 47, .08); }
.checkout-submit { position: relative; min-height: 52px; border-radius: 14px; font-size: 12px; }
.checkout-submit .btn-spinner { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s ease; }
.checkout-submit .btn-spinner svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; animation: spin .8s linear infinite; }
.checkout-submit.is-loading .btn-text { opacity: 0; }
.checkout-submit.is-loading .btn-spinner { opacity: 1; }
.checkout-total { display: flex; align-items: center; justify-content: space-between; padding: 14px; background: #f3f0e8; border-radius: 12px; }
.checkout-total span { color: var(--muted); font-size: 10px; font-weight: 700; }
.checkout-total strong { font-size: 18px; }
.checkout-success { display: grid; place-items: center; gap: 10px; padding: 28px 8px; text-align: center; animation: rise .35s ease both; }
.checkout-success-icon { display: grid; width: 56px; height: 56px; place-items: center; color: white; background: var(--green); border-radius: 18px; box-shadow: 0 8px 24px rgba(39, 124, 83, .28); }
.checkout-success-icon svg { width: 26px; height: 26px; stroke: none; fill: currentColor; }
.checkout-success strong { font-size: 15px; color: var(--ink); }
.checkout-success p { margin: 0; font-size: 11px; color: var(--muted); }
.checkout-form-success .checkout-header,
.checkout-form-success .checkout-description,
.checkout-form-success .checkout-fields,
.checkout-form-success .quick-register,
.checkout-form-success .checkout-total,
.checkout-form-success .checkout-submit { display: none; }
#quick-register-step { display: grid; gap: 16px; }
#quick-register-step.hidden { display: none; }

/* ---- Voice Summary Dialog ---- */
.voice-summary-dialog { width: min(480px, calc(100% - 24px)); }
.voice-summary-content { position: relative; display: grid; gap: 14px; padding: 26px; }
.voice-summary-description { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.voice-summary-body { display: grid; gap: 10px; }
.voice-summary-section {
  display: grid; gap: 8px;
  padding: 13px;
  background: #f8f5ee;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.voice-summary-section h3 { margin: 0; font-size: 12px; color: var(--ink); }
.voice-summary-section p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.voice-summary-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.voice-summary-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; line-height: 1.35; }
.voice-summary-list span { color: var(--muted); }
.voice-summary-list strong { color: var(--ink); text-align: right; }

/* ---- Responsive ---- */
@media (max-width: 620px) {
  .cart-page-grid { grid-template-columns: 1fr; }
  .checkout-card { position: static; }
  .large-lines .cart-line { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .large-lines .cart-line-art { width: 48px; height: 48px; }
  dialog form { padding: 21px; }
  .checkout-dialog form { padding: 24px 20px 22px; }
  .checkout-header { gap: 12px; }
  .checkout-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; }
  .checkout-icon svg { width: 20px; height: 20px; }
  .checkout-header-text h2 { font-size: 22px; }
}
