/* Shared base of checkout.css: the rules every theme has in common. ThemeAssetTagHelper links this file right before the
   theme's own checkout.css, so a theme rule wins on equal specificity. A fix for all themes goes here; a theme-only change
   goes into the theme's file (Themes/README.md, "Ortak CSS tabanı"). */

/* Cart, checkout, payment, order and account pages. Builds on site.css tokens and classes. */
.page-title { margin: 32px 0 24px; }
.page-title-sm { font-size: clamp(28px, 3vw, 36px); }
/* Pre-rendered boxes toggled by scripts (favorites empty state): beats a theme's .box display. */
.box[hidden] { display: none; }
.box .box-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.box .hint { font-size: 14px; color: var(--muted); font-weight: 400; }
.box .hint a:not(.btn), .alert a:not(.btn), .check a:not(.btn) { color: var(--action, var(--brand)); font-weight: var(--fw-semibold, 600); text-decoration: underline; text-underline-offset: 2px; }
.mt-0 { margin-top: 0; }

/* Cart */
.cart-table .product { display: flex; gap: 14px; align-items: center; min-width: 220px; }
.cart-table .product .thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-table .product .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-table .product .name { font-weight: var(--fw-bold, 700); }
.cart-table .num { text-align: right; white-space: nowrap; }
.cart-table .warn-text { color: var(--err); font-size: 13px; font-weight: var(--fw-semibold, 600); }
.cart-table .qty input { width: 72px; }
.cart-table .qty-unit { font-size: 13px; color: var(--muted); margin-left: 8px; }
.cart-table tr.unavailable .product { opacity: .7; }
.remove-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font: var(--fw-semibold, 600) 14px var(--font-body); padding: 8px; min-height: 44px; text-decoration: underline; text-underline-offset: 2px; }
.remove-btn:hover { color: var(--err); }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { flex: 1; min-width: 0; }
.coupon-row .btn { min-height: 48px; border-radius: var(--radius-sm); padding: 0 18px; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: var(--fw-semibold, 600); }
.coupon-applied button { border: 0; background: none; color: inherit; font: var(--fw-semibold, 600) 14px var(--font-body); cursor: pointer; text-decoration: underline; min-height: 32px; }
.free-note { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-weight: var(--fw-semibold, 600); color: var(--ink-2); }
.free-note.ok { background: var(--ok-bg); color: var(--ok); }
.summary .note { font-size: 13px; color: var(--muted); }
/* Display currency other than TL: what is charged (TL) and the approximate converted amount (Shared/_ChargeCurrencyNote). */
.summary .charge-note { margin: 0; background: var(--surface); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.summary .charge-note b { color: var(--ink); }
.summary .charge-approx { display: block; white-space: nowrap; }
.summary [hidden] { display: none; }

/* Checkout */
.saved-addresses { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-addresses button { font: var(--fw-semibold, 600) 14px var(--font-body); min-height: 44px; padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--field); background: var(--panel-bg, #fff); cursor: pointer; text-align: left; color: var(--ink); }
.saved-addresses button small { display: block; font-weight: 400; color: var(--muted); }
.saved-addresses button[aria-pressed=true] { border-color: var(--action, var(--brand)); box-shadow: 0 0 0 1px var(--action, var(--brand)); }
.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.choices .choice { flex: 1 1 180px; }
/* The radio never shrinks when a long label or hint fills the row. */
.choice > input[type="radio"], .choice > input[type="checkbox"] { flex-shrink: 0; }
.choice .aside { margin-left: auto; font-weight: 400; font-size: 14px; color: var(--muted); text-align: right; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.zone-note[hidden], [data-slot-area][hidden], [data-billing-address][hidden], [data-billing][hidden] { display: none; }
.agreement-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.agreement-preview summary { cursor: pointer; padding: 12px 16px; font-weight: var(--fw-semibold, 600); min-height: 44px; }
.agreement-preview .agreement-body { max-height: 360px; overflow: auto; padding: 0 16px 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.agreement-body h2 { font-size: 18px; margin: 16px 0 8px; }
.agreement-body table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.agreement-body th, .agreement-body td { border-bottom: 1px solid var(--line); padding: 6px 4px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.cf-turnstile { min-height: 65px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); }
.secure-note[hidden] { display: none; }

/* Checkout, phones (≤900px): collapsible order summary above the form (details[data-mobile-summary]). The aside summary
   and the submit button stay at the end; wider screens show the aside beside the form, so the bar is not shown there.
   A theme can tint the bar with --co-mini-bg. */
.checkout > .co-mini { flex: 1 1 100%; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--co-mini-bg, var(--accent-soft, var(--surface))); overflow: hidden; }
.co-mini [hidden] { display: none; }
.co-mini-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 16px; cursor: pointer; list-style: none; color: var(--ink); }
.co-mini-bar::-webkit-details-marker { display: none; }
.co-mini-bar:focus-visible { outline: var(--focus-ring, 2px solid var(--action, var(--brand))); outline-offset: -2px; }
.co-mini-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: var(--fw-semibold, 600); color: var(--action, var(--brand)); }
.co-mini-total { font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-mini[open] .co-mini-when-closed, .co-mini:not([open]) .co-mini-when-open { display: none; }
.co-mini-chevron { flex-shrink: 0; }
.co-mini[open] .co-mini-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) { .co-mini-chevron { transition: transform .2s ease; } }
.co-mini-panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-top: 1px solid var(--line); }
.co-mini-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.co-mini-line { display: flex; align-items: center; gap: 12px; }
.co-mini-line .thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--paper, var(--panel-bg, #fff)); }
.co-mini-line .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.co-mini-line .info b { overflow-wrap: anywhere; }
.co-mini-line > b { white-space: nowrap; }
.co-mini-rows { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 15px; }
.co-mini-rows .r { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.co-mini-rows .r > span:last-child { text-align: right; }
.co-mini-rows .discount { color: var(--ok); }
.co-mini-rows .total { color: var(--ink); font-weight: var(--fw-bold, 700); font-size: 17px; }
@media (min-width: 901px) { .checkout > .co-mini { display: none; } }

/* Delivery mode: address vs store pickup */
.delivery-modes { display: flex; flex-wrap: wrap; gap: 12px; }
.delivery-modes .choice { flex: 1 1 220px; }
.delivery-modes .choice:has(input:checked) { border-color: var(--action, var(--brand)); box-shadow: 0 0 0 1px var(--action, var(--brand)); }
fieldset.delivery-panel { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.delivery-panel[hidden], [data-billing-same-row][hidden] { display: none; }
fieldset.delivery-panel legend { padding: 0; margin-bottom: 8px; }
.pickup-list { display: flex; flex-direction: column; gap: 10px; }
.pickup-option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--field); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; background: var(--panel-bg, #fff); }
.pickup-option input { margin-top: 4px; width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--action, var(--brand)); }
.pickup-option:has(input:checked) { border-color: var(--action, var(--brand)); box-shadow: 0 0 0 1px var(--action, var(--brand)); }

/* Quick order */
.quick-table td { vertical-align: middle; }
.quick-table input.input { min-height: 40px; }
.quick-table .code { width: 180px; }
.quick-table .qty-in { width: 90px; }
.quick-table .row-error { color: var(--err); font-size: 13px; font-weight: var(--fw-semibold, 600); }
.quick-table tr.invalid td { background: var(--err-bg); }
.quick-bulk textarea { min-height: 96px; font-family: ui-monospace, Consolas, monospace; }
/* Account dashboard: customer group card. .box is a column flex box (site.css): this one is a row that wraps on phones. */
.group-status { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.group-status > .stack-sm { flex: 1 1 260px; min-width: 0; }

/* Payment */
.pay-frame { width: 100%; min-height: 600px; border: 0; display: block; }
.pay-state { text-align: center; align-items: center; padding: 48px 28px; }
.pay-state p { max-width: 520px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--action, var(--brand)); animation: vt-spin 1s linear infinite; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Order */
.order-hero { text-align: center; align-items: center; padding: 40px 28px; }
.order-hero .check-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: flex; align-items: center; justify-content: center; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.order-head h1, .order-head h2 { font-size: 24px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0; }
.kv > div { display: flex; flex-direction: column; gap: 4px; }
.kv dt { font-size: 13px; font-weight: var(--fw-bold, 700); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kv dd { margin: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }
.bank-text { white-space: pre-line; background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.order-list { display: flex; flex-direction: column; }
.order-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-row .meta { display: flex; flex-direction: column; gap: 2px; }
/* Phones: number + date on the left, the amount always top right, the status pill under the number. */
@media (max-width: 560px) {
  .order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .order-row .meta { min-width: 0; }
  .order-row > .status { grid-column: 1; justify-self: start; }
  .order-row > b { grid-column: 2; grid-row: 1; white-space: nowrap; }
}

/* Account */
.account-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.account-cards b { font-family: var(--font-display); font-size: 28px; }
@media (max-width: 720px) { .account-cards { grid-template-columns: 1fr; } }
.address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .address-grid { grid-template-columns: 1fr; } }
.address-card.default { border-color: var(--action, var(--brand)); }
.address-card .actions { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: auto; }
.link-btn { border: 0; background: none; padding: 0; min-height: 44px; font: var(--fw-semibold, 600) 15px var(--font-body); color: var(--action, var(--brand)); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger { color: var(--err); }
.account > nav form { margin: 0; }
.account > nav button:hover { background: var(--surface); }
.auth-card .alt { text-align: center; font-size: 15px; }
.auth-card .alt a { color: var(--action, var(--brand)); font-weight: var(--fw-semibold, 600); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 4px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google { border-color: var(--field); }
.auth-google:hover { background: var(--surface); color: var(--ink); }

/* Login method tabs (e-mail / phone code) and the SMS code pages */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-sm); background: var(--surface); }
.auth-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm); text-align: center; font-weight: var(--fw-semibold, 600); font-size: 15px; color: var(--muted); text-decoration: none; }
.auth-tabs a[aria-selected="true"] { background: var(--paper, #fff); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.auth-tabs a:focus-visible { outline: var(--focus-ring, 2px solid var(--action, var(--brand))); outline-offset: 2px; }
.otp-input { font-size: 24px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.otp-submit { align-self: flex-start; }
.otp-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 8px; }
.phone-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.phone-number { font-size: 18px; font-weight: var(--fw-semibold, 600); font-variant-numeric: tabular-nums; }
.phone-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
/* Cash on delivery: SMS code step (/odeme/telefon-onayi) and the hint under the payment choice */
.cod-eyebrow { font-size: 13px; font-weight: var(--fw-semibold, 600); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cod-edit { display: flex; flex-wrap: wrap; gap: 0 20px; }
.choice:has(.choice-note) { flex-wrap: wrap; row-gap: 4px; }
.choice-note { display: block; flex-basis: 100%; padding-left: var(--choice-indent, 38px); font-size: 14px; font-weight: 400; color: var(--muted); }
/* --choice-indent = radio width + its UA margins (8px) + .choice gap (12px); themes with 20px radios set 40px. */
/* Narrow screens: the hint goes under the method name instead of squeezing it onto two lines ("Cari / hesap",
   "Mağazadan / teslim al"). */
@media (max-width: 640px) {
  .stack-sm > .choice, .delivery-modes > .choice { flex-wrap: wrap; row-gap: 2px; }
  .stack-sm > .choice .aside, .delivery-modes > .choice .aside { flex-basis: 100%; margin-left: 0; padding-left: var(--choice-indent, 38px); text-align: left; }
}

/* Order lines (order page, account order page): labels only on phones, where the header row is hidden. */
.cart-table .cell-label { display: none; }

/* Phones: cart rows become cards (no horizontal scrolling). */
@media (max-width: 767px) {
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody { display: block; }
  /* Cart: product with "Kaldır" beside it, the stepper on its own row, labelled unit price and line total at the bottom
     (the stepper and the total never share a row, so long amounts are not clipped). */
  .cart-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "product remove" "qty qty" "price total"; gap: 10px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .cart-table tbody td { padding: 0; border: 0; }
  .cart-table td:nth-child(1) { grid-area: product; }
  .cart-table td:nth-child(2) { grid-area: price; text-align: left; font-size: 14px; align-self: end; white-space: normal; }
  .cart-table:not(.order-lines):not(.quick-table) td:nth-child(2) .cell-label { display: block; color: var(--muted); font-size: 12px; }
  .cart-table td:nth-child(3) { grid-area: qty; }
  .cart-table td:nth-child(4) { grid-area: total; align-self: end; font-size: 17px; }
  .cart-table td:nth-child(5) { grid-area: remove; text-align: right; align-self: start; }
  .cart-table td:nth-child(5) .remove-btn { margin: -8px -8px 0 0; }
  .cart-table .product { min-width: 0; }
  .cart-table .product .thumb { width: 64px; height: 64px; }
  /* Order lines (4 cells): product; "Miktar …" and "Birim fiyat …" on the left, the labelled line total on the right. */
  .cart-table.order-lines tr { grid-template-areas: "product product" "qty total" "price total"; gap: 4px 12px; }
  .cart-table.order-lines td:nth-child(1) { margin-bottom: 6px; }
  .cart-table.order-lines td:nth-child(2) { grid-area: qty; text-align: left; font-size: 14px; }
  .cart-table.order-lines td:nth-child(3) { grid-area: price; text-align: left; font-size: 14px; }
  .cart-table.order-lines td:nth-child(4) { grid-area: total; align-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .cart-table.order-lines .cell-label { display: inline; margin-right: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
  /* Quick order (5 cells): code and quantity inputs side by side, product below, unit price and total at the bottom. */
  .cart-table.quick-table tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "code qty" "product product" "price total"; gap: 8px 12px; }
  .cart-table.quick-table td:nth-child(1) { grid-area: code; }
  .cart-table.quick-table td:nth-child(2) { grid-area: product; }
  .cart-table.quick-table td:nth-child(3) { grid-area: qty; }
  .cart-table.quick-table td:nth-child(4) { grid-area: price; text-align: left; font-size: 14px; align-self: auto; }
  .cart-table.quick-table td:nth-child(5) { grid-area: total; text-align: right; font-size: 15px; font-weight: var(--fw-bold, 700); align-self: auto; }
  .quick-table .code, .quick-table .qty-in { width: 100%; }
  .quick-table td:nth-child(3) { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
  .quick-table td:nth-child(3) .qty-in { flex: 1 1 60px; width: auto; min-width: 0; }
  .quick-table td:nth-child(3) .qty-unit { margin-left: 0; }
  .quick-table .cell-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: var(--fw-semibold, 600); }
  .quick-table td:nth-child(3) .cell-label { flex-basis: 100%; }
  .quick-table td:nth-child(4) .cell-label, .quick-table td:nth-child(5) .cell-label { display: inline; margin: 0 4px 0 0; font-weight: 400; }
}

/* Account privacy (/hesap/profil sections, /hesap/kapat): e-mail change, data download, closing the account. */
.self-start { align-self: flex-start; }
.privacy-address { font-size: 17px; overflow-wrap: anywhere; }
.privacy-pending { display: flex; flex-direction: column; gap: 4px; font-weight: 400; }
.privacy-pending-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.privacy-pending-actions form { margin: 0; }
.privacy-pending .small { color: var(--muted); }
.privacy-download { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.privacy-download .field { flex: 0 1 280px; }
.privacy-lists ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.box.danger-zone { border: 1.5px solid color-mix(in srgb, var(--err) 28%, #fff); }
.box.danger-zone h2 { color: var(--err); }
.alert-warn { background: var(--sale-soft, var(--accent-soft)); color: #7A4B0C; font-weight: 400; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--err) 82%, #000); color: #fff; }
.btn-danger-outline { background: var(--panel-bg, #fff); color: var(--err); border: 1.5px solid var(--err); }
.btn-danger-outline:hover { background: var(--err-bg); color: var(--err); }
.box-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.check-danger input { accent-color: var(--err); }
@media (max-width: 640px) {
  .privacy-download .field { flex-basis: 100%; }
  .privacy-download .btn, .box-actions .btn, .box .self-start.btn { width: 100%; }
}

/* Account order page: return / cancel requests (Account/_OrderRequests). */
.request-card > p { margin: 0; }
.request-form > summary { align-self: flex-start; list-style: none; cursor: pointer; }
.request-form > summary::-webkit-details-marker { display: none; }
.request-form[open] > summary { margin-bottom: 16px; }
.request-form h3 { margin: 0; font-size: 20px; }
.request-lines { border: 0; margin: 0; padding: 0; min-width: 0; }
.request-lines legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.request-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; border-top: 1px solid var(--line); padding: 14px 0; }
.request-line > input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--action, var(--brand)); }
.request-line-name { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.request-qty { flex-direction: row; align-items: center; gap: 8px; }
.request-qty select, .request-qty input { width: auto; min-width: 96px; }
.request-reason { max-width: 420px; }
.request-list { list-style: none; margin: 0; padding: 0; }
.request-list > li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; border-top: 1px solid var(--line); padding: 12px 0; }
.request-list > li:first-child { border-top: 0; padding-top: 0; }
.request-summary { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.request-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.request-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.request-withdraw { flex-basis: 100%; margin: 0; }
