/* ==========================================================================
   Trader WorkStation – Global Styles
   ========================================================================== */

:root {
  --tws-bg: #020617;
  --tws-bg-elevated: #020617;
  --tws-bg-card: rgba(15, 23, 42, 0.96);
  --tws-bg-card-soft: rgba(15, 23, 42, 0.9);
  --tws-bg-subtle: #020617;
  --tws-border-subtle: rgba(148, 163, 184, 0.35);
  --tws-border-strong: rgba(148, 163, 184, 0.6);

  --tws-fg: #e5e7eb;
  --tws-fg-muted: #9ca3af;
  --tws-fg-soft: #6b7280;
  --tws-fg-strong: #f9fafb;

  --tws-accent: #22c55e;
  --tws-accent-soft: rgba(34, 197, 94, 0.1);
  --tws-accent-strong: #16a34a;
  --tws-accent-alt: #06b6d4;

  --tws-danger: #ef4444;
  --tws-danger-soft: rgba(239, 68, 68, 0.12);
  --tws-warning: #eab308;
  --tws-warning-soft: rgba(234, 179, 8, 0.12);
  --tws-success: #22c55e;
  --tws-success-soft: rgba(34, 197, 94, 0.12);

  --tws-radius-sm: 0.5rem;
  --tws-radius-md: 0.9rem;
  --tws-radius-lg: 1.4rem;
  --tws-radius-pill: 999px;

  --tws-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.9);
  --tws-shadow-subtle: 0 8px 20px rgba(15, 23, 42, 0.6);

  --tws-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Base Reset-ish ---------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.06), transparent 55%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.06), transparent 55%),
    var(--tws-bg);
  color: var(--tws-fg);
  font-family: var(--tws-font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--tws-accent-alt);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* Layout ------------------------------------------------------------------ */

.tws-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tws-main {
  flex: 1 0 auto;
  padding-top: 4.5rem;
}

.tws-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.tws-section {
  padding: 3.5rem 0;
}

@media (min-width: 1024px) {
  .tws-section {
    padding: 4.25rem 0;
  }
}

/* Headings / Text --------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--tws-fg-strong);
  margin: 0 0 0.4em;
}

.tws-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tws-fg-soft);
  margin-bottom: 0.4rem;
}

/* Header / Navigation ----------------------------------------------------- */

.tws-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.75));
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.tws-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tws-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.tws-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
  flex-shrink: 0;
}

.tws-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tws-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tws-logo-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tws-fg-strong);
}

.tws-logo-sub {
  font-size: 0.7rem;
  color: var(--tws-fg-soft);
}

/* Nav */

.tws-nav {
  margin-left: auto;
}

.tws-nav-list {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tws-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--tws-fg-muted);
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.tws-nav-link:hover {
  color: var(--tws-fg-strong);
  background-color: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

/* Header actions */

.tws-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.75rem;
}

/* Mobile nav toggle */

.tws-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.95));
  cursor: pointer;
  padding: 0.35rem;
}
.tws-nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #e5e7eb;
  border-radius: 999px;
  transition: transform 140ms ease, opacity 140ms ease;
}

@media (min-width: 900px) {
  .tws-nav-toggle {
    display: none;
  }
}

/* Mobile nav state (JS will toggle a class on body or nav; we support both) */

@media (max-width: 899.98px) {
  .tws-nav {
    position: fixed;
    inset: 3.4rem 1rem auto 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--tws-shadow-soft);
    transform-origin: top center;
    transform: scale(0.98) translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }
  .tws-nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    gap: 0.1rem;
  }
  body.tws-nav-open .tws-nav,
  .tws-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
  }
}

/* Desktop nav */

@media (min-width: 900px) {
  .tws-nav {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    border: none;
    box-shadow: none;
  }
}

/* Footer ------------------------------------------------------------------ */

.tws-footer {
  padding: 1.8rem 0 2.2rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  margin-top: 2rem;
}

.tws-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.tws-footer-primary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tws-footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--tws-fg-soft);
}

.tws-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
  align-items: center;
}
.tws-footer-link {
  color: var(--tws-fg-muted);
  text-decoration: none;
}
.tws-footer-link:hover {
  color: var(--tws-fg-strong);
  text-decoration: underline;
}
.tws-footer-separator {
  color: rgba(148, 163, 184, 0.5);
}

