/* ============================================================
   Flores Roastery — B2B Konfigüratör  ·  b2b.css (REFACTORED)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700;800&display=swap');

/* ── 1. GLOBAL RESET & BASE ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #4a9bd9; --blue-light: #60A3D6; --blue-deep: #118aaf; --blue-head: #357bb0;
  --blue-pale: #eaf3fb; --blue-subtle: rgba(74,155,217,0.10);
  --navy: #00121f; --navy-2: #0a2433;
  --bg: #ffffff; --bg-2: #f7fafd; --bg-3: #eef3f7;
  --ink: #1d2c39; --ink-2: #3c5061; --ink-muted: #6b7c8c; --ink-faint: #9aa9b6;
  --ok: #1f9d6b; --err: #d9534f; --err-bg: #fdeff0;
  --border: rgba(17,40,60,0.09); --border-d: rgba(17,40,60,0.16);
  --radius: 10px; --radius-lg: 16px; --radius-xl: 20px;
  --trans: 0.22s cubic-bezier(0.25,0.46,0.45,0.94);
  --font: 'Open Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --header-h: 60px; --footer-h: 74px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-2); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); border: none; background: none; cursor: pointer; }
input { font-family: var(--font); }
a { text-decoration: none; color: inherit; } /* Link Reset */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ── 2. HEADER & PROGRESS ───────────────────────────────── */
.hdr { position: sticky; top: 0; z-index: 50; background: #fff; height: var(--header-h); border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.hdr-in { max-width: 1180px; margin: 0 auto; width: 100%; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.hdr-logo { display: flex; align-items: center; gap: 9px; white-space: nowrap; flex-shrink: 0; }
.hdr-logo img { height: 32px; flex-shrink: 0; }
.hdr-logo b { font-weight: 800; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--blue-head); }

.hdr-steps { display: flex; align-items: center; gap: 7px; flex: 1; justify-content: flex-end; }
.dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); color: var(--ink-faint); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: all var(--trans); flex-shrink: 0; }
.dot.done { background: var(--blue-pale); color: var(--blue-deep); }
.dot.active { background: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(74,155,217,0.4); }

.hdr-cart { position: relative; color: var(--blue-deep); display: flex; flex-shrink: 0; padding-left: 6px; }

.pbar { height: 3px; background: var(--bg-3); }
.pbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-deep), var(--blue)); width: 12.5%; transition: width 0.4s var(--trans); }

/* ── 3. LAYOUT & TYPOGRAPHY ─────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 34px 22px calc(var(--footer-h) + 40px); }
.step-head { margin-bottom: 26px; }
.step-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.step-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; color: var(--blue-head); line-height: 1.15; }
.step-sub { font-size: 14.5px; color: var(--ink-muted); margin-top: 8px; max-width: 640px; }
.alert { background: var(--err-bg); color: var(--err); border-radius: var(--radius); padding: 13px 16px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }

/* ── 4. KARTLAR & IZGARALAR ─────────────────────────────── */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.opt { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 24px; cursor: pointer; transition: all var(--trans); position: relative; text-align: left; }
.opt:hover { border-color: var(--blue-light); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17,40,60,0.08); }
.opt.sel { border-color: var(--blue); background: var(--blue-subtle); }
.opt.sel::after { content: '✓'; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.opt-emoji { width: 74px; height: 74px; border-radius: 14px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 38px; margin-bottom: 14px; }
.opt-name { font-size: 19px; font-weight: 800; color: var(--blue-head); margin-bottom: 6px; }
.opt-desc { font-size: 13.5px; color: var(--ink-muted); line-height: 1.65; }
.opt-tag { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--blue-deep); background: var(--blue-pale); padding: 5px 11px; border-radius: 100px; }

/* ── 5. ÇEKİRDEKLER & REÇETELER ─────────────────────────── */
.rec-sec { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--border); }
.rec-sec h3 { font-size: 20px; font-weight: 800; color: var(--blue-head); margin-bottom: 6px; }
.rec-sec p { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 18px; max-width: 620px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.rec { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; transition: all var(--trans); text-align: left; }
.rec:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(17,40,60,0.08); transform: translateY(-2px); }
.rec-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; background: var(--blue-pale); color: var(--blue-deep); }
.badge.med { background: #f3ede1; color: #9a7b3f; }
.rec-price { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--blue-head); }
.rec-name { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.rec-beans { display: flex; flex-direction: column; gap: 5px; }
.rec-bean { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-muted); }
.rec-bean b { color: var(--blue-head); font-weight: 700; }

