/* IDSA Trade Storefront — public/shop.php (M2) */
:root {
  color-scheme: light dark;
  --idsa-ts-bg: #0b1220;
  --idsa-ts-surface: rgba(255, 255, 255, 0.04);
  --idsa-ts-border: rgba(148, 163, 184, 0.2);
  --idsa-ts-text: #e5e7eb;
  --idsa-ts-muted: #9ca3af;
  --idsa-ts-primary: #2563eb;
  --idsa-ts-chat: #0d9488;
  --idsa-ts-ok: #22c55e;
  --idsa-ts-warn: #fbbf24;
}

body.idsa-ts-body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
  background: var(--idsa-ts-bg);
  color: var(--idsa-ts-text);
}

.idsa-ts-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 32px;
}

.idsa-ts-card {
  background: var(--idsa-ts-surface);
  border: 1px solid var(--idsa-ts-border);
  border-radius: 16px;
  padding: 18px;
}

.idsa-ts-brand {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--idsa-ts-muted);
}

.idsa-ts-top {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.idsa-ts-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.idsa-ts-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idsa-ts-logo-fallback {
  font-weight: 900;
  color: var(--idsa-ts-muted);
}

.idsa-ts-top-details {
  flex: 1;
  min-width: min(100%, 240px);
}

.idsa-ts-h {
  margin: 0;
  font-size: 22px;
  color: #fff;
  font-weight: 900;
}

.idsa-ts-muted {
  margin: 4px 0 0;
  color: var(--idsa-ts-muted);
  font-size: 13px;
}

.idsa-ts-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: var(--idsa-ts-text);
  margin: 0 6px 6px 0;
}

.idsa-ts-pill--ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.idsa-ts-pill--warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.idsa-ts-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.idsa-ts-trust-item {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.idsa-ts-trust-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--idsa-ts-muted);
  margin-bottom: 4px;
}

.idsa-ts-trust-value {
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.idsa-ts-trust-value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

a.idsa-ts-trust-value--link {
  color: #7dd3fc;
  text-decoration: none;
}

a.idsa-ts-trust-value--link:hover {
  text-decoration: underline;
}

a.idsa-ts-trust-value--link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
  border-radius: 4px;
}

.idsa-ts-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.idsa-ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  background: var(--idsa-ts-primary);
  color: #fff;
}

.idsa-ts-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.idsa-ts-btn--secondary {
  background: transparent;
  color: var(--idsa-ts-text);
  border-color: rgba(148, 163, 184, 0.35);
}

.idsa-ts-btn--chat {
  background: var(--idsa-ts-chat);
}

.idsa-ts-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.idsa-ts-tab {
  flex: 1 1 auto;
  min-width: min(100%, 120px);
  min-height: 44px;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--idsa-ts-muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.idsa-ts-tab.is-active {
  background: rgba(37, 99, 235, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.idsa-ts-tab:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.idsa-ts-panels {
  margin-top: 14px;
}

.idsa-ts-panel {
  display: none;
}

.idsa-ts-panel.is-active {
  display: block;
}

.idsa-ts-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.idsa-ts-col6 {
  grid-column: span 6;
}

.idsa-ts-col12 {
  grid-column: span 12;
}

.idsa-ts-box {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 14px;
}

.idsa-ts-box h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #fff;
}

.idsa-ts-list {
  margin: 0;
  padding-left: 18px;
  color: var(--idsa-ts-text);
}

.idsa-ts-empty {
  color: var(--idsa-ts-muted);
  font-size: 13px;
}

.idsa-ts-offerings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.idsa-ts-offering {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
}

.idsa-ts-offering-photo {
  aspect-ratio: 16 / 10;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.idsa-ts-offering-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idsa-ts-offering-photo-fallback {
  font-size: 12px;
  font-weight: 700;
  color: var(--idsa-ts-muted);
  padding: 8px;
  text-align: center;
}

.idsa-ts-offering-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.idsa-ts-offering-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.idsa-ts-offering-meta {
  font-size: 12px;
  color: var(--idsa-ts-muted);
}

.idsa-ts-enquiry-card {
  text-align: center;
  padding: 20px 16px;
}

.idsa-ts-enquiry-card p {
  margin: 0 0 14px;
  color: var(--idsa-ts-muted);
  font-size: 14px;
}

.idsa-ts-warn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.idsa-ts-warn-detail {
  margin-top: 6px;
  font-size: 13px;
}

.idsa-ts-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.idsa-ts-toast.is-visible {
  opacity: 1;
}

@media (max-width: 820px) {
  .idsa-ts-col6 {
    grid-column: span 12;
  }

  .idsa-ts-tab {
    flex: 1 1 calc(50% - 6px);
  }

  .idsa-ts-actions .idsa-ts-btn {
    flex: 1 1 100%;
  }
}
