:root {
  --tx-bg: #eef3fb;
  --tx-surface: #ffffff;
  --tx-surface-2: #ddeaf8;
  --tx-text: #0d1117;
  --tx-muted: #5b6775;
  --tx-primary: #1a6ef5;
  --tx-primary-dark: #1458d0;
  --tx-primary-hover: #1050c0;
  --tx-border: #d0daea;
  --tx-shadow: 0 20px 45px rgba(13, 17, 23, 0.08);
  --tx-shell: 1160px;
}

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

body.tx-body {
  margin: 0;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--tx-text);
  background: linear-gradient(135deg, #dce9fb 0%, var(--tx-bg) 50%);
}

/* ── Announcement bar ─────────────────────────────────────── */
.tx-announce {
  background: #e8f0fe;
  border-bottom: 1px solid #c5d5f5;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--tx-text);
}

.tx-announce__timer {
  font-weight: 700;
  color: var(--tx-primary-dark);
}

.tx-announce__cta {
  background: var(--tx-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.tx-announce__cta:hover {
  background: var(--tx-primary-hover);
  color: #fff;
}

a {
  color: inherit;
}

.tx-shell {
  width: min(var(--tx-shell), calc(100% - 2.4rem));
  margin: 0 auto;
}

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

.tx-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 245, 247, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tx-border);
}

.tx-shell--header {
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: 1rem;
}

.tx-brand-wrap {
  grid-area: brand;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tx-nav-shell {
  grid-area: nav;
}

.tx-nav-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Force all blocks inside the header region to sit in a row */
.tx-main-nav .region-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Hide the user account menu from the main nav area */
.tx-main-nav .block-menu--account,
.tx-main-nav nav[id*="useraccount"],
.tx-main-nav nav[id*="user-account"],
#block-tixu-ai-theme-useracountmenu {
  display: none;
}

.tx-brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tx-brand--logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.tx-nav-shell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tx-main-nav ul,
.tx-role-nav ul,
.tx-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

.tx-nav-item {
  position: relative;
}

.tx-nav-link,
.tx-main-nav a,
.tx-role-nav a {
  text-decoration: none;
  color: var(--tx-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  display: inline-block;
  white-space: nowrap;
}

.tx-nav-link:hover,
.tx-nav-link.is-active,
.tx-main-nav a:hover,
.tx-main-nav a.is-active,
.tx-role-nav a:hover {
  color: var(--tx-text);
  background: var(--tx-surface);
}

/* No dropdowns — top-level links only */

.tx-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tx-nav-login {
  text-decoration: none;
  color: var(--tx-text);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--tx-border);
  background: var(--tx-surface);
}

.tx-nav-login:hover {
  background: var(--tx-surface-2);
}

.tx-nav-toggle {
  display: none;
  border: 1px solid var(--tx-border);
  border-radius: 999px;
  background: var(--tx-surface);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.tx-hero {
  padding: 2.4rem 0 2rem;
}

.tx-hero-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}

