/* Müşteri teklif portalı (customer.html). Yönetici sayfaları customer.css kullanır; bu dosya yalnızca portal içindir. */
:root {
    --primary: #960000;
    --primary-dark: #7a0000;
    --primary-soft: #fbf1f1;
    --ink: #1c1c1c;
    --text: #3a3a3a;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --bg: #f6f5f3;
    --card: #ffffff;
    --radius: 12px;
    --ok: #1a7f37;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* Üst bar */
.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
}
.site-logo img { height: 40px; width: auto; display: block; }
.site-title {
    font-weight: 600;
    color: var(--muted);
    padding-left: 16px;
    border-left: 1px solid var(--line);
}
.site-phone {
    margin-left: auto;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.site-phone:hover { color: var(--primary); }

/* Giriş */
.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 8px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.15;
    color: var(--ink);
    font-weight: 700;
}
.hero h1 span { color: var(--primary); }
.hero > p {
    max-width: 620px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: 17px;
}
.steps {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.steps a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.steps a:hover { border-color: var(--primary); }
.steps b, .step-title b {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
}
.trust {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 6px 18px;
    flex-wrap: wrap;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

/* Adım kartları */
.flow {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.step-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    color: var(--ink);
    margin-bottom: 18px;
}

/* Grup sekmeleri */
.group-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.option-card .opt-img { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.option-card:hover { border-color: #c9c9c9; }
.option-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

/* Seçim düğmeleri (seri, baskı) */
.type-row { margin-top: 16px; }
.type-row:has(.pills:empty) { display: none; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.pill:hover { border-color: #c9c9c9; }
.pill[aria-checked="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* Ürün kartları: görseller aynı karede, tabanları hizalı; seri içinde boyları gerçek orana göre */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.product-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s;
}
.product-card:hover { border-color: #c9c9c9; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.product-card.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 4px;
}
.product-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.product-card-meta { font-size: 12.5px; color: var(--muted); }
.product-card-meta:empty { display: none; }
.scale-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Adım 2 */
.detail {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 28px;
    align-items: start;
}
.product-preview { position: sticky; top: 16px; }
.product-preview[hidden] { display: none; }
.product-preview-zoom {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
}
.product-preview-zoom img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}
.product-preview-hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 10px;
}
/* Baskı örneği (temsilî): ürün gövdesine yerleşen logo / tam tur desen */
.print-mock {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    mix-blend-mode: multiply;
}
.print-mock[hidden] { display: none; }
.print-mock svg { position: relative; width: 62%; max-height: 80%; }
.print-mock-seri { mix-blend-mode: normal; opacity: .92; }
.print-mock-wrap {
    position: absolute;
    inset: 0;
    clip-path: polygon(3% 0, 97% 0, 90% 100%, 10% 100%);
    background:
        radial-gradient(circle at 20% 30%, #ffd166 0 9%, transparent 10%),
        radial-gradient(circle at 78% 70%, #ef476f 0 11%, transparent 12%),
        radial-gradient(circle at 85% 20%, #06d6a0 0 7%, transparent 8%),
        radial-gradient(circle at 12% 80%, #06d6a0 0 8%, transparent 9%),
        linear-gradient(160deg, #960000 0%, #c0392b 45%, #1f2a44 100%);
}
.print-mock-note { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.print-mock-note[hidden] { display: none; }
.product-preview-name { display: block; margin-top: 12px; font-size: 18px; color: var(--ink); line-height: 1.25; }
.product-preview-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.product-preview-meta:empty { display: none; }
.use-photo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    cursor: zoom-in;
}
.use-photo[hidden] { display: none; }
.use-photo img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }

.detail-options { display: flex; flex-direction: column; gap: 18px; }
.field label, .field-label {
    display: block;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    font-size: 15px;
}
.input-field {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}
.input-field:focus { outline: none; border-color: var(--primary); }

.qty { display: flex; align-items: center; gap: 8px; }
.qty .input-field { width: 96px; text-align: center; font-weight: 600; }
.qty-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-unit { font-weight: 600; color: var(--muted); }
.pack-info { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.qty-total { display: block; margin-top: 2px; color: var(--ink); font-size: 16px; }
.qty-total:empty { display: none; }

.tier { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfc; }
.tier-track { position: relative; height: 6px; background: #e8e8e8; border-radius: 3px; margin: 12px 0 14px; }
.tier-bar { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--primary); border-radius: 3px; transition: width .3s ease; }
.tier-icon {
    position: absolute; left: 0; top: 50%;
    transform: translate(-50%, -50%);
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--primary); border-radius: 50%;
    background: #fff; color: var(--primary); font-size: 12px;
    transition: left .3s ease;
}
.tier-text { font-size: 14px; color: #475569; text-align: center; }

.btn-primary, .btn-submit {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover, .btn-submit:hover { background: var(--primary-dark); }
#btnSubmitQuote[disabled] { opacity: .6; cursor: wait; }

/* Adım 3 */
.quote {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.quote h3 { font-size: 17px; color: var(--ink); margin-bottom: 12px; }
.empty-state {
    padding: 22px;
    border: 1px dashed #d6d6d6;
    border-radius: 10px;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}
.cart-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cart-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.cart-thumb { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; }
.cart-name { display: block; font-weight: 600; color: var(--ink); font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.cart-sub { display: block; font-size: 13px; color: var(--muted); }
.cart-qty { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.cart-qty button {
    width: 28px; height: 28px;
    border: 1px solid var(--line); border-radius: 6px;
    background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.cart-qty input {
    width: 86px; padding: 4px; text-align: center;
    border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 14px;
}
.cart-qty small { color: var(--muted); margin-left: 2px; }
.btn-remove {
    align-self: start;
    width: 32px; height: 32px;
    border: none; border-radius: 6px;
    background: none; color: #b42318;
    font-size: 22px; line-height: 1; cursor: pointer;
}
.btn-remove:hover { background: #fdecea; }

.quote-form-section {
    padding: 20px;
    border-radius: 10px;
    background: var(--primary-soft);
    border: 1px solid #f0dada;
}
.quote-form-section > p { color: var(--text); font-size: 15px; margin: -4px 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.form-field span { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.form-field i { color: var(--primary); font-style: normal; }
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
}
.form-input:focus { outline: none; border-color: var(--primary); }
.form-field-wide { display: block; margin-bottom: 16px; }
textarea.form-input { resize: vertical; min-height: 84px; }
.logo-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px;
    border: 1px dashed #c9a5a5;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    cursor: pointer;
}
.logo-drop:hover, .logo-drop:focus-within { border-color: var(--primary); }
.logo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.logo-drop b { color: var(--primary); font-size: 15px; word-break: break-all; }
.logo-drop small { color: var(--muted); font-size: 13px; }
.logo-clear { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.form-note { display: block; margin-top: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.msg { padding: 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; font-size: 14px; text-align: center; }
.msg-ok { background: var(--ok); color: #fff; }
.msg-err { background: #fdecea; color: #8a1c1c; border: 1px solid #f5c2c0; }

/* Talep özeti çubuğu */
.quote-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 8px 8px 18px;
    background: var(--ink);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    font-size: 15px;
    white-space: nowrap;
}
.quote-bar[hidden] { display: none; }
.quote-bar-btn {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}
.quote-bar-btn:hover { background: var(--primary-dark); }

.site-footer {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 20px 90px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}
.site-footer a { color: inherit; }
.admin-link { text-decoration: none; }

/* Bildirim */
.toast-container {
    position: fixed;
    bottom: 80px; right: 16px; left: 16px;
    z-index: 1000;
    display: flex; flex-direction: column; align-items: flex-end;
    pointer-events: none;
}
.toast {
    background: #1e293b;
    border-left: 4px solid var(--primary);
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    max-width: 420px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.15);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-12px);
    animation: toastIn .3s forwards, toastOut .3s 2.7s forwards;
}
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* Büyük görsel */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.85);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox-close {
    position: absolute; top: 12px; right: 16px;
    width: 44px; height: 44px;
    border: none; border-radius: 50%;
    background: #fff; color: #111;
    font-size: 28px; line-height: 1; cursor: pointer;
}

/* Klavye odağı */
.option-card:focus-visible, .pill:focus-visible, .product-card:focus-visible,
.product-preview-zoom:focus-visible, .use-photo:focus-visible, .qty-btn:focus-visible,
.btn-primary:focus-visible, .btn-submit:focus-visible, .input-field:focus-visible,
.form-input:focus-visible, .cart-list button:focus-visible, .cart-list input:focus-visible,
.quote-bar-btn:focus-visible, .steps a:focus-visible, .lightbox-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .group-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .detail, .quote { grid-template-columns: 1fr; gap: 20px; }
    .product-preview { position: static; display: grid; grid-template-columns: 140px 1fr; gap: 0 14px; align-items: center; }
    .product-preview-zoom { grid-row: span 3; }
    .product-preview-name { margin-top: 0; font-size: 17px; }
    .product-preview-hint { display: none; }
    .use-photo { grid-column: 2; }
}

@media (max-width: 600px) {
    .site-header { padding: 12px 16px; gap: 10px; }
    .site-logo img { height: 34px; }
    .site-title { display: none; }
    .site-phone { font-size: 14px; }
    .hero { padding: 16px 16px 4px; }
    .hero > p { font-size: 15px; }
    .hero h1 { font-size: 25px; }
    .hero > p { margin-top: 8px; }
    .steps { gap: 4px; flex-wrap: nowrap; margin-top: 16px; }
    .steps a { font-size: 12px; padding: 4px 8px 4px 4px; gap: 5px; white-space: nowrap; }
    .steps b { width: 20px; height: 20px; font-size: 11px; }
    .trust { font-size: 13px; margin-top: 10px; }
    .trust li:last-child { display: none; }
    .flow { padding: 12px 12px 32px; gap: 14px; }
    .step-card { padding: 18px 14px; }
    .step-title { font-size: 18px; margin-bottom: 14px; }
    .group-tabs { gap: 8px; }
    .option-card { font-size: 13px; padding: 8px 4px; }
    .option-card .opt-img { width: 44px; height: 44px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-card-name { font-size: 13.5px; }
    .product-preview { display: block; text-align: center; }
    .product-preview-zoom { max-width: 260px; margin: 0 auto; }
    .product-preview-name { margin-top: 10px; }
    .use-photo { margin: 10px auto 0; }
    .form-grid { grid-template-columns: 1fr; }
    .quote-form-section { padding: 16px; }
    .quote-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; }
}

/* Hızlı teklif (hero içinde, ürün seçmeden) */
.quick-quote {
    position: relative;
    max-width: 760px;
    margin: 20px auto 0;
    padding: 18px;
    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    text-align: left;
}
.quick-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.quick-need { grid-column: 1 / -1; }
.quick-quote .btn-submit { width: 100%; }
.quick-quote .msg[hidden] { display: none; }
.steps-intro { margin-top: 22px; color: var(--muted); font-size: 14px; }
.steps-intro + .steps { margin-top: 8px; }
@media (max-width: 600px) {
    .quick-quote { margin-top: 14px; padding: 14px; }
    .quick-fields { grid-template-columns: 1fr; gap: 10px; }
    .steps-intro { margin-top: 16px; font-size: 13px; }
}
