/* ===========================================================
   quote-builder.css — Shared quote builder styles
   Used by: index.php, sell_your_golf_club.php
   =========================================================== */

:root {
  --gcb: #466d5c;
  --line: #e8efe9;
  --shadow: 0 22px 50px -20px rgba(15,25,20,.15);
  --r: 18px;
  --muted: #64716b;
  --cta-br: 12px;
}

/* ---- Wrap ---- */
.wrap { max-width:1200px; margin:18px auto 48px; padding:0 16px; box-sizing:border-box; }

/* ---- HERO (base layout — pages override background-image inline) ---- */
.hero {
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding: 0 18px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
  width: 100vw;
  margin: 16px 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 19, 0.38);
  pointer-events: none;
  z-index: 0;
}
.hero .hero-row {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 36px 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero h1,
.hero .hero-sub {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-weight: 900;
  letter-spacing: .01em;
  margin: 0 0 6px;
}
.hero .hero-sub {
  margin: 0;
}
@media (min-width: 992px) {
  .hero { background-attachment: fixed; }
}

/* ---- GRID ---- */
.grid { display:grid; grid-template-columns:2fr 1fr; gap:18px; align-items:start; max-width:100%; overflow:visible; }
@media (max-width:991px) { .grid { grid-template-columns:1fr; } }
.builder, .mini { background:#fff; border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow); max-width:100%; box-sizing:border-box; overflow:hidden; }
.builder { padding:14px; }
.mini { padding:14px; position:sticky; top:18px; min-height:120px; }

/* ---- STEPS ---- */
.step { border:1px solid var(--line); border-radius:14px; margin:16px 0; overflow:hidden; }
.builder .step:first-of-type { margin-top:16px; }
.builder .step:last-of-type { margin-bottom:16px; }
.step-h { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:#f7faf8; cursor:pointer; transition:background-color .18s,color .18s; }
.step-h .eyebrow { color:var(--muted); font-weight:800; font-size:12px; letter-spacing:.14em; text-transform:uppercase; }
.step-h .title { font-weight:800; }
.step .body { display:grid; grid-template-rows:1fr; transition:grid-template-rows .25s ease, opacity .2s ease; opacity:1; }
.step .body > * { overflow:hidden; }
.step.collapsed .body { display:grid; grid-template-rows:0fr; opacity:0; pointer-events:none; }
.chev { transition:.2s transform ease, color .18s; }
.step.collapsed .chev { transform:rotate(-90deg); }
.body { padding:14px 16px; }
.disabled-step { opacity:.55; pointer-events:none; }
.line { height:1px; background:var(--line); margin:10px 0 12px; }
.step:not(.collapsed) .step-h { background: var(--gcb); color: #fff; }
.step:not(.collapsed) .step-h .eyebrow,
.step:not(.collapsed) .step-h .title { color:#fff; }
.step:not(.collapsed) .chev { color:#fff; }

/* Hide native Model select */
#slot-model { position:absolute !important; left:-9999px !important; top:-9999px !important; width:1px !important; height:1px !important; overflow:hidden !important; visibility:hidden !important; }

/* ---- Model search / grid ---- */
#modelSearchWrap { display:flex; gap:10px; align-items:center; margin:12px 0 8px; padding:12px; background:#f7faf8; border:1px solid var(--line); border-radius:12px; }
#modelSearch { flex:1; border:2px solid var(--gcb); border-radius:10px; padding:12px 14px; font-size:15px; font-weight:500; outline:none; background:#fff; transition:box-shadow .15s,border-color .15s; }
#modelSearch::placeholder { color:#8a9690; font-weight:400; }
#modelSearch:focus { border-color:var(--gcb); box-shadow:0 0 0 4px rgba(70,109,92,.15); }
#modelSearchCount { color:#64716b; font-size:13px; font-weight:600; white-space:nowrap; }
#noModelMatches { padding:8px 10px; border:1px dashed #dfe7e3; border-radius:10px; color:#64716b; font-size:13px; margin-top:8px; }

/* Scrollable model grid with indicator */
.model-grid-wrapper { position:relative; }
#modelThumbGridHost { max-height:600px; overflow-y:auto; overflow-x:hidden; padding-right:4px; padding-bottom:8px; }
@media (max-width:600px) { #modelThumbGridHost { max-height:450px; } }

.model-scroll-hint {
  display: none;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 0 8px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 30%, #fff 100%);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #466d5c;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s;
}
.model-scroll-hint:hover { color:#2d4a3e; }
.model-scroll-hint i {
  display: block;
  margin-bottom: 2px;
  animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(4px); }
}
.model-grid-wrapper.has-scroll .model-scroll-hint { display:block; }
.model-grid-wrapper.scrolled-bottom .model-scroll-hint { display:none; }

#modelThumbGridHost .gcb-model-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-top:10px; }
@media (max-width:1200px) { #modelThumbGridHost .gcb-model-grid { grid-template-columns:repeat(4,1fr); } }
@media (max-width:900px)  { #modelThumbGridHost .gcb-model-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:600px)  { #modelThumbGridHost .gcb-model-grid { grid-template-columns:repeat(2,1fr); } }

#modelThumbGridHost .model-thumb { display:flex; flex-direction:column; align-items:center; gap:8px; border:1px solid #e8efe9; border-radius:12px; background:#fff; padding:10px; cursor:pointer; transition:box-shadow .15s,border-color .15s,transform .05s; }
#modelThumbGridHost .model-thumb:hover { box-shadow:0 6px 20px -10px rgba(0,0,0,.15); }
#modelThumbGridHost .model-thumb:active { transform:translateY(1px); }
#modelThumbGridHost .model-thumb.is-selected { border-color:#466d5c; box-shadow:0 0 0 2px rgba(70,109,92,.15); }

#modelThumbGridHost .thumb {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}
#modelThumbGridHost .thumb img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block;
  background: #fff;
}
#modelThumbGridHost .name { font-weight:700; font-size:14px; text-align:center; line-height:1.2; color:#1b1f1d; }

/* ---- Hover preview popup ---- */
#gcbThumbPreview {
  position: fixed;
  z-index: 99999;
  width: min(280px, 38vw);
  background: #fff;
  border: 1px solid #dfe7e3;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0,0,0,.20);
  padding: 8px;
  display: none;
}
#gcbThumbPreview .img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: #fff;
}
#gcbThumbPreview .cap {
  margin-top: 7px;
  font-weight: 800;
  font-size: 13px;
  color: #1b1f1d;
  line-height: 1.2;
}
#gcbThumbPreview .hint {
  margin-top: 2px;
  font-size: 12px;
  color: #64716b;
}

/* ---- Club options cleanup ---- */
#club_options ul { list-style:none; padding-left:0; margin-left:0; }
#club_options li { list-style:none; }
#Quote > ul.list-unstyled { display:none !important; }
#step-details #club_options { padding-bottom:0 !important; margin-bottom:0 !important; }
#step-details #quote_section { padding-bottom:0 !important; margin-bottom:0 !important; }
#step-details > .body { padding-bottom:8px; }

/* ---- Mini-cart pinned total ---- */
#cartTotalBar {
  display: none;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf8;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
}

/* ---- Gray slabs (full-width content sections) ---- */
.slab {
  position: relative;
  overflow: hidden;
  background: url('/images/gcbbackground.jpg') center / cover no-repeat;
  background-color: #466d5c;
  border-top: 1px solid #e8efe9;
  border-bottom: 1px solid #e8efe9;
}
.slab .inner { max-width:1200px; margin:0 auto; padding:36px 16px; position:relative; z-index:1; }
.slab h2 { margin:0 0 10px; font-weight:700 !important; letter-spacing:-.01em; }
.slab h3 { color:#fff !important; }
.slab .lead { margin:0; color:#40514a; font-weight:700; opacity:.92; }
.slab h2, .slab .lead { color:#fff !important; }
.slab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 19, 0.38);
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 992px) { .slab { background-attachment: fixed; } }

/* ---- Layout helpers ---- */
.split-2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
@media (max-width:900px) { .split-2 { grid-template-columns:1fr; } }

/* Cards */
.cond-grid { margin-top:16px; display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width:900px) { .cond-grid { grid-template-columns:1fr; } }
.cond-card { border:1px solid #e0e6e3; border-radius:14px; background:#fff; padding:14px; box-shadow:0 14px 28px -22px rgba(0,0,0,.18); }
.cond-card .t { font-weight:700; }
.cond-card .d { margin-top:6px; color:#32443d; }

/* ---- Button styles ---- */
#Quote #addToQuoteBtn,
#addToQuoteBtn.btn,
a#btnContinue.btn-pill,
.gcb-cta-primary {
  border-radius: var(--cta-br) !important;
  border: 2px solid var(--gcb) !important;
  background: var(--gcb) !important;
  color: #fff !important;
  font-weight: 800 !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#Quote #addToQuoteBtn:hover,
#addToQuoteBtn.btn:hover,
a#btnContinue.btn-pill:hover,
.gcb-cta-primary:hover { filter:brightness(1.04); text-decoration:none; }

a#btnAddClubs,
a#btnAddClubs.btn-pill,
a#btnAddClubs.btn-ghost,
.gcb-cta-outline {
  border-radius: var(--cta-br) !important;
  border: 2px solid var(--gcb) !important;
  background: #fff !important;
  color: var(--gcb) !important;
  font-weight: 800 !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
a#btnAddClubs:hover,
.gcb-cta-outline:hover { background:#f7faf8 !important; text-decoration:none; }
#addToQuoteBtn i, #btnContinue i, #btnAddClubs i { margin-right:6px; }

/* ---- Offer / value card ---- */
#quote_section .gcb-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
#quote_section .gcb-offer-left {
  flex: 1 1 240px;
  min-width: 220px;
  background: #f4f6f5;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
}
#quote_section .gcb-offer-label {
  font: 800 11px/1 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  letter-spacing: .02em;
  color: #6b776f;
  margin: 0 0 4px;
}
#quote_section .gcb-offer-value {
  font: 900 22px/1.05 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color: #0f1613;
  margin: 0;
}
#quote_section .gcb-offer-value > * {
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit !important;
}
#quote_section #addToQuoteBtn {
  flex: 0 0 auto;
  min-width: 170px;
  border-radius: var(--cta-br) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
@media (max-width:520px) {
  #quote_section .gcb-offer-card { flex-wrap:wrap; }
  #quote_section .gcb-offer-left { flex:1 1 100%; min-width:0; }
  #quote_section #addToQuoteBtn { width:100%; }
}

/* ---- SEO content section ---- */
.gcb-seo-content {
  background: #f7faf8;
  border-top: 1px solid var(--line);
  padding: 36px 16px;
}
.gcb-seo-inner {
  max-width: 800px;
  margin: 0 auto;
}
.gcb-seo-content h2 {
  font-weight: 900;
  font-size: 20px;
  color: #0f1613;
  margin: 0 0 14px;
}
.gcb-seo-content p {
  color: #40514a;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 500;
  margin: 0 0 12px;
}
.gcb-seo-content p:last-child { margin-bottom:0; }

/* ============================================================
   DESKTOP: Compact sticky cart (don't inflate height)
   ============================================================ */
@media (min-width: 992px) {
  .mini {
    min-height: auto !important;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    position: sticky;
    top: 18px;
  }
}

/* ============================================================
   MOBILE: Model grid "Show More" (removes inner scroll)
   ============================================================ */
@media (max-width: 768px) {
  #modelThumbGridHost { max-height:none !important; overflow-y:visible !important; overflow-x:visible !important; }
  .model-scroll-hint { display:none !important; }
  #modelThumbGridHost .model-thumb.gcb-v2-hidden { display:none !important; }
  .gcb-v2-show-more-btn {
    display:flex; align-items:center; justify-content:center; gap:6px;
    width:100%; margin-top:12px; padding:12px 16px;
    border:2px dashed var(--gcb); border-radius:12px;
    background:#f7faf8; color:var(--gcb);
    font-size:14px; font-weight:700; cursor:pointer;
    transition:background .15s, border-color .15s;
  }
  .gcb-v2-show-more-btn:hover { background:#edf4ef; border-color:#3a5c4e; }
  .gcb-v2-show-more-btn i { font-size:12px; transition:transform .2s; }
  .gcb-v2-show-more-btn.gcb-v2-expanded i { transform:rotate(180deg); }
}
@media (min-width: 769px) {
  #modelThumbGridHost .model-thumb.gcb-v2-hidden { display:flex !important; }
  .gcb-v2-show-more-btn { display:none !important; }
}

/* ============================================================
   MOBILE: Floating toast after add-to-cart
   ============================================================ */
.gcb-v2-toast {
  position:fixed; bottom:20px; left:50%;
  transform:translateX(-50%) translateY(100px);
  z-index:99990; background:#1b2b24; color:#fff;
  padding:14px 20px; border-radius:14px;
  box-shadow:0 12px 40px -8px rgba(0,0,0,.35);
  font-size:14px; font-weight:600;
  display:flex; align-items:center; gap:10px;
  opacity:0; pointer-events:none;
  transition:transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
  max-width:calc(100vw - 32px); white-space:nowrap;
}
.gcb-v2-toast.gcb-v2-toast-visible { transform:translateX(-50%) translateY(0); opacity:1; pointer-events:auto; }
.gcb-v2-toast-icon { width:24px; height:24px; border-radius:50%; background:var(--gcb); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:13px; }
.gcb-v2-toast-msg { flex:1; min-width:0; }
.gcb-v2-toast-link { color:#a8d4b8; font-weight:800; text-decoration:none; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.gcb-v2-toast-link:hover { color:#c8ecd5; text-decoration:underline; }
@media (min-width: 992px) { .gcb-v2-toast { display:none !important; } }

/* ============================================================
   MOBILE: Sticky cart summary bar
   ============================================================ */
.gcb-v2-sticky-bar {
  position:fixed; bottom:0; left:0; right:0; z-index:99980;
  background:#fff; border-top:1px solid var(--line);
  box-shadow:0 -2px 10px -2px rgba(0,0,0,.08);
  padding:5px 10px; display:flex; align-items:center;
  justify-content:space-between; gap:6px;
  transform:translateY(100%);
  transition:transform .3s cubic-bezier(.22,1,.36,1);
}
.gcb-v2-sticky-bar.gcb-v2-sticky-visible { transform:translateY(0); }
.gcb-v2-sticky-info { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:#0f1613; min-width:0; }
.gcb-v2-sticky-count { color:var(--muted); font-weight:600; font-size:11px; white-space:nowrap; }
.gcb-v2-sticky-total { font-weight:900; font-size:14px; color:#0f1613; white-space:nowrap; }
.gcb-v2-sticky-dot { color:var(--muted); font-size:9px; }
.gcb-v2-sticky-cta {
  display:inline-flex; align-items:center; gap:4px;
  padding:6px 14px; border-radius:var(--cta-br);
  background:var(--gcb); color:#fff; font-weight:800; font-size:13px;
  text-decoration:none; white-space:nowrap; flex-shrink:0;
  border:none; cursor:pointer; transition:filter .15s;
}
.gcb-v2-sticky-cta:hover { filter:brightness(1.06); color:#fff; text-decoration:none; }
@media (min-width: 992px) { .gcb-v2-sticky-bar { display:none !important; } }
body.gcb-v2-has-sticky-bar { padding-bottom:38px; }
@media (min-width: 992px) { body.gcb-v2-has-sticky-bar { padding-bottom:0; } }
body.gcb-v2-has-sticky-bar .gcb-v2-toast { bottom:50px; }
