/* ==========================================================================
   Teklif Al — Modern Brutalist Wizard
   ========================================================================== */

/* ======== STEP 1: UPLOAD ======== */
.wizard-upload {
    position: relative;
    padding: 56px 48px 80px;
    max-width: var(--container);
    margin: 0 auto;
    min-height: 70vh;
}
.upload-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 32px;
}
.upload-head { max-width: 680px; margin: 0 auto; }
.upload-head .chip { margin-bottom: 20px; }
.upload-title {
    font-size: clamp(42px, 6vw, 72px);
    margin: 0 0 16px;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 0.95;
    color: var(--ink);
}
.upload-title .accent {
    background: var(--lime);
    color: #fff;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-block;
    transform: rotate(-1.5deg);
}
.upload-sub {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 520px;
    margin: 0 auto;
}

/* ======== WIZARD MAIN ======== */
.wizard-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 48px 80px;
}

.wizard-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.wizard-filename {
    font-size: 12px;
    color: var(--muted);
    padding: 6px 10px;
    background: var(--cream-deep);
    border-radius: 8px;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stepper pill */
.stepper-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid var(--rule);
}
.pill-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: transparent;
    opacity: 0.45;
    cursor: not-allowed;
    transition: all .15s;
}
.pill-step:not([disabled]) { opacity: 1; cursor: pointer; }
.pill-step.done {
    background: var(--lime);
    color: #fff;
    opacity: 1;
    cursor: pointer;
}
.pill-step.active {
    background: var(--ink);
    color: var(--cream);
    opacity: 1;
}
.pill-step .t-mono {
    font-size: 11px;
    opacity: 0.6;
}
.pill-sep {
    width: 14px;
    height: 1px;
    background: var(--rule);
}

/* Wizard grid */
.wizard-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 28px;
    align-items: start;
}

/* ======== VIEWER PANEL ======== */
.viewer-panel {
    padding: 0;
    border-radius: 28px;
    overflow: hidden;
    position: sticky;
    top: 92px;
    border: 1px solid var(--rule);
    background: #fff;
}
.viewer-3d {
    position: relative;
    height: 520px;
    background:
        radial-gradient(ellipse at 50% 30%, #F5EFE0 0%, #DCD3BE 75%, #C9BFA6 100%);
}
.viewer-3d::after {
    /* İnce iç gölge çerçevesi — modelin kontrastını artırır */
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 80px rgba(20,20,20,0.12);
    pointer-events: none;
    z-index: 1;
}
.viewer-3d canvas { display: block; }
.viewer-chip {
    position: absolute;
    top: 16px;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}
.viewer-chip-live {
    left: 16px;
    background: var(--ink);
    color: var(--lime);
}
.viewer-chip-live .dot {
    width: 6px; height: 6px; border-radius: 99px; background: var(--lime);
    box-shadow: 0 0 6px var(--lime);
}
.viewer-chip-hint {
    right: 16px;
    background: rgba(255,255,255,0.85);
    color: var(--ink-soft);
    backdrop-filter: blur(4px);
}

/* CAD Dimension strip */
.dim-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
}
.dim-cell {
    padding: 18px 20px;
    border-top: 1px solid var(--rule);
}
.dim-cell:not(:last-child) { border-right: 1px solid var(--rule); }
.dim-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.dim-axis {
    width: 14px; height: 14px; border-radius: 4px;
    color: #fff;
    display: grid; place-items: center;
    font-size: 9px; font-weight: 700;
}
.dim-axis-x { background: #E53935; }
.dim-axis-y { background: #22C55E; }
.dim-axis-z { background: var(--blue); }
.dim-axis-v { background: var(--ink); }
.dim-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dim-value {
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
}
.dim-value small {
    font-size: 12px; color: var(--muted); margin-left: 3px; font-weight: 400;
}

/* ======== WIZARD RIGHT: Steps + Price Bar ======== */
.wizard-right {
    display: grid;
    gap: 20px;
    align-content: start;
}

.wizard-card {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 24px;
    padding: 28px;
}

.step-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}
.step-head > :nth-child(2) { flex: 1; }
.step-num-badge {
    width: 28px; height: 28px; border-radius: 10px;
    background: var(--ink); color: var(--lime);
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700; font-family: var(--mono);
    flex-shrink: 0;
}
.step-title { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.step-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.step-back-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    flex-shrink: 0;
}
.step-actions { margin-top: 20px; }

/* ======== NOZZLE CARDS ======== */
.nozzle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.nozzle-card {
    text-align: left;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--rule);
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all .15s;
}
.nozzle-card:hover { border-color: var(--ink); }
.nozzle-card.selected {
    border: 2px solid var(--ink);
    background: var(--ink);
    color: var(--cream);
}
.nozzle-card--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(.5);
}
.nozzle-card--disabled:hover { border-color: var(--rule); }
.nozzle-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nozzle-visual {
    width: 48px; height: 48px;
    flex-shrink: 0;
}
.nozzle-card-title {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--mono);
    color: inherit;
}
.nozzle-card-subtitle {
    font-size: 12px;
    color: var(--muted);
}
.nozzle-card.selected .nozzle-card-subtitle { color: rgba(245,241,234,0.7); }
.nozzle-card-desc {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.4;
}
.nozzle-card.selected .nozzle-card-desc { color: rgba(245,241,234,0.75); }
.nozzle-card-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--lime);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-family: var(--mono);
    font-weight: 500;
}

