/* =========================================================================
   HASKELL BUNCH & CO. — 1967 Sears/Montgomery Ward catalog spoof
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,700&family=PT+Serif:ital,wght@0,400;0,700;1,400&family=Special+Elite&display=swap');

:root {
  --paper:      #f2ecd9;
  --paper-dark: #e7dfc4;
  --ink:        #201a12;
  --ink-soft:   #4a4030;
  --rule:       #201a12;
  --red:        #8c2a1f;
  --green:      #2f5d3a;
  --gold:       #a9761f;
  --card-bg:    #fbf7ea;
  --shadow-hard: 4px 4px 0 var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  margin: 0 0 10px;
  color: var(--ink);
}

a { color: var(--red); }
a:hover { color: var(--ink); }

.type-mono {
  font-family: 'Special Elite', 'Courier New', monospace;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- MASTHEAD ---------------------------------------------------------- */
.masthead {
  background: var(--paper);
  border-bottom: 6px double var(--rule);
  padding: 18px 0 10px;
}
.masthead-topline {
  display: flex;
  justify-content: space-between;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .masthead-topline span:last-child { display: none; }
}
.masthead-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  text-align: center;
}
.masthead-seal {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Special Elite', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 6px;
  position: relative;
}
.masthead-seal::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.masthead-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
}
.masthead-sub {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 6px;
  color: var(--ink-soft);
}
.masthead-nav {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.masthead-nav a { text-decoration: none; color: var(--ink); }
.masthead-nav a:hover { color: var(--red); }
.masthead-cart {
  font-weight: bold;
}

/* ---- LAYOUT ------------------------------------------------------------- */
.store-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  padding: 28px 0 60px;
  align-items: start;
}
@media (max-width: 860px) {
  .store-layout { grid-template-columns: 1fr; }
}

.store-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 860px) {
  .store-sidebar { position: static; }
}

.side-box {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 16px;
}
.side-box h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.dept-list { list-style: none; margin: 0; padding: 0; }
.dept-list li { margin-bottom: 6px; }
.dept-list a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 2px;
}
.dept-list a.active { font-weight: bold; color: var(--red); }

.employee-box .employee-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 10px;
  background: var(--paper-dark);
}
.employee-box { text-align: center; }
.employee-name { font-weight: bold; }
.employee-dept { font-size: 12px; color: var(--ink-soft); font-style: italic; margin: 2px 0 8px; }
.employee-quote { font-size: 13px; font-style: italic; }

.hiring-box {
  background: var(--green);
  color: var(--paper);
  border-color: var(--ink);
}
.hiring-box h3 { color: var(--paper); border-color: var(--paper); }
.hiring-box .wage { font-size: 1.3rem; font-weight: bold; }
.hiring-box a.btn { margin-top: 10px; }

/* ---- CATALOG GRID -------------------------------------------------------- */
.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 3px double var(--rule);
  padding-bottom: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.catalog-header p { margin: 0; font-size: 13px; color: var(--ink-soft); font-style: italic; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.catalog-card {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.catalog-card.is-featured::before {
  content: 'FEATURED';
  position: absolute;
  top: 8px; right: -28px;
  background: var(--red);
  color: #fff;
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 30px;
  transform: rotate(35deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.catalog-card.out-of-stock { opacity: 0.62; }

.catalog-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
  display: block;
}
.catalog-photo--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    repeating-linear-gradient(45deg, var(--paper-dark), var(--paper-dark) 10px, var(--paper) 10px, var(--paper) 20px);
  text-align: center;
  padding: 8px;
}
.placeholder-mark {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink-soft);
}
.placeholder-filename {
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px dashed var(--ink-soft);
  padding: 2px 6px;
}

.catalog-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cat-no {
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
}
.catalog-name { font-size: 1rem; font-weight: bold; line-height: 1.25; }
.catalog-brand { font-size: 12px; font-style: italic; color: var(--ink-soft); }
.catalog-desc { font-size: 12.5px; color: var(--ink-soft); flex: 1; }
.shpg-wt { font-size: 11px; color: var(--ink-soft); }
.real-price-flag { color: var(--gold); font-weight: bold; }

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 6px;
  border-top: 1px dashed var(--ink-soft);
  padding-top: 6px;
}
.price-1967 { font-size: 1.15rem; font-weight: bold; }
.price-modern { font-size: 0.75rem; color: var(--ink-soft); display: none; }
body.channel-13 .price-modern { display: block; }
body.channel-13 .price-1967 { text-decoration: line-through; opacity: 0.6; font-size: 0.95rem; }