.tx-hero-copy {
  background: linear-gradient(140deg, #ffffff 0%, #e8f0fe 100%);
  border: 1px solid var(--tx-border);
  border-radius: 24px;
  padding: 2.2rem 2rem;
  box-shadow: var(--tx-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tx-hero-panel {
  background: linear-gradient(140deg, #f0f5ff 0%, #dde8fb 100%);
  border: 1px solid var(--tx-border);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: var(--tx-shadow);
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

/* Badge / eyebrow pill */
.tx-badge {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--tx-border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tx-text);
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(26, 110, 245, 0.1);
}

.tx-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  color: var(--tx-primary-dark);
}

.tx-hero h1 {
  margin: 0 0 0.9rem;
  line-height: 1.12;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  font-weight: 800;
}

.tx-hero-lead {
  color: var(--tx-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* Primary CTA button */
.tx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tx-primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease;
}

.tx-btn:hover {
  background: var(--tx-primary-hover);
  color: #ffffff;
}

.tx-btn--outline {
  background: transparent;
  border: 1px solid var(--tx-border);
  color: var(--tx-text);
}

.tx-btn--outline:hover {
  background: var(--tx-surface);
  color: var(--tx-text);
}

/* Social proof floating cards */
.tx-proof-cards {
  position: absolute;
  bottom: 1.4rem;
  left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tx-proof-card {
  background: #ffffff;
  border: 1px solid var(--tx-border);
  border-radius: 14px;
  padding: 0.65rem 1rem;
  box-shadow: 0 4px 16px rgba(13, 17, 23, 0.1);
  min-width: 160px;
}

.tx-proof-card__num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--tx-text);
  margin: 0;
  line-height: 1.1;
}

.tx-proof-card__label {
  font-size: 0.78rem;
  color: var(--tx-muted);
  margin: 0.15rem 0 0;
}

.tx-proof-card__star {
  color: #f5a623;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

/* Tools strip */
.tx-tools {
  padding: 1.4rem 0 0.4rem;
}

.tx-tools-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.tx-tools-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tx-text);
  white-space: nowrap;
}

.tx-tools-list {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tx-tools-list li {
  font-size: 0.85rem;
  color: var(--tx-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tx-main {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 2.2rem;
}

.tx-main-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.tx-content,
.tx-discover,
.tx-feed,
.tx-discover-row {
  background: var(--tx-surface);
  border: 1px solid var(--tx-border);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  box-shadow: var(--tx-shadow);
}

/* Full-width content on inner pages (no sidebar) */
.tx-content--full {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0;
}

.tx-content__inner {
  padding: 3rem 4rem;
}

@media (max-width: 600px) {
  .tx-content__inner {
    padding: 1.5rem;
  }
}

/* ── Inner page typography ─────────────────────────────────── */
.tx-content h1,
.tx-content h2,
.tx-content h3,
.tx-content h4 {
  color: var(--tx-text);
  line-height: 1.25;
  margin: 1.75rem 0 0.75rem;
}

.tx-content h1:first-child,
.tx-content h2:first-child,
.tx-content h3:first-child {
  margin-top: 0;
}

.tx-content h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
.tx-content h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 700; }
.tx-content h3 { font-size: 1.15rem; font-weight: 700; }

.tx-content p {
  color: var(--tx-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.tx-content a {
  color: var(--tx-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tx-content a:hover {
  color: var(--tx-primary-dark);
}

.tx-content ul,
.tx-content ol {
  color: var(--tx-muted);
  padding-left: 1.4rem;
  margin: 0 0 1rem;
  line-height: 1.7;
}

.tx-content li {
  margin-bottom: 0.35rem;
}

.tx-content strong {
  color: var(--tx-text);
  font-weight: 700;
}

.tx-content hr {
  border: none;
  border-top: 1px solid var(--tx-border);
  margin: 2rem 0;
}

/* ── Inner page: service card grid ────────────────────────── */
/* Supports a 3-col grid when the editor uses a .services-grid
   or Drupal renders a layout with 3 equal columns */
.tx-content .services-grid,
.tx-content .field--name-field-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* Generic 3-col row pattern inside content */
.tx-content .col-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* Style any card-like divs inside the content area */
.tx-content .service-card,
.tx-content .card {
  background: var(--tx-bg);
  border: 1px solid var(--tx-border);
  border-radius: 14px;
  padding: 1.25rem;
}

.tx-content .service-card h3,
.tx-content .card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--tx-text);
}

.tx-content .service-card p,
.tx-content .card p {
  font-size: 0.9rem;
  margin: 0;
}

/* ── Inner page: CTA block ─────────────────────────────────── */
.tx-content .cta-block {
  background: linear-gradient(135deg, #e8f0fe 0%, #ddeaf8 100%);
  border: 1px solid var(--tx-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0 0;
}

.tx-content .cta-block h2 {
  margin-top: 0;
}

/* Links styled as buttons inside content */
.tx-content .btn,
.tx-content a.button {
  display: inline-flex;
  align-items: center;
  background: var(--tx-primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease;
}

.tx-content .btn:hover,
.tx-content a.button:hover {
  background: var(--tx-primary-hover);
  color: #fff;
}

/* Secondary menu that renders inside the content region */
.tx-content nav.secondary-menu,
.tx-content .menu--secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--tx-border);
  padding-bottom: 1rem;
}

.tx-content nav.secondary-menu a,
.tx-content .menu--secondary a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tx-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.tx-content nav.secondary-menu a:hover,
.tx-content nav.secondary-menu a.is-active,
.tx-content .menu--secondary a:hover,
.tx-content .menu--secondary a.is-active {
  color: var(--tx-primary);
  border-color: var(--tx-primary);
  background: #e8f0fe;
}

/* Drupal node wrapper resets */
.tx-content .node__content {
  margin: 0;
}

.tx-content .field--name-body {
  margin: 0;
}

@media (max-width: 700px) {
  .tx-content .services-grid,
  .tx-content .col-3,
  .tx-content .field--name-field-services {
    grid-template-columns: 1fr;
  }

  .tx-content--full {
    padding: 1.5rem;
  }

  .tx-section-head {
    padding: 1.25rem 1.5rem 0.75rem;
  }

  .spc-grid {
    padding: 0.5rem 1.5rem 0;
  }
}

.tx-section-head {
  padding: 2rem 4rem 1rem;
  margin-bottom: 0;
}

.tx-section-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

/* ── BBC News style ────────────────────────────────────────── */
:root {
  --bbc-red: #bb1919;
  --bbc-red-hover: #901212;
  --bbc-text: #0d1117;
  --bbc-muted: #5b6776;
  --bbc-border: #e0e0e0;
  --bbc-bg: #ffffff;
  --bbc-surface: #f6f6f6;
}

.tx-feed {
  padding: 0;
}

.tx-feed__body {
  padding: 0 4rem 2.5rem;
}

/* Section header — red rule like BBC */
.bbc-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 3px solid var(--bbc-red);
  background: #fff;
}

.bbc-section-head__label {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--bbc-text);
  margin: 0;
}

.bbc-section-head__tag {
  display: inline-block;
  background: var(--bbc-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

/* Category label */
.bbc-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bbc-red);
  margin: 0 0 0.4rem;
}

/* Featured lead story */
.bbc-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--bbc-border);
}

.bbc-featured__media {
  overflow: hidden;
  max-height: 320px;
}

.bbc-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bbc-featured__body {
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.bbc-featured__title {
  margin: 0.3rem 0 0.7rem;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bbc-text);
}

.bbc-featured__title a {
  text-decoration: none;
  color: inherit;
}

.bbc-featured__title a:hover {
  text-decoration: underline;
  color: var(--bbc-red);
}

.bbc-featured__summary {
  color: var(--bbc-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.8rem;
}

.bbc-featured__meta {
  font-size: 0.78rem;
  color: var(--bbc-muted);
  margin: 0;
}

/* Story grid */
.bbc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.bbc-card {
  padding: 1.1rem 1.3rem;
  border-right: 1px solid var(--bbc-border);
  border-bottom: 1px solid var(--bbc-border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bbc-card:nth-child(3n) {
  border-right: none;
}

.bbc-card__media {
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 0.3rem;
}

.bbc-card__media img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.bbc-card:hover .bbc-card__media img {
  transform: scale(1.03);
}

.bbc-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bbc-text);
}

.bbc-card__title a {
  text-decoration: none;
  color: inherit;
}

.bbc-card__title a:hover {
  color: var(--bbc-red);
  text-decoration: underline;
}

.bbc-card__meta {
  font-size: 0.76rem;
  color: var(--bbc-muted);
  margin: 0;
}

.bbc-card__summary {
  font-size: 0.88rem;
  color: var(--bbc-muted);
  line-height: 1.5;
  margin: 0;
}

/* Individual blog post page */
.tx-post-header h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
}

.tx-post-date {
  margin: 0;
  color: var(--tx-muted);
}

.tx-post-image img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.tx-post-content {
  margin-top: 1.2rem;
  line-height: 1.7;
}

/* Old card styles — kept for other views */
.tx-post-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tx-post-card {
  background: var(--tx-surface);
  border: 1px solid var(--tx-border);
  border-radius: 18px;
  overflow: hidden;
}

.tx-post-card-media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.tx-post-card-body {
  padding: 1rem;
}

.tx-post-meta {
  margin: 0;
  color: var(--tx-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tx-post-title {
  margin: 0.5rem 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.tx-post-summary {
  color: var(--tx-muted);
  font-size: 0.95rem;
}

.tx-footer {
  background: #0d1520;
  color: #c8d8e4;
  padding-top: 3rem;
  margin-top: 2rem;
}

/* Four-column inner grid */
.tx-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Brand column */
.tx-footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  display: block;
}

.tx-footer-tagline {
  font-size: 0.9rem;
  color: #8aa4b8;
  line-height: 1.6;
  margin: 0;
  max-width: 200px;
}

/* Column headings */
.tx-footer-heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin: 0 0 1rem;
}

/* Address */
.tx-footer-address {
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.8;
  color: #8aa4b8;
  margin: 0 0 1rem;
}

.tx-footer-address p {
  margin: 0;
}

/* Contact list */
.tx-footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tx-footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.tx-footer-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tx-footer-contact-list a {
  color: #cde3e5;
  text-decoration: none;
}

.tx-footer-contact-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Quick links and services */
.tx-footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tx-footer-nav li {
  font-size: 0.88rem;
  color: #8aa4b8;
}

.tx-footer-nav a {
  color: #8aa4b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tx-footer-nav a:hover {
  color: #ffffff;
}

/* Bottom bar */
.tx-footer-bottom {
  padding: 1.1rem 0 1.4rem;
  color: #5a7a8e;
  font-size: 0.82rem;
}

.tx-footer-bottom p {
  margin: 0;
}

/* Responsive */
@media (max-width: 820px) {
  .tx-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 500px) {
  .tx-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .tx-shell--header {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions";
  }

  .tx-nav-toggle {
    display: block;
  }

  .tx-nav-shell {
    grid-area: unset;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1.2rem;
    right: 1.2rem;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: 16px;
    box-shadow: var(--tx-shadow);
    padding: 0.9rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    z-index: 30;
  }

  .tx-nav-shell.is-open {
    display: flex;
  }

  .tx-main-nav ul,
  .tx-role-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .tx-hero-grid,
  .tx-main-grid {
    grid-template-columns: 1fr;
  }

  .bbc-featured {
    grid-template-columns: 1fr;
  }

  .bbc-featured__media {
    max-height: 220px;
  }

  .bbc-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bbc-card:nth-child(3n) {
    border-right: 1px solid var(--bbc-border);
  }

  .bbc-card:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 560px) {
  .bbc-grid {
    grid-template-columns: 1fr;
  }

  .bbc-card {
    border-right: none;
  }
}

/* ── SPC card grid ─────────────────────────────────────────── */
.spc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 0.5rem 2.5rem 0;
}

.spc-card {
  background: #ffffff;
  border: 1px solid var(--tx-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(13, 17, 23, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.spc-card:hover {
  box-shadow: 0 6px 24px rgba(13, 17, 23, 0.12);
  transform: translateY(-2px);
}

.spc-card__media {
  width: 100%;
  overflow: clip;
  border-radius: 14px 14px 0 0;
}

.spc-card__media img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.spc-card:hover .spc-card__media img {
  transform: scale(1.04);
}

.spc-card__body {
  flex: 1;
  padding: 1rem 1rem 0.5rem;
}

.spc-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tx-primary);
  text-align: center;
}

.spc-card__footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem 0.9rem;
  border-top: 1px solid var(--tx-border);
}

.spc-card__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.spc-card__meta {
  font-size: 0.78rem;
  color: var(--tx-muted);
  line-height: 1.3;
}

/* SPC grid responsive */
@media (max-width: 1024px) {
  .spc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .spc-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Commerce: cart icon ───────────────────────────────────── */
.ng-cart-block {
  position: relative;
}

.ng-cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--tx-border);
  background: var(--tx-surface);
  text-decoration: none;
  position: relative;
  transition: background 0.15s ease;
}

.ng-cart-icon:hover {
  background: var(--tx-surface-2);
}

.ng-cart-icon__symbol {
  font-size: 1.1rem;
  line-height: 1;
}

.ng-cart-icon__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--tx-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
}

/* ── Commerce: product listing grid ───────────────────────── */
.ng-product-card__summary {
  font-size: 0.85rem;
  color: var(--tx-muted);
  line-height: 1.5;
  margin: 0.5rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ng-product-card__footer {
  justify-content: space-between;
  align-items: center;
}

.ng-product-card__price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--tx-text);
}

