/* Roaring Spring catalog — shared styles */
:root {
  --rs-blue: #1B6FB8;
  --rs-blue-deep: #0F4A82;
  --rs-blue-soft: #E8F2FB;
  --yellow: #FFC72C;
  --yellow-soft: #FFF1B8;
  --ink: #1F1F1F;
  --soft-ink: #4A4A4A;
  --muted: #8A8A8A;
  --rule: #E5E2D9;
  --cream: #FAF7EF;
  --green: #1F8E5F;
  --accent: #E04B3F;
  --white: #FFFFFF;
  --shadow: 0 1px 3px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, Arial, sans-serif;
  color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rs-blue-deep); }

/* Header strip */
.site-head { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-head-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.rs-mark {
  width: 36px; height: 36px; flex: 0 0 36px;
  background: linear-gradient(135deg, var(--rs-blue) 0%, #4FA9D9 60%, #B8DEEF 100%);
  border-radius: 50%; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; letter-spacing: -.02em;
}
.site-head .label { font-size: 10px; font-weight: 700; letter-spacing: .15em; color: var(--muted); text-transform: uppercase; }
.site-head .name { font-size: 14px; font-weight: 800; color: var(--ink); }
.site-head .lines { flex: 1; min-width: 0; }
.site-head nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-head nav a {
  font-size: 12.5px; font-weight: 700; color: var(--soft-ink);
  text-decoration: none; padding: 6px 10px; border-radius: 6px;
  white-space: nowrap;
}
.site-head nav a:hover { background: var(--cream); color: var(--ink); }
.site-head nav a.active { color: var(--rs-blue-deep); background: var(--rs-blue-soft); }

.page-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 240px; }
.page-h { border-bottom: 1px solid var(--rule); padding-bottom: 18px; margin-bottom: 24px; }
.page-h .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; }
.page-h h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.012em; }
.page-h .desc { font-size: 14px; line-height: 1.5; color: var(--soft-ink); max-width: 800px; margin: 0; }

/* Customer info card */
.customer-card {
  background: var(--white); border: 2px dashed var(--rs-blue);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.customer-card .head { margin-bottom: 12px; }
.cc-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: var(--rs-blue); text-transform: uppercase; }
.cc-title { font-size: 16px; font-weight: 800; margin-top: 2px; }
.cc-sub { font-size: 12.5px; color: var(--soft-ink); margin-top: 4px; line-height: 1.45; }
.customer-card-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.cc-field { display: flex; flex-direction: column; gap: 4px; }
.cc-label { font-size: 11px; font-weight: 700; }
.cc-req { color: var(--accent); }
.cc-field input {
  border: 1px solid var(--rule); background: var(--cream);
  border-radius: 6px; padding: 9px 11px;
  font: inherit; font-size: 14px;
}
.cc-field input:focus { outline: 2px solid var(--rs-blue); border-color: var(--ink); background: var(--white); }
@media (max-width: 760px) { .customer-card-fields { grid-template-columns: 1fr; } }

/* Standard product grid */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 800px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--white); border: 2px solid var(--rule); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.product-card.in-cart { border-color: var(--green); }
.product-card .img {
  background: var(--cream); aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--rule); overflow: hidden;
}
.product-card .img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.product-card .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .sku {
  display: inline-block; align-self: flex-start;
  background: var(--cream); border-radius: 4px;
  padding: 2px 6px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px; font-weight: 700; color: var(--soft-ink);
}
.product-card .name { margin: 2px 0 0; font-size: 14px; font-weight: 800; line-height: 1.25; letter-spacing: -.005em; }
.product-card .note { font-size: 12px; color: var(--soft-ink); line-height: 1.4; }
.product-card .pricing { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.moq-pill {
  display: inline-block; align-self: flex-start;
  background: var(--yellow-soft); color: var(--ink);
  font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.product-card .price-wholesale { font-size: 14px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.product-card .price-wholesale .pdq-total { color: var(--rs-blue-deep); }
.product-card .price-msrp { font-size: 11.5px; color: var(--muted); }
.product-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--rule); }

/* Brightspot assortment cards (4-of-6 selector) */
.brightspot-intro {
  background: var(--white); border: 2px solid var(--rule); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 22px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  box-shadow: var(--shadow);
}
.brightspot-intro .icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--yellow); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--ink);
}
.brightspot-intro .meta .label { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; }
.brightspot-intro .meta .body { font-size: 14px; color: var(--ink); line-height: 1.5; margin-top: 4px; }
.brightspot-intro .pick-meter {
  text-align: center; min-width: 120px;
  padding: 10px 14px; background: var(--cream); border-radius: 8px;
}
.brightspot-intro .pick-meter .num { font-size: 22px; font-weight: 800; color: var(--ink); display: block; }
.brightspot-intro .pick-meter .lbl { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 760px) { .brightspot-intro { grid-template-columns: 1fr; text-align: left; } }