/* ---- BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--red); color: #fff; border-color: var(--ink); }
.btn-block { display: block; width: 100%; }
.btn-sm { font-size: 11px; padding: 6px 10px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---- MODAL (product quick view) ------------------------------------------ */
.hb-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,15,8,0.72);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.hb-modal-backdrop.open { display: flex; }
.hb-modal {
  background: var(--card-bg);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  max-width: 460px; width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 26px 24px 22px;
}
.hb-modal-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--ink);
}

/* ---- CART / CHECKOUT ------------------------------------------------------ */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cart-table th, .cart-table td {
  border-bottom: 1px solid var(--ink-soft);
  padding: 10px 8px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}
.cart-table th { font-family: 'Special Elite', monospace; text-transform: uppercase; font-size: 11px; }
.cart-qty { width: 56px; padding: 4px; font-family: 'PT Serif', serif; }
.cart-summary {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 18px;
  max-width: 340px;
  margin-left: auto;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.cart-summary .total-row { font-weight: bold; font-size: 1.1rem; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 8px; }
.stamp-earn-note { font-size: 12px; color: var(--green); font-weight: bold; margin-top: 6px; }

.payment-options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.payment-option {
  border: 2px solid var(--ink);
  background: var(--card-bg);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.payment-option input { transform: scale(1.2); }

/* Knuckle-Buster imprinter */
.imprinter-stage {
  text-align: center;
  padding: 30px 10px;
  display: none;
}
.imprinter-stage.active { display: block; }
.imprinter-machine {
  width: 210px;
  height: 90px;
  margin: 0 auto 14px;
  background: linear-gradient(180deg, #7a7d82, #4c4e52);
  border: 3px solid var(--ink);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.imprinter-sled {
  position: absolute;
  top: 14px; left: -70px;
  width: 60px; height: 62px;
  background: #d6d2c4;
  border: 2px solid #222;
}
.imprinter-sled.sliding {
  animation: imprinter-slide 1.1s ease-in-out;
}
@keyframes imprinter-slide {
  0%   { left: -70px; }
  45%  { left: 150px; }
  55%  { left: 150px; }
  100% { left: -70px; }
}
.imprinter-caption {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Carbon charge slip (3-ply) */
.charge-slip-stack {
  position: relative;
  max-width: 380px;
  margin: 20px auto;
  padding-bottom: 16px;
}
.charge-slip {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  border: 1px solid var(--ink);
  padding: 16px 16px 10px;
  position: relative;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
}
.charge-slip.ply-white { background: #fdfcf5; z-index: 3; }
.charge-slip.ply-pink  { background: #f3d9d9; position: absolute; top: 8px; left: 8px; right: -8px; z-index: 2; }
.charge-slip.ply-yellow{ background: #f7ecb8; position: absolute; top: 16px; left: 16px; right: -16px; z-index: 1; }
.charge-slip h4 { font-family: 'Special Elite', monospace; font-size: 13px; text-align: center; margin-bottom: 6px; }
.charge-slip .slip-row { display: flex; justify-content: space-between; }
.charge-slip .slip-total { border-top: 1px dashed var(--ink); margin-top: 6px; padding-top: 6px; font-weight: bold; }
.charge-slip .slip-sig { margin-top: 16px; border-top: 1px solid var(--ink); padding-top: 4px; font-size: 10px; }
.charge-slip .slip-fine { font-size: 9px; margin-top: 10px; color: #555; }

/* ---- GREEN STAMPS ---------------------------------------------------------- */
.stamp-count-banner {
  background: var(--gold);
  color: #fff;
  padding: 10px 16px;
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid var(--ink);
  margin-bottom: 16px;
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 14px 0;
  padding: 10px;
  background: #fffef7;
  border: 2px dashed var(--gold);
}
.stamp {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #3f7d4a, #2f5d3a);
  border: 1px dashed #fff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--gold);
}
.stamp.empty { background: transparent; box-shadow: none; border: 1px dotted #ccc; }
.redemption-list { list-style: none; padding: 0; margin: 0; }
.redemption-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink-soft);
  padding: 10px 0;
  font-size: 14px;
}

/* ---- CLICK-TUNER (footer) --------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 30px 0 20px;
  margin-top: 40px;
}
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-links a { color: var(--paper); margin-right: 14px; font-size: 13px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

.click-tuner { display: flex; align-items: center; gap: 14px; }
.tuner-dial {
  width: 78px; height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #555, #111 70%);
  border: 3px solid #999;
  position: relative;
  cursor: pointer;
}
.tuner-dial::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 30px;
  background: #e8c34a;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 0.4s ease;
}
.tuner-dial.channel-13::after { transform: translateX(-50%) rotate(220deg); }
.tuner-label { font-family: 'Special Elite', monospace; font-size: 11px; color: #ccc; }
.tuner-channel-readout {
  font-family: 'Special Elite', monospace;
  font-size: 20px;
  color: #e8c34a;
  border: 2px solid #666;
  padding: 4px 10px;
  background: #111;
}

/* CRT flicker overlay */
.crt-flicker {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px, transparent 2px, transparent 4px);
  pointer-events: none;
  z-index: 500;
  opacity: 0;
}
.crt-flicker.active {
  animation: crt-flicker-anim 0.5s steps(2, end) 2;
}
@keyframes crt-flicker-anim {
  0%   { opacity: 0.9; background-color: rgba(255,255,255,0.5); }
  50%  { opacity: 0.2; background-color: transparent; }
  100% { opacity: 0; }
}

/* ---- FORMS (suggest, apply, onboarding) ------------------------------------ */
.form-page { max-width: 640px; margin: 0 auto; padding: 30px 0 60px; }
.form-card {
  background: var(--card-bg);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 26px 28px;
}
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-family: 'Special Elite', monospace; font-size: 12px; text-transform: uppercase; margin-bottom: 5px; letter-spacing: 0.5px; }
.form-field input[type=text],
.form-field input[type=email],
.form-field input[type=tel],
.form-field input[type=date],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 2px solid var(--ink);
  background: #fff;
  font-family: 'PT Serif', serif;
  font-size: 14px;
}
.form-field .help-text { font-size: 11px; color: var(--ink-soft); font-style: italic; margin-top: 3px; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { font-family: 'PT Serif', serif; text-transform: none; display: flex; align-items: center; gap: 6px; font-size: 14px; }

.fineprint-disclaimer {
  font-size: 10.5px;
  color: var(--ink-soft);
  border-top: 2px dashed var(--ink-soft);
  margin-top: 24px;
  padding-top: 12px;
  line-height: 1.5;
}

.letter-preview {
  background: #fffef8;
  border: 1px solid var(--ink-soft);
  padding: 20px;
  white-space: pre-wrap;
  font-size: 13px;
  margin: 16px 0;
}

/* ---- EMPLOYEE ID CARD -------------------------------------------------------- */
.id-card-pair { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.id-card {
  width: 320px;
  min-height: 200px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f1ecd9);
  padding: 16px;
  position: relative;
  box-shadow: var(--shadow-hard);
}
.id-card-header {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.id-card-body { display: flex; gap: 12px; }
.id-photo-box {
  width: 78px; height: 96px;
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(45deg, #ddd, #ddd 6px, #eee 6px, #eee 12px);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; text-align: center; color: #777;
  flex: 0 0 auto;
}
.id-patch {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-top: 6px;
}
.id-fields { font-size: 12px; line-height: 1.7; }
.id-card-back { font-size: 11px; }
.id-card-back ol { padding-left: 18px; margin: 0; }
.id-card-back li { margin-bottom: 6px; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .id-card { box-shadow: none; }
}

/* ---- MISC ------------------------------------------------------------------ */
.page-title-bar {
  border-bottom: 3px double var(--rule);
  padding: 22px 0 14px;
  text-align: center;
}
.flash-message {
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 2px solid var(--ink);
}
.flash-message.error { background: var(--red); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); font-style: italic; }