.tx-btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* ── Commerce: single product page ────────────────────────── */
.ng-product__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.ng-product__media img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--tx-shadow);
}

.ng-product__detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ng-product__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
}

.ng-product__cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tx-primary);
  background: #e8f0fe;
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
}

.ng-product__price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--tx-text);
}

.ng-product__desc {
  font-size: 0.95rem;
  color: var(--tx-muted);
  line-height: 1.65;
}

.ng-product__form .form-item {
  margin-bottom: 1rem;
}

.ng-product__form .form-submit,
.ng-product__form input[type="submit"] {
  background: var(--tx-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
  width: 100%;
}

.ng-product__form .form-submit:hover,
.ng-product__form input[type="submit"]:hover {
  background: var(--tx-primary-hover);
}

/* ── Commerce: cart page ───────────────────────────────────── */
.view-commerce-cart-form table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.view-commerce-cart-form th {
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-muted);
  padding: 0.6rem 0.8rem;
  border-bottom: 2px solid var(--tx-border);
}

.view-commerce-cart-form td {
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--tx-border);
  vertical-align: middle;
}

.view-commerce-cart-form .views-field-total-price {
  font-weight: 700;
}

.commerce-order-total-summary {
  margin-top: 1.5rem;
  text-align: right;
  font-size: 1rem;
}