.tws-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.tws-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--tws-fg-muted);
}
.tws-footer-social-link i {
  font-size: 0.9rem;
}
.tws-footer-social-link:hover {
  color: var(--tws-fg-strong);
}

/* Visitors widget (admin only) */

.tws-visitors-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.75rem;
  color: var(--tws-fg-soft);
}

.tws-visitors-dot {
  color: #f97316;
  font-size: 1rem;
}

.tws-visitors-label {
  font-size: 0.75rem;
}

.tws-visitors-count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--tws-fg-strong);
}

/* Cards ------------------------------------------------------------------- */

.tws-card {
  border-radius: var(--tws-radius-lg);
  background: var(--tws-bg-card);
  border: 1px solid var(--tws-border-subtle);
  box-shadow: var(--tws-shadow-soft);
  padding: 1.4rem 1.4rem;
}

.tws-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.tws-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.tws-card-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--tws-fg-muted);
}

.tws-card-header-cta {
  flex-shrink: 0;
}

/* Buttons ----------------------------------------------------------------- */

.tws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--tws-radius-pill);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.tws-btn-primary {
  background: linear-gradient(135deg, var(--tws-accent), var(--tws-accent-alt));
  color: #020617;
  border-color: rgba(74, 222, 128, 0.8);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25);
}
.tws-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.3);
}

.tws-btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--tws-fg-muted);
}
.tws-btn-outline:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--tws-fg-strong);
}

.tws-btn-ghost {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--tws-fg-muted);
}
.tws-btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  color: var(--tws-fg-strong);
}

.tws-btn-accent {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(56, 189, 248, 0.7);
  color: #e0f2fe;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.22);
}
.tws-btn-accent:hover {
  background: rgba(8, 47, 73, 0.98);
}

.tws-btn-lg {
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
}

.tws-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.tws-btn-xs {
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
}

/* Chips / Pills ----------------------------------------------------------- */

.tws-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tws-chip-soft {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(45, 212, 191, 0.5);
  color: #a5f3fc;
}

.tws-chip-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--tws-fg-muted);
}

.tws-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tws-accent), var(--tws-accent-alt));
}

/* Hero -------------------------------------------------------------------- */

.tws-section-hero {
  padding-top: 2.4rem;
}

.tws-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr);
  gap: 2rem;
}

@media (min-width: 960px) {
  .tws-hero-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.tws-hero-main {
  max-width: 640px;
}

.tws-hero-title {
  font-size: clamp(1.9rem, 3vw + 1.3rem, 2.6rem);
  line-height: 1.12;
  margin: 0.35rem 0 0.65rem;
}
.tws-hero-gradient {
  background: linear-gradient(135deg, #22c55e, #38bdf8);
  -webkit-background-clip: text;
  color: transparent;
}

.tws-hero-subtitle {
  margin: 0 0 1.2rem;
  font-size: 0.96rem;
  color: var(--tws-fg-muted);
}

.tws-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.3rem;
}

.tws-hero-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
}

.tws-hero-stat dt {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tws-fg-strong);
}
.tws-hero-stat dd {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--tws-fg-muted);
}

@media (min-width: 768px) {
  .tws-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Hero side card */

.tws-hero-aside {
  max-width: 380px;
  margin-inline: auto;
}

.tws-hero-card {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.96));
}

.tws-hero-card-header {
  margin-bottom: 0.8rem;
}
.tws-hero-card-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tws-fg-soft);
}
.tws-hero-card-title {
  font-size: 1.05rem;
  margin: 0.2rem 0 0;
}

.tws-hero-card-list {
  list-style: none;
  margin: 0.9rem 0 0.9rem;
  padding: 0;
}
.tws-hero-card-list li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--tws-fg-muted);
  align-items: center;
  margin-bottom: 0.45rem;
}

.tws-dot-badge {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #22c55e);
}

/* Live section ------------------------------------------------------------ */

.tws-live-layout {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.tws-live-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.tws-section-title {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.tws-section-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tws-fg-muted);
}

.tws-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.12);
  background: rgba(15, 23, 42, 0.96);
  font-size: 0.75rem;
  color: var(--tws-fg-soft);
}
.tws-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e 0, #22c55e 50%, rgba(34, 197, 94, 0) 70%);
}

