/* TechSpot Trading LLC — buttons, cards, forms, badges, marquee */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--fg);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1rem;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* Category card */
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color 0.2s ease, transform 0.25s ease;
}

.category-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
}

.category-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.25s ease, transform 0.4s ease;
}

.category-card:hover .category-card__img {
  opacity: 0.72;
  transform: scale(1.04);
}

/* Light cards: the supplied product photos are on white, so the card is
   white too — photo shown whole, dark label on the white below it. */
.category-card--light {
  background: #fff;
  border-color: oklch(0% 0 0 / 0.08);
}

.category-card--light .category-card__img {
  object-fit: contain;
  object-position: 50% 12%;
  padding: 0 4% 24%;
  opacity: 1;
}

.category-card--light:hover .category-card__img {
  opacity: 1;
  transform: scale(1.04);
}

.category-card.category-card--light::before {
  background: linear-gradient(180deg, transparent 55%, #fff 80%);
}

.category-card--light .category-card__body h3 {
  color: oklch(15% 0 0);
}

.category-card--light .category-card__body span {
  color: oklch(45% 0 0);
}

.category-card--light:hover {
  border-color: oklch(0% 0 0 / 0.2);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(13.5% 0 0 / 0.1) 0%, oklch(13.5% 0 0 / 0.96) 92%);
}

.category-card__body {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.category-card__body h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.category-card__body span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Product card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card__media {
  aspect-ratio: 1/1;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  padding: 18px;
}

.product-card__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* White product renders (iKKO colourways) sit on a light plate. */
.product-card__media--light {
  background: #f2f2f2;
}

.product-card__media--logo img {
  height: 40px;
  width: auto;
  max-width: 60%;
  max-height: 40px;
  filter: brightness(0) invert(1);
  opacity: 0.82;
}

.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.product-card__body h3 {
  font-size: 1.02rem;
  margin-bottom: 2px;
}

.product-card__body p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.product-card__body .btn {
  margin-top: auto;
}

/* Brand card */
.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 108px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brand-card:hover {
  border-color: var(--accent-border);
  background: var(--surface-2);
}

.brand-card img {
  height: 34px;
  width: auto;
  max-width: 78%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.82;
  transition: opacity 0.2s ease;
}

.brand-card:hover img {
  opacity: 1;
}

/* Marquee */
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  animation: marquee-scroll 34s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__track img {
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- Stats bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.stats-bar__item {
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stats-bar__item:last-child { border-right: none; }

.stats-bar__num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
}

.stats-bar__label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 720px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stats-bar__item:nth-child(2) { border-right: none; }
  .stats-bar__item { border-bottom: 1px solid var(--border); }
  .stats-bar__item:nth-last-child(-n+2) { border-bottom: none; }
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.badge-muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

/* ---------- Forms ---------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fg);
}

.form-field .hint {
  font-size: 0.78rem;
  color: var(--muted-2);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.94rem;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted-2);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--danger);
}

.form-field .error-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--danger);
}

.form-field.has-error .error-msg {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-success {
  display: none;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: oklch(75% 0.16 155 / 0.1);
  border: 1px solid oklch(75% 0.16 155 / 0.4);
  color: var(--fg);
}

.form-success.is-visible {
  display: flex;
}

.form-success svg {
  flex: none;
  color: var(--success);
  margin-top: 2px;
}

/* ---------- Tabs (category filter) ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

.tab[aria-selected='true'] {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}

/* ---------- Accordion (FAQ) ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.accordion-trigger .chev {
  flex: none;
  transition: transform 0.25s ease;
  color: var(--accent);
}

.accordion-item[data-open='true'] .chev {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-panel-inner {
  padding: 0 22px 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Table ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.data-table th {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td { color: var(--muted); }
.data-table td:first-child { color: var(--fg); font-weight: 600; }

@media (max-width: 720px) {
  .data-table-wrap { overflow-x: auto; }
  .data-table { min-width: 560px; }
}