.brightspot-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; }
@media (min-width: 700px) { .brightspot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .brightspot-grid { grid-template-columns: repeat(3, 1fr); } }

.assortment-card {
  background: var(--white); border: 2px solid var(--rule); border-radius: 14px;
  overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: var(--shadow); position: relative;
}
.assortment-card:hover { border-color: #C8C2B3; transform: translateY(-2px); }
.assortment-card.selected { border-color: var(--ink); }
.assortment-card.selected::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 199, 44, .06); pointer-events: none;
}
.assortment-card.disabled { opacity: .5; cursor: not-allowed; }
.assortment-card.disabled:hover { transform: none; border-color: var(--rule); }
.assortment-card .img {
  background: var(--cream); aspect-ratio: 2 / 1;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--rule); overflow: hidden;
}
.assortment-card .img img { width: 100%; height: 100%; object-fit: cover; }
.assortment-card .body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.letter-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; background: var(--yellow);
  border-radius: 4px; font-weight: 800; font-size: 14px; color: var(--ink);
}
.assortment-card .head { display: flex; align-items: center; gap: 10px; }
.assortment-card .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .15em; color: var(--accent); }
.assortment-card .title { margin: 4px 0 4px; font-size: 16px; font-weight: 800; line-height: 1.2; }
.assortment-card .body p { margin: 0; font-size: 12.5px; color: var(--soft-ink); line-height: 1.45; }
.assortment-card .meta-rows { font-size: 12px; color: var(--soft-ink); border-top: 1px solid var(--rule); padding-top: 8px; margin-top: auto; display: grid; gap: 3px; }
.meta-row { display: flex; justify-content: space-between; }
.meta-row .lbl { color: var(--muted); }
.meta-row .val { color: var(--soft-ink); }
.meta-row .val.strong { color: var(--ink); font-weight: 800; font-size: 14px; }
.meta-row .val.muted { color: var(--muted); font-size: 12.5px; }
.assortment-card .toggle {
  display: block; text-align: center; background: var(--cream);
  color: var(--ink); font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rule);
  margin-top: 8px;
}
.assortment-card.selected .toggle { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.assortment-card .toggle .when-on { display: none; }
.assortment-card.selected .toggle .when-off { display: none; }
.assortment-card.selected .toggle .when-on { display: inline; }

.alacarte-divider {
  margin: 36px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.alacarte-divider h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.alacarte-divider p { margin: 0; font-size: 13px; color: var(--soft-ink); }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 4px; }
.step-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--rule); background: var(--white); border-radius: 6px;
  font-size: 16px; font-weight: 700; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.step-btn:hover:not(:disabled) { background: var(--cream); border-color: var(--ink); }