.tws-live-slot {
  border-radius: var(--tws-radius-lg);
  background: radial-gradient(circle at top left, rgba(22, 163, 74, 0.24), #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.5rem;
  box-shadow: var(--tws-shadow-soft);
}

.tws-live-offline {
  background: rgba(15, 23, 42, 0.96);
}

.tws-live-offline-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.tws-live-offline-text {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  color: var(--tws-fg-muted);
}

.tws-bullet-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.9rem;
}
.tws-bullet-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.84rem;
  color: var(--tws-fg-muted);
  margin-bottom: 0.35rem;
}
.tws-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--tws-accent);
}

.tws-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.yt-frame iframe {
  border-radius: calc(var(--tws-radius-lg) - 0.4rem);
}

/* News / Blog grids ------------------------------------------------------- */

.tws-section-news .tws-grid-news,
.tws-section-blog .tws-grid-blog-min,
.tws-grid-blog {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

@media (min-width: 768px) {
  .tws-section-news .tws-grid-news {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tws-grid-blog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tws-section-blog .tws-grid-blog-min {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* News card */

.tws-news-card {
  padding: 1rem 1rem;
}

.tws-news-card-title {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.tws-news-card-summary {
  font-size: 0.85rem;
  color: var(--tws-fg-muted);
  margin: 0;
}

.tws-news-card-footer {
  margin-top: 0.7rem;
}

.tws-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--tws-accent-alt);
}
.tws-link-arrow-icon {
  font-size: 0.95em;
}

/* Blog list */

.tws-blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.tws-blog-card-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--tws-radius-lg) var(--tws-radius-lg) 0 0;
}

.tws-blog-card-body {
  padding: 1rem 1rem 1rem;
}

.tws-blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tws-blog-card-date {
  font-size: 0.78rem;
  color: var(--tws-fg-soft);
}

.tws-blog-card-title {
  font-size: 0.98rem;
  margin: 0 0 0.35rem;
}
.tws-blog-card-title a {
  color: var(--tws-fg-strong);
  text-decoration: none;
}
.tws-blog-card-title a:hover {
  text-decoration: underline;
}

.tws-blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--tws-fg-muted);
  margin: 0 0 0.6rem;
}

.tws-blog-card-footer {
  margin-top: 0.4rem;
}

/* Blog detail */

.tws-section-blog-detail .tws-blog-article {
  max-width: 720px;
  margin: 0 auto;
}

.tws-blog-article-header {
  margin-bottom: 1.2rem;
}

.tws-blog-article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-blog-article-title {
  font-size: 1.6rem;
  margin: 0.5rem 0 0.4rem;
}

.tws-blog-article-excerpt {
  font-size: 0.95rem;
  color: var(--tws-fg-muted);
}

.tws-blog-article-hero {
  margin: 1rem -0.4rem;
  border-radius: var(--tws-radius-md);
  overflow: hidden;
}
.tws-blog-article-hero img {
  width: 100%;
  height: auto;
  display: block;
}

.tws-blog-article-body {
  font-size: 0.96rem;
  line-height: 1.7;
  color: #e5e7eb;
}
.tws-blog-article-body p {
  margin-bottom: 0.9rem;
}

.tws-blog-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.tws-blog-article-share {
  margin-top: 1.1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.tws-share-label {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}
.tws-share-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--tws-fg-muted);
}
.tws-share-link i {
  font-size: 0.9rem;
}

/* Breadcrumbs ------------------------------------------------------------- */

.tws-breadcrumbs {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
  margin-bottom: 1rem;
}
.tws-breadcrumb-link {
  color: var(--tws-fg-muted);
}
.tws-breadcrumb-link:hover {
  color: var(--tws-fg-strong);
}
.tws-breadcrumb-current {
  color: var(--tws-fg-strong);
}
.tws-breadcrumb-separator {
  margin: 0 0.25rem;
}

/* Products ---------------------------------------------------------------- */