/* ======== MATERIAL CARDS ======== */
.material-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.mat-card {
    text-align: left;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--rule);
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.mat-card:hover { border-color: var(--ink); }
.mat-card.selected { border: 2px solid var(--ink); }
.mat-card--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(.4);
}
.mat-card--disabled:hover { border-color: var(--rule); }
.mat-card-header {
    display: flex;
    gap: 14px;
    align-items: center;
}
.mat-swatch {
    width: 64px; height: 64px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), inset 0 4px 10px rgba(255,255,255,0.15);
    flex-shrink: 0;
    background: linear-gradient(135deg, #E8E0D0 0%, #CFC5B2 60%, #A99D87 100%);
}
.mat-swatch-rings {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}
.mat-card-body { flex: 1; min-width: 0; }
.mat-card-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.025em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mat-card-tagline {
    font-size: 12px;
    color: var(--muted);
}
.mat-card-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}
.mat-card-img-inline {
    width: 64px; height: 64px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}
.mat-card-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #FEE2E2;
    color: #991B1B;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
}
.mat-color-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.mat-color-dot {
    width: 12px; height: 12px; border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

/* ======== COLOR GRID ======== */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.color-swatch {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--rule);
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all .15s;
    position: relative;
}
.color-swatch:hover { border-color: var(--ink); }
.color-swatch.selected { border: 2px solid var(--ink); }
.color-swatch--out {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.5);
}
.color-swatch-chip {
    width: 100%;
    aspect-ratio: 1.2;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), inset 0 6px 10px rgba(255,255,255,0.2), inset 0 -6px 10px rgba(0,0,0,0.15);
    position: relative;
}
.color-swatch-check {
    position: absolute;
    top: 6px; right: 6px;
    width: 18px; height: 18px;
    border-radius: 99px;
    background: var(--lime);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
}
.color-swatch.selected .color-swatch-check { display: flex; }
.color-swatch-name {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink);
}

