/**
 * Hazır ölçü ürün sayfası (parts/shop/ready.php, assets/js/ready.js).
 * Mobil önce: 375 px'te tek sütun, 3D önizleme üstte; 900 px'ten itibaren önizleme solda yapışkan, bilgi sağda.
 */

.mv-ready { padding-bottom: var(--space-7); }
.mv-ready .mv-crumbs { padding-top: var(--space-3); }

.mv-ready__grid { display: grid; gap: var(--space-5); margin-top: var(--space-3); }

/* önizleme ------------------------------------------------------------- */
.mv-ready__stage { position: relative; margin: 0 calc(-1 * var(--gutter)); aspect-ratio: 1 / 1; max-height: 72vh; background: #eeebe5; overflow: hidden; }
.mv-ready__img, .mv-ready__canvas { position: absolute; inset: 0; }
.mv-ready__img img, .mv-ready__img .mv-img-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-ready__canvas { opacity: 0; transition: opacity 360ms var(--ease, ease); }
.mv-ready__canvas canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.mv-ready__stage.is-3d .mv-ready__canvas { opacity: 1; }
.mv-ready__stage.is-3d .mv-ready__img { visibility: hidden; transition: visibility 0s 360ms; }
.mv-ready__badge { position: absolute; left: var(--space-3); bottom: var(--space-3); display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: var(--radius-pill); background: rgb(28 27 25 / 0.72); color: #fff; font-size: 13px; line-height: 18px; font-weight: 500; pointer-events: none; }
.mv-ready__badge .mv-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mv-ready__open { position: absolute; right: var(--space-3); bottom: var(--space-3); min-height: 36px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text); font: 600 13px/18px var(--font-primary); cursor: pointer; box-shadow: var(--shadow-sm); }
.mv-ready__open[aria-pressed="true"] { background: var(--color-text); border-color: var(--color-text); color: var(--color-background); }

/* bilgi ---------------------------------------------------------------- */
.mv-ready__info { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.mv-ready__info > .mv-overline { margin-bottom: calc(-1 * var(--space-3)); }
.mv-ready__title { margin: 0; font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); font-weight: 600; }
.mv-ready__sel { margin: calc(-1 * var(--space-2)) 0 0; font-family: var(--font-mono); font-size: 13px; line-height: 19px; color: var(--color-text-muted); }
.mv-ready__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.mv-ready__price b { font-size: 30px; line-height: 34px; font-weight: 600; letter-spacing: var(--tracking-tight); }
.mv-ready__price span { font-size: 13px; color: var(--color-text-muted); }

/* seçenekler */
.mv-ready__form { display: grid; gap: var(--space-4); }
.mv-ready__opt { margin: 0; padding: 0; border: 0; min-width: 0; }
.mv-ready__opt legend { display: block; width: 100%; margin: 0 0 var(--space-2); padding: 0; font-size: 15px; line-height: 20px; font-weight: 600; }
.mv-ready__opt legend span { margin-left: 6px; font-weight: 400; color: var(--color-text-muted); }
.mv-ready__opt input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.mv-ready__sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.mv-ready__sizes--many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mv-ready__size { position: relative; display: block; cursor: pointer; }
.mv-ready__size > span { display: grid; gap: 1px; min-height: 64px; padding: 9px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); align-content: center; transition: border-color var(--duration-fast) var(--ease, ease); }
.mv-ready__size b { font-size: 14px; line-height: 18px; font-weight: 600; }
.mv-ready__size em { font-style: normal; font-size: 12.5px; line-height: 16px; color: var(--color-text-muted); }
.mv-ready__size small { font-size: 12.5px; line-height: 16px; color: var(--color-text); font-weight: 500; }
.mv-ready__size input:checked + span { border-color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-text); }
.mv-ready__size input:focus-visible + span, .mv-ready__seg input:focus-visible + span, .mv-ready__color input:focus-visible + .mv-ready__dot { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.mv-ready__seg { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mv-ready__seg label { position: relative; cursor: pointer; }
.mv-ready__seg span { display: inline-flex; align-items: center; min-height: var(--touch-min); padding: 0 var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-surface); font-size: 14px; font-weight: 500; }
.mv-ready__seg input:checked + span { background: var(--color-text); border-color: var(--color-text); color: var(--color-background); }
.mv-ready__seg input:disabled + span { opacity: 0.4; cursor: not-allowed; }

.mv-ready__colors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.mv-ready__color { position: relative; display: grid; justify-items: center; gap: 4px; cursor: pointer; min-width: 0; }
.mv-ready__dot { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--c) var(--t, none) center / cover; box-shadow: inset 0 0 0 1px rgb(28 27 25 / 0.14); transition: box-shadow var(--duration-fast) var(--ease, ease); }
.mv-ready__color input:checked + .mv-ready__dot { box-shadow: inset 0 0 0 1px rgb(28 27 25 / 0.14), 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-text); }
.mv-ready__cn { max-width: 100%; text-align: center; overflow-wrap: anywhere; font-size: 11.5px; line-height: 14px; color: var(--color-text-muted); }