.tws-section-products .tws-products-layout {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.tws-page-header {
  margin-bottom: 0.4rem;
}
.tws-page-title {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.tws-page-subtitle {
  font-size: 0.92rem;
  color: var(--tws-fg-muted);
  margin: 0;
}

.tws-grid-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

@media (min-width: 768px) {
  .tws-grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tws-product-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.tws-product-media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--tws-radius-lg) var(--tws-radius-lg) 0 0;
}

.tws-product-content {
  padding: 1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tws-product-name {
  font-size: 1rem;
  margin: 0 0 0.1rem;
}
.tws-product-name a {
  color: var(--tws-fg-strong);
  text-decoration: none;
}
.tws-product-name a:hover {
  text-decoration: underline;
}

.tws-product-description {
  font-size: 0.86rem;
  color: var(--tws-fg-muted);
}

.tws-product-price {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.tws-product-disclaimer {
  font-size: 0.76rem;
  color: var(--tws-fg-soft);
}

.tws-product-actions {
  margin-top: 0.55rem;
}

/* Product detail ---------------------------------------------------------- */

.tws-product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.7rem;
}

@media (min-width: 960px) {
  .tws-product-detail-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.tws-product-gallery {
  border-radius: var(--tws-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.98);
  padding: 0.7rem;
  box-shadow: var(--tws-shadow-soft);
}

.tws-product-media-main {
  border-radius: calc(var(--tws-radius-lg) - 0.45rem);
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), #020617);
  min-height: 260px;
}

.tws-product-media-main img,
.tws-product-media-main iframe,
.tws-product-media-main video {
  width: 100%;
  height: 100%;
  display: block;
}

.tws-product-media-thumbs {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.tws-product-media-thumbs img {
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: pointer;
  flex: 0 0 96px;
  height: 64px;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.tws-product-media-thumbs img.active {
  border-color: rgba(22, 163, 74, 0.8);
  opacity: 1;
  transform: translateY(-1px);
}

.tws-product-summary {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tws-product-title {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.tws-product-subtitle {
  font-size: 0.9rem;
  color: var(--tws-fg-muted);
}

.tws-product-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tws-product-price {
  font-size: 1.3rem;
  font-weight: 600;
}
.tws-product-price-note {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-product-note {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-product-note-small {
  margin-top: 0.25rem;
}

.tws-product-video-cta {
  margin-top: 0.2rem;
}

.tws-product-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
  margin: 0.5rem 0 0;
}
.tws-product-meta-item dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--tws-fg-soft);
}
.tws-product-meta-item dd {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
}

/* Product body */

.tws-section-product-body {
  margin-top: 1.7rem;
}
.tws-product-body {
  max-width: 720px;
}
.tws-product-description {
  font-size: 0.94rem;
  color: var(--tws-fg);
}
.tws-product-description p {
  margin-bottom: 0.75rem;
}

/* Forms ------------------------------------------------------------------- */

.tws-form,
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tws-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
@media (min-width: 640px) {
  .tws-form-row {
    flex-direction: row;
  }
}

.tws-form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--tws-fg-soft);
}

.tws-input,
.tws-textarea,
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--tws-fg);
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.tws-input:focus,
.tws-textarea:focus,
.auth-form input:focus {
  border-color: rgba(34, 197, 94, 0.85);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.55);
  background: rgba(15, 23, 42, 1);
}

.tws-textarea {
  resize: vertical;
  min-height: 140px;
}

.tws-form-footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tws-form-hint {
  font-size: 0.78rem;
  color: var(--tws-fg-soft);
}

/* Status / Checkout pages ------------------------------------------------- */

.tws-section-status .tws-status-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr);
  gap: 1.5rem;
}
.tws-status-layout-single {
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 960px) {
  .tws-section-status .tws-status-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1.1fr);
    align-items: flex-start;
  }
}

.tws-status-card {
  padding: 1.5rem 1.6rem;
}

.tws-status-card-success {
  border-color: rgba(34, 197, 94, 0.6);
}
.tws-status-card-cancelled {
  border-color: rgba(248, 113, 113, 0.65);
}
.tws-status-card-neutral {
  border-color: rgba(148, 163, 184, 0.7);
}

.tws-status-icon {
  position: relative;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.7rem;
}
.tws-status-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle, rgba(148, 163, 184, 0.2), transparent 70%);
}
.tws-status-icon-inner {
  position: absolute;
  inset: 0.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  color: var(--tws-fg-strong);
}

.tws-status-header {
  margin-bottom: 0.6rem;
}
.tws-status-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tws-fg-soft);
}
.tws-status-title {
  font-size: 1.25rem;
  margin: 0.2rem 0 0.35rem;
}
.tws-status-lead {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tws-fg-muted);
}

.tws-status-body {
  margin-top: 0.7rem;
}

.tws-status-next-steps {
  font-size: 0.86rem;
  color: var(--tws-fg-muted);
  padding-left: 1.1rem;
  margin: 0.5rem 0 1rem;
}
.tws-status-next-steps li {
  margin-bottom: 0.3rem;
}

