:root {
  --navy: #083b67;
  --deep-navy: #042744;
  --red: #ef233c;
  --blue: #1d4f91;
  --white: #f8fbff;
  --line: #bed3e8;
  --panel: #ffffff;
  --shadow: rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Trebuchet MS", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  background: #043b64;
  color: var(--white);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
}

.orb-a {
  width: 340px;
  height: 340px;
  background: rgba(239, 35, 60, 0.16);
  top: -100px;
  left: -90px;
}

.orb-b {
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  right: -80px;
  bottom: -120px;
}

.landing-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.landing-main h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.subtitle {
  margin: 0;
  opacity: 0.95;
}

.league-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 1rem;
  margin-top: 0.75rem;
}

.league-tile {
  border: 2px solid var(--line);
  background: #ffffff;
  border-radius: 18px;
  color: var(--deep-navy);
  padding: 1.1rem;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}

.league-tile img {
  max-width: 170px;
  max-height: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.league-tile span {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.league-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.16);
}

.pick-modal {
  border: 2px solid var(--line);
  border-radius: 14px;
  width: min(92vw, 460px);
  background: #f4f8ff;
  color: var(--deep-navy);
  box-shadow: 0 16px 26px var(--shadow);
  padding: 1.2rem;
}

.pick-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.modal-options {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.modal-options a,
.close-modal {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  padding: 0.7rem;
  font-weight: 700;
}

.modal-options a {
  background: var(--blue);
  color: var(--white);
}

.close-modal {
  background: var(--red);
  color: var(--white);
  width: 100%;
  cursor: pointer;
}

.catalog-page {
  background-attachment: fixed;
}

.catalog-header {
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(4, 39, 68, 0.98), rgba(4, 39, 68, 0.92));
  backdrop-filter: blur(3px);
}

.catalog-header h1 {
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.01em;
}

.home-link {
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}

.print-btn {
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 0.95rem;
}

.header-logo {
  max-width: 86px;
  max-height: 86px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.quick-jump {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
}

.quick-jump a {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

#catalog-root {
  display: grid;
  gap: 1.1rem;
  padding: 0 1rem 1.5rem;
}

.team-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0, rgba(238, 245, 255, 0.98) 100%);
  color: var(--deep-navy);
  border: 2px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  scroll-margin-top: 110px;
}

