@import url('https://fonts.googleapis.com/css2?family=Staatliches&family=Space+Grotesk:wght@400;600&display=swap');

:root {
  --bg: #101214;
  --bg-soft: #1a1d20;
  --card: #1d2024;
  --accent: #f29d38;
  --accent-2: #db3a34;
  --text: #f4f4f0;
  --muted: #9a9fa6;
  --line: #2a2f35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at top, #242933, #0f1113 60%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(120deg, rgba(242, 157, 56, 0.1), rgba(219, 58, 52, 0.15));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 16px;
  animation: floatIn 0.6s ease;
}

.hero h1 {
  font-family: 'Staatliches', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero__eyebrow-link {
  color: inherit;
  text-decoration: none;
}

.hero__eyebrow-link:hover {
  text-decoration: underline;
}

.hero__sub {
  margin: 0;
  color: var(--muted);
}

.cart-btn {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #111;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}

.modal-close {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cart-btn__count {
  background: #111;
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(242, 157, 56, 0.25);
}

.cart-btn:active {
  transform: translateY(0);
}

.section-title h2 {
  margin: 0;
  font-size: 1.6rem;
  margin-top: 16px;
  margin-bottom: 10px;
}

.section-title__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.section-title__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.section-title p {
  margin: 6px 0 20px;
  color: var(--muted);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card--compact {
  min-height: 170px;
  gap: 8px;
}

.access-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.access-pill--all {
  background: rgba(126, 193, 109, 0.2);
  color: #9adf8c;
  border: 1px solid rgba(126, 193, 109, 0.45);
}

.access-pill--neo {
  background: rgba(232, 196, 85, 0.2);
  color: #f0d46a;
  border: 1px solid rgba(232, 196, 85, 0.45);
}

.access-pill--of {
  background: rgba(232, 94, 94, 0.2);
  color: #f08a8a;
  border: 1px solid rgba(232, 94, 94, 0.45);
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(242, 157, 56, 0.1), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.card button {
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: #111;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 0.25s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.cart-fab__count {
  background: #111;
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.cart-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(242, 157, 56, 0.3);
}

.cart-fab--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cart-fab--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.card__link,
.card__placeholder {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

.card__link {
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.card__link:hover {
  background: rgba(242, 157, 56, 0.15);
}

.card__placeholder {
  border: 1px dashed var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.card button:hover {
  background: rgba(242, 157, 56, 0.15);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 157, 56, 0.5);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.card__link:hover,
.card button:hover {
  box-shadow: 0 10px 18px rgba(242, 157, 56, 0.2);
  transform: translateY(-1px);
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 95vw);
  background: #121418;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.cart.open {
  transform: translateX(0);
}

.cart__header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cart__body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart__footer {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--line);
}

.cart-submit {
  width: 100%;
  justify-content: center;
}

.cart__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cart-item h4 {
  margin: 0 0 6px;
}

.cart-item small {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.cart-item:hover {
  transform: translateX(-4px);
  border-color: rgba(242, 157, 56, 0.35);
}

.cart__totals {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.inventory-toggle {
  margin-top: 12px;
  width: 100%;
  text-align: center;
}

.total-section {
  background: rgba(18, 20, 24, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.total-section h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.total-section + .total-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.total-line + .total-line {
  margin-top: 6px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.total-line strong {
  color: var(--text);
}

.total-line span {
  color: var(--accent);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 30;
}

.modal.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.open .modal__backdrop {
  opacity: 1;
}

.modal__panel {
  position: relative;
  max-width: 520px;
  margin: 10vh auto;
  background: #15181d;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.modal__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal__panel--wide {
  max-width: 780px;
}

.modal.open .modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal__body {
  display: grid;
  gap: 16px;
}

.order-message {
  width: 100%;
  min-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  padding: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.order-message:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(18, 20, 24, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.inventory-list {
  background: rgba(18, 20, 24, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.inventory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 17, 20, 0.7);
}

.inventory-row strong {
  color: var(--text);
  flex: 1;
}

.inventory-value {
  color: var(--accent);
  font-weight: 700;
  min-width: 90px;
  text-align: right;
}

.inventory-input {
  width: 100%;
  max-width: 120px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inventory-input:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.inventory-section {
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.attachments-only-btn {
  white-space: nowrap;
}

.attachments-only-list {
  display: grid;
  gap: 12px;
}

.attachments-only-weapon {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 20, 24, 0.5);
  overflow: hidden;
}

.attachments-only-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  cursor: pointer;
}

.attachments-only-toggle::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
}

.attachments-only-weapon.open .attachments-only-toggle::after {
  content: "-";
}

.attachments-only-items {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  gap: 10px;
}

.attachments-only-weapon.open .attachments-only-items {
  display: grid;
}

.attachments-only-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 17, 20, 0.7);
}

.attachment-only-name {
  color: var(--text);
  font-weight: 600;
}

.qty-control--compact {
  grid-template-columns: 36px 80px 36px;
}

.attachment-only-input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.attachment-only-input[type="number"] {
  -moz-appearance: textfield;
}

.attachment-only-input[type="number"]::-webkit-inner-spin-button,
.attachment-only-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.attachment-only-input[type="number"]:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.ammo-only-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 17, 20, 0.7);
}

.ammo-only-name {
  color: var(--text);
  font-weight: 600;
}

.attachments {
  display: grid;
  gap: 10px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 10px;
}

.attachment input {
  accent-color: var(--accent);
}

.modal__qty {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qty-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.qty-divider {
  height: 1px;
  background: var(--line);
}

.qty-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
}

.qty-btn {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal__qty input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.modal__qty input[type="number"] {
  -moz-appearance: textfield;
}

.modal__qty input[type="number"]::-webkit-inner-spin-button,
.modal__qty input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inventory-input[type="number"] {
  -moz-appearance: textfield;
}

.inventory-input[type="number"]::-webkit-inner-spin-button,
.inventory-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal__footer {
  margin-top: 18px;
  text-align: right;
}

.primary {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.muted {
  color: var(--muted);
  margin: 0 0 10px;
}

.qty-btn:hover,
.ghost:hover {
  border-color: rgba(242, 157, 56, 0.45);
  transform: translateY(-1px);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(242, 157, 56, 0.25);
}

.modal__qty input:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title__row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .section-title__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
  }

  .cart-btn {
    align-self: stretch;
    justify-content: space-between;
  }

  .attachments-only-btn {
    width: auto;
    font-size: 0.78rem;
    padding: 6px 8px;
    white-space: nowrap;
  }

  .card {
    min-height: 180px;
    gap: 8px;
    padding: 14px;
  }

  .card__meta {
    margin-bottom: 0;
  }

  .cart-fab {
    left: 16px;
    right: 16px;
    bottom: 14px;
    justify-content: space-between;
  }

  .page {
    padding-bottom: 90px;
  }

  .modal__panel {
    margin: 10vh 16px;
  }

  .inventory-row {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .inventory-value,
  .inventory-input {
    min-width: 100%;
    max-width: 100%;
    text-align: left;
  }

  .inventory-row strong,
  .inventory-value {
    min-width: auto;
    width: auto;
  }

  .inventory-input {
    margin-top: 6px;
    text-align: center;
  }

  .qty-control--compact {
    grid-template-columns: 32px 56px 32px;
  }

  .attachments-only-item,
  .ammo-only-item {
    gap: 8px;
  }
}