.tws-status-actions,
.tws-status-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tws-status-footer {
  margin-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 0.7rem;
}
.tws-status-support {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

/* Spinner (Google finalize) */

.tws-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.4);
  border-top-color: #22c55e;
  animation: tws-spin 900ms linear infinite;
}
@keyframes tws-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Account ----------------------------------------------------------------- */

.tws-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr);
  gap: 1.5rem;
}

.tws-account-layout-single {
  max-width: 840px;
  margin: 0 auto;
}

@media (min-width: 960px) {
  .tws-account-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.15fr);
    align-items: flex-start;
  }
}

.tws-account-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.tws-account-metric dt {
  font-size: 0.78rem;
  color: var(--tws-fg-soft);
}
.tws-account-metric dd {
  margin: 0.2rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

/* Orders table-like list */

.tws-table {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tws-table-row {
  display: flex;
  align-items: stretch;
  padding: 0.8rem 0.1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
}
.tws-table-row:first-child {
  border-top: none;
}
.tws-table-main {
  flex: 1;
  padding-right: 0.6rem;
}
.tws-table-aside {
  flex-shrink: 0;
}

.tws-order-id {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
}
.tws-order-date {
  margin: 0;
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-order-products {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--tws-fg-muted);
}
.tws-order-product {
  display: flex;
  justify-content: space-between;
}

.tws-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tws-pill-success {
  background: var(--tws-success-soft);
  color: #bbf7d0;
}
.tws-pill-warning {
  background: var(--tws-warning-soft);
  color: #facc15;
}

/* Downloads lists */

.tws-list-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tws-download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0.1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
}
.tws-download-row:first-child {
  border-top: none;
}

.tws-download-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
}
.tws-download-thumb img {
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
}
.tws-download-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tws-download-name {
  font-size: 0.9rem;
}
.tws-download-meta {
  font-size: 0.78rem;
  color: var(--tws-fg-soft);
}

.tws-download-unavailable {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

/* Empty states ------------------------------------------------------------ */

.tws-empty-state {
  text-align: left;
}
.tws-empty-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.tws-empty-text {
  font-size: 0.86rem;
  color: var(--tws-fg-muted);
  margin: 0 0 0.7rem;
}
.tws-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tws-empty-inline {
  border-radius: var(--tws-radius-md);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  padding: 0.9rem 0.9rem;
}

/* Legal / Prose ----------------------------------------------------------- */

.tws-legal-body {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--tws-fg);
}

.tws-legal-body h2,
.tws-legal-body h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.tws-legal-body p {
  margin-bottom: 0.75rem;
}

.tws-legal-body ul,
.tws-legal-body ol {
  margin: 0.6rem 0 0.8rem 1.1rem;
}

/* Contact ----------------------------------------------------------------- */

.tws-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr);
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .tws-contact-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  }
}

.tws-contact-info {
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.12), rgba(15, 23, 42, 0.97));
}

.tws-contact-meta {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.tws-contact-meta-item {
  font-size: 0.82rem;
  color: var(--tws-fg-muted);
}
.tws-contact-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tws-fg-soft);
}
.tws-contact-value {
  display: block;
  margin-top: 0.1rem;
}