/* ======== QTY CONTROL ======== */
.qty-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 12px;
    background: var(--cream-deep);
    border-radius: 14px;
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border-radius: 999px;
    padding: 4px;
    border: 1px solid var(--rule);
}
.qty-btn {
    width: 36px; height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--ink);
}
.qty-btn:hover { background: var(--cream-deep); }
.qty-btn-accent {
    background: var(--ink);
    color: var(--lime);
}
.qty-btn-accent:hover { background: var(--ink-soft); color: var(--lime); }
.qty-input {
    min-width: 40px;
    width: 40px;
    text-align: center;
    font-size: 17px;
    font-weight: 500;
    border: none;
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
    font-family: var(--mono);
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ======== PRICE BAR (koyu ink) ======== */
.price-bar {
    padding: 20px;
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}
.price-bar-head { flex: 1; min-width: 0; }
.price-bar-label {
    font-size: 11px;
    color: var(--lime);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: var(--mono);
}
.price-bar-value {
    font-size: 44px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.035em;
    transition: color .3s, transform .3s;
}
.price-bar-value.flash {
    color: var(--lime);
    transform: scale(1.02);
}
.price-bar-value.idle {
    font-size: 28px;
    opacity: 0.9;
}
.price-bar-meta {
    font-size: 11.5px;
    color: rgba(245,241,234,0.6);
    margin-top: 4px;
}
.price-bar button {
    flex-shrink: 0;
}

.price-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 4px;
}
.price-pill {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(20,20,20,0.08);
    font-size: 11.5px;
    font-family: var(--mono);
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.price-pill-k { color: var(--muted); }
.price-pill-v { color: var(--ink); }

/* ======== MODALS (unified style) ======== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20,20,20,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    place-items: center;
    animation: fadeIn .3s ease;
}
.modal-overlay.show { display: grid; }
.modal-box {
    width: 620px;
    max-width: calc(100% - 32px);
    padding: 36px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.modal-icon-lime {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--lime);
    color: #fff;
    display: grid; place-items: center;
}
.modal-icon-gray {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 24px -10px rgba(100, 116, 139, .6);
}
.modal-icon-red {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--danger);
    color: #fff;
    display: grid; place-items: center;
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 12px 24px -12px rgba(229, 57, 53, .7);
}
.modal-icon-amber {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #fff;
    display: grid; place-items: center;
    margin: 0 auto 16px;
    box-shadow: 0 10px 24px -10px rgba(217, 119, 6, .6);
}

/* Slice anim (CAD layer sim) */
.slice-anim {
    position: relative;
    height: 180px;
    background: #F8F5EC;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--rule);
    margin-bottom: 16px;
}
.slice-anim-chip {
    position: absolute;
    top: 12px; left: 14px;
}

/* Process steps */
.proc-steps {
    margin-top: 8px;
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}
.proc-step {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.4;
    transition: opacity .3s;
}
.proc-step.active, .proc-step.done { opacity: 1; }
.proc-step-dot {
    width: 22px; height: 22px; border-radius: 99px;
    background: var(--cream-deep);
    display: grid; place-items: center;
    flex-shrink: 0;
    color: var(--cream);
    font-size: 11px;
    transition: all .3s;
}
.proc-step.active .proc-step-dot {
    background: var(--ink);
}
.proc-step.active .proc-step-dot::after {
    content: '';
    width: 8px; height: 8px;
    border: 2px solid var(--lime);
    border-top-color: transparent;
    border-radius: 99px;
    animation: spin .8s linear infinite;
}
.proc-step.done .proc-step-dot {
    background: var(--lime);
    color: var(--ink);
}
.proc-step.done .proc-step-dot::after {
    content: '✓';
    font-weight: 700;
    color: var(--ink);
}
.proc-step-label {
    font-size: 14px;
    font-weight: 500;
}
.proc-step.active .proc-step-label { font-weight: 600; }

.proc-console {
    padding: 12px 14px;
    background: var(--ink);
    color: var(--lime);
    border-radius: 12px;
    font-size: 12px;
    font-family: var(--mono);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1100px) {
    .wizard-grid { grid-template-columns: 1fr; }
    .viewer-panel { position: static; }
    .viewer-3d { height: 380px; }
}
@media (max-width: 760px) {
    .wizard-upload { padding: 24px 16px 48px; }
    .wizard-main { padding: 12px 20px 60px; }
    .wizard-top { gap: 10px; }
    .wizard-filename { max-width: 160px; }
    .stepper-pill { padding: 4px; gap: 4px; width: 100%; justify-content: center; }
    .pill-step { padding: 6px 10px; font-size: 12px; }
    .pill-step .t-mono { display: none; }
    .pill-sep { width: 8px; }
    .wizard-card { padding: 20px; border-radius: 20px; }
    .nozzle-grid, .material-grid { grid-template-columns: 1fr; }
    .color-grid { grid-template-columns: repeat(3, 1fr); }
    .viewer-3d { height: 300px; }
    .price-bar { flex-direction: column; align-items: stretch; }
    .price-bar button { width: 100%; justify-content: center; }
    .dim-strip { grid-template-columns: 1fr 1fr; }
    .dim-cell { border-right: none !important; border-bottom: 1px solid var(--rule); }
    .modal-box { padding: 24px; border-radius: 22px; }
}
@media (max-width: 560px) {
    .color-grid { grid-template-columns: repeat(2, 1fr); }
}