.commerce-order-total-summary .order-total-line__total {
  font-size: 1.3rem;
  font-weight: 800;
}

/* ── Commerce: checkout ────────────────────────────────────── */
.commerce-checkout-flow {
  max-width: 700px;
  margin: 0 auto;
}

.commerce-checkout-flow .form-actions input[type="submit"] {
  background: var(--tx-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}

.commerce-checkout-flow .form-actions input[type="submit"]:hover {
  background: var(--tx-primary-hover);
}

.commerce-checkout-flow fieldset {
  border: 1px solid var(--tx-border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.2rem;
}

.commerce-checkout-flow legend {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-text);
  padding: 0 0.4rem;
}

/* ── Commerce: PayPal button ───────────────────────────────── */
.paypal-buttons-container,
.commerce-paypal-smart-payment-buttons {
  margin-top: 0.75rem;
}

/* Divider between Stripe and PayPal on checkout */
.commerce-checkout-flow .payment-method-options + .paypal-buttons-container::before,
.payment-method-type-paypal::before {
  content: 'or pay with';
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--tx-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1rem 0 0.75rem;
  position: relative;
}

.payment-method-type-paypal::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--tx-border);
  margin: 1.2rem 0;
}

/* ── Commerce: responsive ──────────────────────────────────── */
@media (max-width: 820px) {
  .ng-product__layout {
    grid-template-columns: 1fr;
  }
}
