/* The Palmetto Printer — wholesale site
   Brand colors follow the printed wholesale catalog. */

:root {
  --ink: #151515;
  --dark: #0e0e0e;
  --lime: #a4d93b;
  --lime-d: #5e8a12;
  --lime-ink: #3d5c0a;
  --soft: #f3f8e8;
  --soft-2: #eaf3d4;
  --muted: #5a5a5a;
  --line: #d6d6d6;
  --line-strong: #bdbdbd;
  --bg: #f7f7f5;
  --card: #ffffff;
  --danger: #9b1c1c;
  --danger-bg: #fdecec;
  --shadow: 0 8px 24px rgba(14, 14, 14, 0.08);
  --radius: 12px;
  --max: 1120px;
  --font-sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-display: "Poppins", "Nunito", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--lime);
  color: #111;
  padding: 8px 14px;
  z-index: 1000;
  font-weight: 800;
}
.skip:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark);
  color: #fff;
  border-bottom: 1px solid #222;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: inherit; }

.brand-logo {
  width: 52px;
  height: 76px;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
  box-shadow: 0 0 0 1px #2a2a2a;
  flex-shrink: 0;
}

.brand-text { min-width: 0; }
.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.brand-text strong span { color: var(--lime); }
.brand-text small {
  display: block;
  color: #cfcfcf;
  font-size: 12px;
  font-weight: 600;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 2px;
}
.nav a:hover { color: var(--lime); }
.nav .phone {
  color: var(--lime);
  white-space: nowrap;
}

/* Hero */
.hero {
  background: var(--dark);
  color: #fff;
  padding: 28px 20px 40px;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px 40px;
  align-items: center;
}

.hero-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 0 0 1px #2a2a2a;
  justify-self: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
.hero h1 span { color: var(--lime); }

.hero .lede {
  font-size: 18px;
  color: #e8e8e8;
  margin: 0 0 16px;
  max-width: 42em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.chip {
  border: 1.5px solid var(--lime);
  color: var(--lime);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn-primary {
  background: var(--lime);
  color: #111;
}
.btn-primary:hover { background: #b6e558; color: #111; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid #666;
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-ghost.dark {
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost.dark:hover { border-color: var(--ink); color: var(--ink); }
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Sections */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.terms {
  background: var(--soft);
  border-bottom: 1px solid var(--soft-2);
  padding: 22px 0;
}
.terms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 24px;
}
.terms-card h2 {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--lime-ink);
}
.terms-card p,
.terms-card ul {
  margin: 0;
  font-size: 15px;
  color: #333;
}
.terms-card ul { padding-left: 1.15em; }
.terms-card li { margin: 3px 0; }

.section {
  padding: 36px 0 16px;
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 6px;
}
.section .sub {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 46em;
}

.playlist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  background: var(--soft);
  border: 2px solid var(--lime-d);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 24px;
}
.playlist p { margin: 0; font-size: 15px; }
.playlist a { font-weight: 800; }

/* Catalog grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card.hero-item {
  border-color: var(--lime-d);
  box-shadow: 0 0 0 2px var(--lime) inset;
}

.photo {
  position: relative;
  height: 200px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.photo.dark-photo { background: #1a1a1a; }
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--lime);
  color: #111;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.watch {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
}
.watch:hover { color: var(--lime); }
.photo-note {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  color: #777;
  background: rgba(255,255,255,0.85);
  padding: 2px 6px;
  border-radius: 6px;
}

.info { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.info .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
}
.info .sku {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 2px 0 8px;
}
.info .desc {
  font-size: 14.5px;
  margin: 0 0 8px;
  flex: 1;
}
.info .credit {
  font-size: 11.5px;
  color: #777;
  margin: 0 0 10px;
}

.prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-bottom: 12px;
}
.prices div { text-align: center; }
.prices b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.prices .w b { color: var(--lime-d); }
.prices span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.qty-row .label {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
}
.stepper button:hover { background: var(--soft); }
.stepper input {
  width: 52px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Order section */
.section,
.order-section,
#lineup,
#order,
#contact,
.section h2,
#lineup h2,
#order h2,
#contact h2 {
  scroll-margin-top: 100px;
}

.order-section {
  padding: 12px 0 48px;
}
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-weight: 800;
  font-size: 13px;
}
.req { color: var(--danger); }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--lime-d);
  outline: 3px solid var(--soft-2);
}
.field .hint { font-size: 12.5px; color: var(--muted); }
.field.error input,
.field.error select,
.field.error textarea { border-color: var(--danger); background: #fff8f8; }
.field .err {
  display: none;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
}
.field.error .err { display: block; }

.pay-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.pay-opts label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  white-space: nowrap;
}
.pay-opts input { accent-color: var(--lime-d); }