.team-head {
  padding: 0.85rem 1rem;
  background: linear-gradient(120deg, var(--red), #ff4f67);
  color: var(--white);
}

.team-head h2 {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.subsection {
  padding: 1rem;
  border-top: 1px solid #d7e4f4;
}

.subsection h3 {
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: #0b3559;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.card {
  border: 1px solid #d7e4f4;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
  padding: 0.8rem;
}

.card h4 {
  margin: 0;
  font-size: 1.03rem;
}

.card p {
  margin: 0.45rem 0 0;
  color: #1f3f62;
}

.mock-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.mock {
  border: 1px solid #d7e4f4;
  border-radius: 8px;
  padding: 0.4rem;
  background: #f6f9ff;
  text-align: center;
}

.mock img {
  width: 100%;
  max-height: 145px;
  object-fit: contain;
}

.mock small {
  font-weight: 700;
  color: #355678;
}

.simple-product {
  min-height: 130px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #0f3e6a 0, #0a2f51 100%);
  color: #dfefff;
  border: 1px solid #2f5f8c;
  margin-top: 0.6rem;
  text-align: center;
  font-weight: 700;
  padding: 0.6rem;
}

.order-form .subsection {
  display: grid;
  gap: 0.85rem;
}

.form-note {
  margin: 0;
  color: #1f3f62;
  font-weight: 700;
}

.validation-messages {
  display: none;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
}

.validation-messages.show {
  display: block;
}

.validation-messages.error {
  background: #ffe9ec;
  border: 1px solid #f3b3be;
  color: #8a1f33;
}

.validation-messages.success {
  background: #e8f7ed;
  border: 1px solid #b6e2c1;
  color: #1b6632;
}

.print-stamp {
  border: 1px dashed #b8cfe4;
  border-radius: 8px;
  padding: 0.5rem;
  background: #f7fbff;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
}

.order-meta label,
.notes {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  color: #1f3f62;
}

.order-meta input,
.notes textarea,
.table-wrap input,
.table-wrap select {
  border: 1px solid #b8cfe4;
  border-radius: 6px;
  padding: 0.38rem;
  font: inherit;
  color: #163b60;
  background: #ffffff;
}

.size-qty-editor {
  display: grid;
  gap: 0.5rem;
}

.selected-sizes {
  padding: 0.5rem;
  background: #f0f6fb;
  border: 1px solid #b8cfe4;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #163b60;
}

.edit-sizes-btn {
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.edit-sizes-btn:hover {
  background: #229954;
}

.size-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1001;
  align-items: center;
  justify-content: center;
}

.size-modal.show {
  display: flex;
}

.size-modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  padding: 0;
  animation: slideIn 0.3s ease-out;
}

.size-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.size-modal-header h3 {
  margin: 0;
  color: #1f3f62;
  font-size: 1.1rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0;
}

.close-btn:hover {
  color: #000;
}

.size-modal-body {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.size-qty-pair {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 0.8rem;
  align-items: center;
  padding: 0.6rem;
  border-bottom: 1px solid #f0f0f0;
}

.size-qty-pair:last-child {
  border-bottom: none;
}

.size-qty-pair label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #163b60;
  font-weight: normal;
  cursor: pointer;
}

.size-qty-pair input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.size-qty-pair input[type="number"] {
  border: 1px solid #b8cfe4;
  border-radius: 4px;
  padding: 0.4rem;
  font: inherit;
  color: #163b60;
  background: #ffffff;
}

.size-qty-pair input[type="number"]:disabled {
  background: #f0f0f0;
  color: #999;
  cursor: not-allowed;
}

.size-modal-footer {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
}

.save-sizes-btn,
.cancel-sizes-btn {
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.save-sizes-btn {
  background: #27ae60;
  color: white;
}

.save-sizes-btn:hover {
  background: #229954;
}

.cancel-sizes-btn {
  background: #e0e0e0;
  color: #333;
}

.cancel-sizes-btn:hover {
  background: #d0d0d0;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  border: 1px solid #d7e4f4;
  padding: 0.45rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: #edf4ff;
}

.table-wrap .unit-price,
.table-wrap .line-total,
.totals-row input {
  background: #f3f8ff;
  font-weight: 700;
}

  .form-actions,
  .validation-messages.success,
  .validation-messages.error,
  .form-note,
  .zelle-payment-btn,
  .zelle-modal,
  .order-grid-table,
  #add-to-cart,
  #clear-cart,
  #cart-summary,
  .submission-instructions,
  #print-order-form,
  #print-order-form-2 {
    display: none !important;
  }

  .order-summary-print {
    display: block !important;
    margin: 0.2in 0;
    page-break-inside: avoid;
  }

  .order-summary-print table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }

  .order-summary-print th,
  .order-summary-print td {
    border: 1px solid #000;
    padding: 4px 6px;
    text-align: left;
  }

  .order-summary-print tfoot td {
    background: #f0f0f0;
  }
  border-radius: 8px;
  background: #123e66;
  color: #ffffff;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.form-actions button:hover {
  background: #1a527f;
}

.square-pay-panel {
  border: 1px solid #b8cfe4;
  border-radius: 10px;
  background: #f7fbff;
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

#card-container {
  min-height: 92px;
  background: #ffffff;
  border: 1px solid #d7e4f4;
  border-radius: 8px;
  padding: 0.55rem;
}

.square-status {
  margin: 0;
  font-size: 0.92rem;
  color: #1f3f62;
  font-weight: 700;
}

.square-status.error {
  color: #8a1f33;
}

.zelle-header-reminder {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #f0f8f0;
  border-left: 4px solid #27ae60;
  font-size: 0.9rem;
  color: #1e5a2f;
}

.zelle-header-reminder p {
  margin: 0;
}