.bean-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.bean { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: all var(--trans); position: relative; }
.bean:hover { border-color: var(--blue-light); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(17,40,60,0.09); }
.bean.sel { border-color: var(--blue); }
.bean.sel .bean-check { opacity: 1; transform: scale(1); }
.bean-flag { height: 112px; position: relative; background: var(--bg-3); overflow: hidden; }
.bean-flag img { width: 100%; height: 100%; object-fit: cover; }
.bean-price { position: absolute; left: 10px; bottom: 10px; background: #fff; font-size: 13px; font-weight: 800; color: var(--ink); padding: 4px 10px; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.bean-price em { font-style: normal; color: var(--ink-muted); font-weight: 600; }
.bean-check { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 7px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.6); transition: all var(--trans); }
.bean-body { padding: 14px 15px 16px; }
.bean-name { font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.bean-region { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 8px; }
.bean-notes { font-size: 12.5px; color: var(--ink-muted); line-height: 1.55; margin-bottom: 10px; min-height: 38px; }
.bean-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 100px; }

/* ── 6. ORAN, KAVURMA, ÖĞÜTME & MİKTAR ──────────────────── */
.ratio-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 22px; }
.ratio-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ratio-head h3 { font-size: 16px; font-weight: 800; color: var(--ink); }
.ratio-total { font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 100px; background: var(--bg-3); color: var(--ink-muted); }
.ratio-total.ok { background: #e6f6ee; color: var(--ok); }
.ratio-hint { font-size: 13px; color: var(--ink-muted); margin-bottom: 16px; }
.ratio-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); }
.ratio-row:first-of-type { border-top: none; }
.ratio-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.ratio-name { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; }
.ratio-name span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.bean-selcount { font-size: 13px; font-weight: 700; color: var(--blue-deep); background: var(--blue-subtle); border: 1px solid rgba(74,155,217,0.18); border-radius: 100px; padding: 8px 16px; display: inline-block; margin-bottom: 18px; }