.order-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 8px 0 4px;
}
.order-lines th,
.order-lines td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.order-lines th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.order-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
.order-lines tbody tr.is-zero { display: none; }
.order-lines .empty-note td {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 16px 8px;
}

.form-errors {
  display: none;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 14px;
}
.form-errors.show { display: block; }

.legal-note {
  font-size: 13.5px;
  color: #444;
  margin: 14px 0;
}

/* Summary */
.summary {
  position: sticky;
  top: 88px;
  background: var(--dark);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 20px;
}
.summary h3 { color: #fff; margin-bottom: 12px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  font-size: 15px;
}
.summary-row .k { color: #cfcfcf; }
.summary-row .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-total {
  border-top: 1px solid #333;
  margin-top: 12px;
  padding-top: 12px;
  font-size: 18px;
}
.summary-total .v {
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 26px;
}

.ship-pill {
  margin: 12px 0 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.ship-pill.free { background: #1d3a12; color: var(--lime); }
.ship-pill.cost { background: #2a2a2a; color: #eee; }
.ship-pill .need {
  display: block;
  font-weight: 600;
  color: #ddd;
  margin-top: 4px;
  font-size: 13px;
}

.big-order {
  display: none;
  margin: 12px 0 0;
  background: #3a2a10;
  color: #ffe7b3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.big-order.show { display: block; }
.big-order a { color: var(--lime); }

.summary .submit { margin-top: 16px; width: 100%; }
.summary .submit-invoice {
  margin-top: 10px;
  width: 100%;
  background: transparent;
  color: #fff;
  border: 1.5px solid #666;
}
.summary .submit-invoice:hover { border-color: var(--lime); color: var(--lime); }
.summary .fine {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: #bdbdbd;
}

/* Confirmation */
.confirm {
  display: none;
  padding: 36px 0 64px;
}
.confirm.show { display: block; }
.confirm-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}
.confirm-card h2 { margin-top: 0; }
.confirm-preview {
  background: #fff8d6;
  border: 1px solid #e6d37a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 0 0 18px;
}
.confirm dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
  margin: 0 0 18px;
  font-size: 15px;
}
.confirm dt { color: var(--muted); font-weight: 700; }
.confirm dd { margin: 0; }
.confirm .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #ddd;
  padding: 32px 20px 48px;
  font-size: 14.5px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}
.site-footer h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 16px;
  margin: 0 0 8px;
}
.site-footer a { color: var(--lime); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 8px; }
.site-footer .legal {
  grid-column: 1 / -1;
  border-top: 1px solid #333;
  padding-top: 16px;
  color: #9a9a9a;
  font-size: 12.5px;
  line-height: 1.55;
}
.site-footer .credits { margin-top: 8px; }

/* Mobile sticky tally */
.mobile-tally {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
}
.mobile-tally-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-tally .stats { flex: 1; min-width: 0; }
.mobile-tally .total {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--lime);
  font-size: 18px;
}
.mobile-tally .meta { font-size: 12.5px; color: #ccc; }
.mobile-tally .btn { padding: 10px 16px; font-size: 14px; }

body.order-sent .hero,
body.order-sent .terms,
body.order-sent #lineup,
body.order-sent #order,
body.order-sent .mobile-tally { display: none !important; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 120px 1fr; gap: 20px; }
  .hero-logo { width: 120px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .terms-grid { grid-template-columns: 1fr; }
  .order-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .mobile-tally { display: block; }
  .mobile-tally.is-empty { display: none !important; }
  .header-inner {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 14px 10px;
  }
  .brand-logo { width: 36px; height: 52px; }
  .brand-text strong { font-size: 13px; }
  .brand-text small { display: none; }
  .nav {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
  }
  .section,
  .order-section,
  #lineup,
  #order,
  #contact,
  .section h2,
  #lineup h2,
  #order h2,
  #contact h2 { scroll-margin-top: 168px; }
  .hero { padding: 20px 16px 28px; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-logo { width: 140px; justify-self: start; }
  .catalog-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .confirm dl { grid-template-columns: 1fr; }
  .confirm dt { margin-top: 6px; }
  .photo { height: 220px; }
  .order-lines .col-unit,
  .order-lines .col-retail { display: none; }
  body:has(.mobile-tally:not(.is-empty)) main {
    padding-bottom: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header,
  .hero,
  .terms,
  #lineup,
  #order,
  .mobile-tally,
  .confirm .actions,
  .confirm-preview { display: none !important; }
  body.order-sent .confirm { display: block !important; padding: 0; }
  .confirm-card { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}