.tws-contact-list {
  list-style: none;
  margin: 0.9rem 0 0.6rem;
  padding: 0;
}
.tws-contact-list li {
  margin-bottom: 0.6rem;
}
.tws-contact-list-label {
  display: block;
  font-size: 0.85rem;
}
.tws-contact-list-text {
  display: block;
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-contact-social {
  margin-top: 0.9rem;
}
.tws-contact-social-label {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}

.tws-contact-form-column {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tws-flash-messages {
  margin-bottom: 0.4rem;
}
.tws-alert {
  border-radius: 0.8rem;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.8);
}
.tws-alert-success {
  background: var(--tws-success-soft);
  border-color: rgba(34, 197, 94, 0.8);
}
.tws-alert-error {
  background: var(--tws-danger-soft);
  border-color: rgba(248, 113, 113, 0.9);
}
.tws-alert-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tws-alert-text {
  margin-right: 0.6rem;
}
.tws-alert-close {
  border: none;
  background: transparent;
  color: var(--tws-fg-soft);
  cursor: pointer;
  font-size: 1rem;
}

/* Link (compact) */

.tws-link-compact {
  font-size: 0.78rem;
}

/* Cart Drawer ------------------------------------------------------------- */

.cart-container {
  position: relative;
}

.tws-cart-toggle {
  position: relative;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  background: radial-gradient(circle at top, rgba(148, 163, 184, 0.16), rgba(15, 23, 42, 0.98));
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tws-cart-toggle i {
  font-size: 0.95rem;
  color: var(--tws-fg-strong);
}

.tws-cart-count {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: #020617;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tws-cart-drawer {
  position: fixed;
  right: 1.2rem;
  bottom: 1.3rem;
  width: min(360px, 100% - 2.4rem);
  border-radius: var(--tws-radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

.cart-container.open .tws-cart-drawer {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tws-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
}
.tws-cart-header h3 {
  margin: 0;
  font-size: 0.98rem;
}
.tws-cart-close {
  border: none;
  background: transparent;
  color: var(--tws-fg-soft);
  cursor: pointer;
  font-size: 1.2rem;
}

.tws-cart-body {
  padding: 0.5rem 1rem 0.5rem;
  overflow-y: auto;
}

.tws-cart-summary {
  font-size: 0.86rem;
  color: var(--tws-fg-muted);
  margin-bottom: 0.6rem;
}

.tws-cart-items {
  font-size: 0.86rem;
}
.tws-cart-empty {
  font-size: 0.84rem;
  color: var(--tws-fg-soft);
}

.tws-cart-footer {
  padding: 0.7rem 1rem 0.8rem;
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  display: flex;
  gap: 0.5rem;
}

/* Assistant Floating Button & Panel --------------------------------------- */

.tws-assistant {
  position: fixed;
  bottom: 1.35rem;
  right: 1.35rem;
  z-index: 45;
}

.tws-assistant .tws-button {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.9);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 40px rgba(8, 47, 73, 0.8);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tws-assistant-image {
  width: 85%;
  height: 85%;
  border-radius: 999px;
  object-fit: cover;
}

/* Assistant area */

.assistant-area {
  position: fixed;
  inset: auto 1rem 4.8rem 1rem;
  max-width: 420px;
  margin-left: auto;
  z-index: 44;
}
.assistant-area.hidden {
  display: none;
}

.assistant-shell {
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.99));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
  display: flex;
  flex-direction: column;
  max-height: 65vh;
}

.assistant-header {
  padding: 0.7rem 0.9rem 0.5rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.assistant-title {
  font-size: 0.95rem;
  font-weight: 500;
}
.assistant-subtitle {
  display: block;
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}
.assistant-close {
  border: none;
  background: transparent;
  color: var(--tws-fg-soft);
  font-size: 1.2rem;
  cursor: pointer;
}

.assistant-messages {
  padding: 0.7rem 0.9rem;
  flex: 1;
  overflow-y: auto;
  font-size: 0.86rem;
}
.message {
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.7rem;
}
.bot-message {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.user-message {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.8);
}

.assistant-input-row {
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  padding: 0.5rem 0.6rem;
  display: flex;
  gap: 0.4rem;
}
.assistant-input-row input {
  flex: 1;
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--tws-fg);
  padding: 0.35rem 0.6rem;
  font-size: 0.86rem;
}
.assistant-input-row button {
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.8);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  font-size: 0.82rem;
  color: #020617;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

/* Auth Modals ------------------------------------------------------------- */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal.open {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
}
.modal-content {
  position: relative;
  max-width: 420px;
  margin: 6vh auto;
  padding: 1.4rem 1.5rem 1.4rem;
  border-radius: 1.1rem;
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.97));
  box-shadow: var(--tws-shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.65);
}
.modal-content h2 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.close-modal {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--tws-fg-soft);
}

.auth-button {
  width: 100%;
  justify-content: center;
}

.auth-or {
  margin: 0.7rem 0 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
}
.auth-or span {
  background: transparent;
}

.auth-text {
  font-size: 0.8rem;
  color: var(--tws-fg-soft);
  margin-top: 0.7rem;
}
.auth-text a {
  color: var(--tws-accent-alt);
}

/* Google button placeholder */

.g-btn {
  margin-top: 0.4rem;
}

/* Utility ----------------------------------------------------------------- */

.hidden {
  display: none !important;
}

.prose ul {
  list-style: disc;
}

/* End of styles.css */