/* satın alma */
.mv-ready__buy { display: grid; gap: var(--space-2); }
.mv-ready .mv-btn { box-sizing: border-box; max-width: 100%; }
.mv-ready__buy .mv-icon, .mv-ready__bar .mv-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mv-ready [data-mv-ready-add][aria-busy="true"] { opacity: 0.7; cursor: progress; }
.mv-ready__err { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-error) 8%, var(--color-surface)); color: var(--color-error); font-size: 14px; line-height: 20px; }
.mv-ready__note { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: var(--color-text-muted); }
.mv-ready .mv-trust { margin: 0; }

/* alt bölümler */
.mv-ready__more { display: grid; gap: var(--space-6); margin-top: var(--space-7); }
.mv-ready__sec h2 { margin: 0 0 var(--space-3); font-size: var(--text-xl); line-height: var(--leading-snug); }
.mv-ready__rows { margin: 0; border-top: 1px solid var(--color-border); }
.mv-ready__rows > div { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; line-height: 20px; }
.mv-ready__rows dt { color: var(--color-text-muted); }
.mv-ready__rows dd { margin: 0; }
.mv-ready__sec details { border-bottom: 1px solid var(--color-border); }
.mv-ready__sec details summary { min-height: var(--touch-min); display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.mv-ready__others { margin: 0; }

/* yapışkan çubuk (mobil) */
.mv-ready__bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--color-surface); box-shadow: var(--shadow-bar); }
.mv-ready__bar[hidden] { display: none; }
.mv-ready__bar > span { display: grid; min-width: 0; }
.mv-ready__bar b { font-size: 18px; line-height: 22px; }
.mv-ready__bar small { font-size: 12px; line-height: 16px; color: var(--color-success); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-ready__bar .mv-btn { flex: none; padding: 0 var(--space-5); }

/* sepete eklendi */
.mv-ready__sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgb(28 27 25 / 0.42); }
.mv-ready__sheet[hidden] { display: none; }
.mv-ready__sheet-in { display: grid; gap: var(--space-3); width: 100%; max-width: 480px; padding: var(--space-5) var(--gutter) calc(var(--space-5) + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; background: var(--color-surface); box-shadow: var(--shadow-sheet); }
.mv-ready__ok { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 18px; font-weight: 600; color: var(--color-success); }
.mv-ready__ok .mv-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.mv-ready__sheet-sel { margin: 0; font-size: 14px; line-height: 20px; color: var(--color-text-muted); }
.mv-ready__close { min-height: var(--touch-min); border: 0; background: none; color: var(--color-text); font: 500 15px/20px var(--font-primary); text-decoration: underline; cursor: pointer; }

@media (max-width: 359px) {
	.mv-ready__sizes--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mv-ready__colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.mv-ready__grid { grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); gap: var(--space-7); align-items: start; }
	.mv-ready__stage { position: sticky; top: calc(var(--header-h) + var(--space-4)); margin: 0; aspect-ratio: 4 / 4.2; max-height: calc(100vh - var(--header-h) - var(--space-7)); border-radius: var(--radius-md); }
	.mv-ready__more { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--space-7); }
	.mv-ready__others { grid-column: 1 / -1; }
	.mv-ready__sheet { align-items: center; }
	.mv-ready__sheet-in { border-radius: var(--radius-md); }
}