.zelle-payment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.zelle-payment-btn:hover {
  background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.zelle-payment-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.zelle-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.zelle-modal.show {
  display: flex;
}

.zelle-modal-content {
  position: relative;
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.zelle-modal-content h3 {
  margin-top: 0;
  color: #27ae60;
  font-size: 1.5rem;
}

.zelle-reminder {
  background: #f0f8f0;
  padding: 0.75rem;
  border-radius: 6px;
  color: #1e5a2f;
  margin: 1rem 0;
  border-left: 4px solid #27ae60;
}

.zelle-reminder strong {
  font-family: monospace;
  font-size: 1.1rem;
}

.zelle-qr-image {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  margin: 1.5rem 0;
  border: 2px solid #27ae60;
  border-radius: 8px;
}

.zelle-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.zelle-modal-close:hover {
  color: #000;
}

@media print {
  * {
    margin: 0;
    padding: 0;
  }

  html, body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
    line-height: 1.4;
  }

  .catalog-header,
  .quick-jump,
  .team-panel:not(.order-form),
  #card-container,
  .square-pay-panel,
  .square-status {
    display: none !important;
  }

  #catalog-root {
    padding: 0.5in;
    max-width: 8.5in;
  }

  .order-form {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    page-break-inside: avoid;
  }

  .order-number-reminder,
  #pay-by-zelle,
  #zelle-modal {
    display: none !important;
  }

  .order-form .team-head {
    background: #ffffff;
    color: #000000;
    border-bottom: 3px solid #000000;
    margin-bottom: 0.3in;
    padding-bottom: 0.15in;
  }

  .order-form .team-head h2 {
    font-size: 16pt;
    font-weight: bold;
    margin: 0;
  }

  .form-actions,\n  .validation-messages.success,\n  .validation-messages.error,\n  .form-note,\n  .zelle-payment-btn,\n  .zelle-modal {
    display: none !important;
  }

  .order-form input,
  .order-form select,
  .order-form textarea {
    border: 1px solid #000000;
    color: #000000;
    background: #ffffff;
    font-size: 10pt;
    padding: 3px;
  }

  .order-form input[readonly],
  .order-form select[readonly] {
    background: #f0f0f0;
  }

  .subsection {
    page-break-inside: avoid;
  }

  .order-meta {
    margin-bottom: 0.2in;
    page-break-inside: avoid;
  }

  .order-meta label {
    display: block;
    margin-bottom: 0.1in;
    font-weight: bold;
    font-size: 10pt;
    page-break-inside: avoid;
  }

  .order-meta label input {
    width: 2.5in;
    margin-left: 0.1in;
  }

  .print-stamp {
    border: 2px dashed #000000;
    background: #ffffff;
    padding: 0.1in;
    margin-bottom: 0.2in;
  }

  .table-wrap {
    margin: 0.2in 0;
    page-break-inside: avoid;
  }

  .table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
  }

  .table-wrap th,
  .table-wrap td {
    border: 1px solid #000000;
    padding: 4px;
    text-align: left;
  }

  .table-wrap th {
    background: #cccccc;
    font-weight: bold;
  }

  .table-wrap .unit-price,
  .table-wrap .line-total {
    text-align: right;
  }

  .notes {
    margin: 0.2in 0;
  }

  .notes label {
    display: block;
    margin-bottom: 0.05in;
    font-weight: bold;
    font-size: 10pt;
  }

  .notes textarea {
    width: 100%;
    min-height: 0.8in;
    font-size: 9pt;
  }

  .totals-row {
    margin-top: 0.2in;
    padding-top: 0.1in;
    border-top: 2px solid #000000;
    page-break-inside: avoid;
  }

  .totals-row label {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 0.08in;
    font-size: 11pt;
  }

  .totals-row input {
    width: 1.5in;
    text-align: right;
  }

  .payment-section {
    border: 2px solid #000000;
    padding: 0.2in;
    margin-top: 0.3in;
    page-break-inside: avoid;
  }

  .payment-section h4 {
    font-size: 12pt;
    font-weight: bold;
    margin-bottom: 0.1in;
    text-decoration: underline;
  }

  .payment-section p {
    margin-bottom: 0.08in;
    font-size: 10pt;
  }

  .payment-options {
    margin-top: 0.1in;
    padding-top: 0.1in;
    border-top: 1px solid #000000;
  }

  .payment-option {
    margin-bottom: 0.08in;
    font-size: 10pt;
  }

  .payment-option label {
    display: inline-block;
    margin-right: 0.2in;
  }

  .submission-instructions {
    border: 1px solid #000000;
    padding: 0.15in;
    margin-top: 0.2in;
    background: #f5f5f5;
    font-size: 9pt;
    page-break-inside: avoid;
  }

  .submission-instructions h5 {
    font-weight: bold;
    font-size: 10pt;
    margin-bottom: 0.05in;
  }

  .submission-instructions ol {
    margin-left: 0.2in;
    margin-bottom: 0.05in;
  }

  .submission-instructions li {
    margin-bottom: 0.03in;
  }
}

@media (max-width: 780px) {
  .league-choices {
    grid-template-columns: 1fr;
  }

  .catalog-header {
    grid-template-columns: auto 1fr;
  }

  .catalog-header h1 {
    grid-column: 1 / -1;
    font-size: 1.6rem;
  }

  .print-btn {
    grid-column: 1 / -1;
    width: fit-content;
  }
}