.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border-d); border-radius: 10px; overflow: hidden; }
.stepper button { width: 38px; height: 38px; font-size: 18px; font-weight: 700; color: var(--blue-deep); background: #fff; transition: background var(--trans); display: flex; align-items: center; justify-content: center;}
.stepper button:hover { background: var(--blue-subtle); }
.stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; background: #fff; }
.stepper .val { min-width: 72px; text-align: center; font-size: 15px; font-weight: 800; color: var(--ink); white-space: nowrap; }

.rg-sec { margin-bottom: 30px; }
.rg-sec h3 { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rg { background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; cursor: pointer; transition: all var(--trans); position: relative; }
.rg:hover { border-color: var(--blue-light); }
.rg.sel { border-color: var(--blue); background: var(--blue-subtle); }
.rg-bean { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px; }
.rg-name { font-size: 15px; font-weight: 800; color: var(--blue-head); margin-bottom: 4px; }
.rg-desc { font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
.rg-rec { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 3px 10px; border-radius: 100px; }

.grind-dots { display: grid; grid-template-columns: repeat(4, 6px); gap: 4px; justify-content: center; margin: 0 auto 12px; width: max-content; }
.grind-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); display: block; }
.grind-dots.coarse i { width: 8px; height: 8px; }
.grind-dots.fine i { width: 4px; height: 4px; }

.qty-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; text-align: center; margin-bottom: 22px; }
.qty-main { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 22px; }
.qty-circle { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--border-d); font-size: 26px; color: var(--blue-deep); display: flex; align-items: center; justify-content: center; transition: all var(--trans); }
.qty-circle:hover { border-color: var(--blue); background: var(--blue-subtle); }
.qty-circle:disabled { color: var(--ink-faint); cursor: not-allowed; }
.qty-val { font-size: 52px; font-weight: 800; color: var(--ink); min-width: 150px; }
.qty-val em { font-style: normal; font-size: 22px; color: var(--ink-muted); font-weight: 700; }
.qty-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qty-preset { font-size: 14px; font-weight: 700; padding: 9px 18px; border-radius: 100px; border: 1.5px solid var(--border-d); color: var(--ink-2); background: #fff; transition: all var(--trans); }
.qty-preset:hover { border-color: var(--blue); color: var(--blue); }
.qty-preset.sel { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── 7. DAĞILIM, AMBALAJ & ÖNİZLEME ─────────────────────── */
.dist-bar-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.dist-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dist-top h3 { font-size: 16px; font-weight: 800; color: var(--ink); }
.dist-status { font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 100px; background: var(--bg-3); color: var(--ink-muted); }
.dist-status.ok { background: #e6f6ee; color: var(--ok); }
.dist-bar { height: 44px; border-radius: 10px; background: var(--bg-3); overflow: hidden; display: flex; }
.dist-seg { height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; transition: width 0.35s var(--trans); white-space: nowrap; overflow: hidden; }
.dist-bar-labels { text-align: right; font-size: 13px; color: var(--ink-muted); margin-top: 8px; font-weight: 600; }

.pkg-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.pkg-badge { width: 52px; height: 52px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pkg-info { flex: 1; }
.pkg-info b { font-size: 15px; color: var(--ink); }
.pkg-info span { display: block; font-size: 12.5px; color: var(--ink-muted); }

.bag-block { margin-bottom: 26px; }
.bag-block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.bag-block-head b { font-size: 15px; font-weight: 800; color: var(--ink); }
.bag-block-head span { font-size: 12.5px; color: var(--ink-muted); }
.bag-block-head .miss { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--err); }
.bag-block-head .picked { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--ok); }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bag { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all var(--trans); }
.bag:hover { border-color: var(--blue-light); }
.bag.sel { border-color: var(--blue); }
.bag-sw { height: 96px; position: relative; }
.bag-sw .tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.bag.sel .bag-sw .tick { display: flex; }
.bag-body { padding: 10px 12px 12px; }
.bag-name { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.bag-type { font-size: 11px; color: var(--ink-muted); margin: 2px 0 4px; }
.bag-cost { font-size: 12px; font-weight: 800; }
.bag-cost.free { color: var(--ok); }
.bag-cost.paid { color: var(--ink); }

.sum { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sum-sec { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.sum-sec:last-child { border-bottom: none; }
.sum-sec h4 { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: 14.5px; }
.sum-row .k { color: var(--ink-muted); }
.sum-row .v { font-weight: 800; color: var(--ink); text-align: right; }
.sum-row.bean .k { display: flex; align-items: center; gap: 9px; }
.sum-row.bean .k i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;}
.sum-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; border-top: 2px solid var(--border-d); margin-top: 8px; }
.sum-total .k { font-size: 14px; font-weight: 800; color: var(--ink); }
.sum-total .v { font-size: 16px; font-weight: 800; color: var(--blue-head); }
.sum-grand { background: var(--navy); color: #fff; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; }
.sum-grand .k { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.sum-grand .v { font-size: 26px; font-weight: 800; color: var(--blue-light); }
.sum-note { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 16px; line-height: 1.6; }

/* ── 8. FOOTER & TOAST ──────────────────────────────────── */
.footbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(17,40,60,0.06); height: var(--footer-h); }
.footbar-in { max-width: 1180px; margin: 0 auto; height: 100%; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot-price .l { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.foot-price .v { font-size: 22px; font-weight: 800; color: var(--blue-head); line-height: 1.1; }
.foot-price .v small { font-size: 12px; font-weight: 700; color: var(--ink-faint); }
.foot-actions { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.03em; transition: all var(--trans); white-space: nowrap; }
.btn-back { color: var(--ink-muted); background: transparent; padding: 13px 16px;}
.btn-back:hover { color: var(--ink); background: var(--bg-3); }
.btn-next { background: var(--blue); color: #fff; }
.btn-next:hover { background: var(--blue-deep); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74,155,217,0.35); }
.btn-next:disabled { background: var(--bg-3); color: var(--ink-faint); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-cart { background: var(--navy); color: #fff; }
.btn-cart:hover { background: var(--navy-2); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10,36,51,0.35); }
.btn-cart:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none;}

.toast { position: fixed; bottom: calc(var(--footer-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 13px 22px; border-radius: 100px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: all var(--trans); z-index: 60; text-align: center; width: max-content; max-width: 90vw;}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); }

/* ── 9. KUSURSUZ MOBİL UYUM (RESPONSIVE) ────────────────── */
@media (max-width: 768px) {
  .hdr-in { padding: 0 16px; gap: 12px; }
  .hdr-logo img { height: 28px; }
  .hdr-logo b { font-size: 14px; }
  
  .hdr-steps { gap: 6px; }
  .hdr-steps .dot:not(.active) { display: none; }
  .hdr-steps::after { 
    content: " / 8";
    font-size: 14px; 
    font-weight: 800; 
    color: var(--ink-faint); 
  }
}

@media (max-width: 600px) {
  .wrap { padding: 20px 16px calc(var(--footer-h) + 24px); }
  
  .step-head { margin-bottom: 20px; }
  .step-title { font-size: 22px; }
  
  .qty-val { font-size: 40px; min-width: 110px; }

  .footbar-in { padding: 0 16px; gap: 10px;}
  .foot-price .l { font-size: 10px; }
  .foot-price .v { font-size: 18px; }
  
  .foot-actions { gap: 6px; }
  .btn { padding: 12px 16px; font-size: 12px; }
  .btn-back span { display: none; }
  .btn-back { padding: 12px; } 

  .sum-sec { padding: 16px; }
  .sum-grand { padding: 18px 16px; }
  .sum-grand .v { font-size: 22px; }
}