.step-btn:disabled { opacity: .35; cursor: not-allowed; }
.step-qty {
  width: 44px; height: 28px; text-align: center;
  border: 1px solid var(--rule); border-radius: 6px;
  font: inherit; font-weight: 800; font-size: 14px; background: var(--white);
}
.step-qty:focus { outline: 2px solid var(--yellow); border-color: var(--ink); }
.line-total { text-align: right; }
.line-label { font-size: 9px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.line-value { font-size: 13.5px; font-weight: 800; color: var(--ink); }

/* Cart bar (sticky bottom) */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: var(--white);
  z-index: 50;
  box-shadow: 0 -4px 24px rgba(0,0,0,.16);
}
.cart-inner { max-width: 1280px; margin: 0 auto; padding: 12px 24px 14px; }
.freight-progress {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 10px;
}
.fp-info { font-size: 11.5px; flex: 1; line-height: 1.4; }
.fp-info .ti { color: rgba(255,255,255,.7); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }
.fp-info .ts { color: var(--white); font-weight: 700; }
.fp-info .ts.unlocked { color: var(--yellow); }
.fp-bar { flex: 2; height: 12px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; }
.fp-fill { height: 100%; width: 0%; background: var(--yellow); transition: width .25s ease, background .25s ease; }
.fp-fill.unlocked { background: var(--green); }

.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }
.cart-state { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.85); }
.cart-state .lab { color: var(--yellow); font-weight: 700; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-right: 6px; }
.cart-state .empty { color: rgba(255,255,255,.55); }
.totals { display: flex; gap: 22px; align-items: flex-end; }
.total-block { text-align: center; min-width: 86px; }
.total-label { font-size: 9.5px; letter-spacing: .15em; color: var(--yellow); font-weight: 700; }
.total-value { font-size: 14px; font-weight: 600; margin-top: 2px; color: rgba(255,255,255,.78); }
.total-block.primary .total-label { color: var(--yellow); }
.total-block.primary .total-value { font-size: 22px; font-weight: 800; color: var(--white); }
.actions { display: flex; gap: 10px; }
.btn {
  border: none; border-radius: 8px; padding: 10px 16px;
  font: inherit; font-weight: 700; font-size: 13.5px;
  cursor: pointer; transition: opacity .15s, transform .15s;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.05); }

@media (max-width: 900px) {
  .cart-row { grid-template-columns: 1fr; gap: 10px; }
  .totals { justify-content: flex-start; flex-wrap: wrap; }
  .actions { flex-wrap: wrap; }
  .freight-progress { flex-direction: column; align-items: stretch; }
}

/* Index page */
.cat-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 18px; margin-top: 24px; }
@media (min-width: 800px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: var(--white); border: 2px solid var(--rule); border-radius: 14px;
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--rs-blue); transform: translateY(-2px); }
.cat-card .eb { font-size: 10.5px; font-weight: 700; letter-spacing: .15em; color: var(--rs-blue); text-transform: uppercase; }
.cat-card h2 { margin: 4px 0 6px; font-size: 22px; font-weight: 800; }
.cat-card p { margin: 0; font-size: 13.5px; color: var(--soft-ink); line-height: 1.45; }
.cat-card .meta { margin-top: auto; padding-top: 12px; font-size: 11.5px; color: var(--muted); font-weight: 700; }

.site-foot {
  margin-top: 48px; border-top: 1px solid var(--rule);
  padding-top: 18px; font-size: 11.5px; color: var(--muted);
  display: flex; justify-content: space-between;
}

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal-bg.open { display: flex; }
.modal { background: var(--white); border-radius: 12px; width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.modal-h { padding: 20px 24px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; }
.modal-h h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-b { padding: 20px 24px; }
.modal-b p { font-size: 13.5px; line-height: 1.5; color: var(--soft-ink); margin: 0 0 12px; }
.modal-f { padding: 16px 24px; border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; gap: 10px; }
.btn-close { background: transparent; border: none; cursor: pointer; width: 32px; height: 32px; border-radius: 6px; font-size: 22px; color: var(--muted); }
.btn-secondary { background: var(--cream); color: var(--ink); border: 1px solid var(--rule); }
.btn-secondary:hover { border-color: var(--ink); }
.modal-b textarea {
  width: 100%; min-height: 320px;
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5;
  background: var(--cream); color: var(--ink); resize: vertical;
}
