/*
Theme Name:  Metasonics Audio
Theme URI:   https://metasonicsaudio.com
Description: Premium pro audio software store theme for Metasonics Audio. Built for WooCommerce with Xchange integration.
Version:     1.0.0
Author:      Metasonics Audio
License:     GPL2
Text Domain: metasonics-audio
Tags:        woocommerce, ecommerce, music, audio, software, dark
*/

/* ── DESIGN TOKENS ────────────────────────────────────────────────────────── */
:root {
  --bg:          #0a080e;
  --bg2:         #110e1a;
  --bg3:         #1a1528;
  --card:        #14111f;
  --card-hover:  #1c1830;
  --border:      rgba(255,255,255,.08);
  --border2:     rgba(255,255,255,.14);
  --accent:      #e8440a;
  --accent-glow: rgba(232,68,10,.35);
  --accent2:     #7b4fff;
  --accent2-glow:rgba(123,79,255,.3);
  --gold:        #f0b429;
  --text:        #e8e4f0;
  --text-muted:  #7a7490;
  --text-dim:    #4a4460;
  --radius:      10px;
  --radius-lg:   16px;
  --header-h:    70px;
  --font-main:   'Inter', sans-serif;
  --font-display:'Space Grotesk', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,.6);
}

/* ── RESET ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ── TYPOGRAPHY ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); line-height: 1.7; }
p + p { margin-top: .85rem; }

/* ── LAYOUT ───────────────────────────────────────────────────────────────── */
.msa-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.msa-section { padding: 5rem 0; }
.msa-section--sm { padding: 3rem 0; }

/* ── HEADER ───────────────────────────────────────────────────────────────── */
#msa-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(10,8,14,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.msa-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.msa-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  text-decoration: none;
}
.msa-logo__mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.msa-logo__text { display: flex; flex-direction: column; line-height: 1; }
.msa-logo__name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .04em;
}
.msa-logo__tag {
  font-size: .6rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Navigation */
.msa-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}
.msa-nav a {
  padding: .45rem .85rem;
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s;
  white-space: nowrap;
}
.msa-nav a:hover, .msa-nav a.active {
  color: var(--text);
  background: rgba(255,255,255,.07);
}

/* Search */
.msa-header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.msa-header-search input {
  width: 100%;
  padding: .5rem 1rem .5rem 2.4rem;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .88rem;
  outline: none;
  transition: all .2s;
}
.msa-header-search input::placeholder { color: var(--text-dim); }
.msa-header-search input:focus {
  background: rgba(255,255,255,.1);
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px var(--accent2-glow);
}
.msa-header-search__icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: .85rem;
  pointer-events: none;
}

/* Header actions */
.msa-header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
  flex-shrink: 0;
}
.msa-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.msa-cart-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--border2);
}
.msa-cart-count {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msa-account-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.msa-account-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }

/* Mobile menu toggle */
.msa-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  background: none;
  border: none;
}
.msa-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .2s;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.msa-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}
.msa-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 50%, rgba(123,79,255,.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(232,68,10,.1) 0%, transparent 60%);
}
.msa-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.msa-hero__inner {
  position: relative;
  z-index: 1;
  padding: 6rem 0 5rem;
}
.msa-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(123,79,255,.15);
  border: 1px solid rgba(123,79,255,.3);
  color: #a78bfa;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.msa-hero__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #a78bfa;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}
.msa-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}
.msa-hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.msa-hero__sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.msa-hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.msa-hero__stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.msa-hero__stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}
.msa-hero__stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.msa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  text-decoration: none;
  white-space: nowrap;
}
.msa-btn--primary {
  background: linear-gradient(135deg, var(--accent), #ff6b35);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.msa-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
}
.msa-btn--secondary {
  background: rgba(255,255,255,.07);
  color: var(--text);
  border: 1px solid var(--border2);
}
.msa-btn--secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
}
.msa-btn--purple {
  background: linear-gradient(135deg, var(--accent2), #a855f7);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent2-glow);
}
.msa-btn--purple:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent2-glow);
}
.msa-btn--lg { padding: .9rem 2rem; font-size: 1rem; border-radius: 12px; }
.msa-btn--sm { padding: .45rem 1rem; font-size: .82rem; }

/* ── FEATURED BRANDS ──────────────────────────────────────────────────────── */
.msa-brands {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.msa-brands__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.msa-brands__logos {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.msa-brands__logo {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .2s;
}
.msa-brands__logo:hover { color: var(--text-muted); }

/* ── SECTION HEADER ───────────────────────────────────────────────────────── */
.msa-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.msa-section-header h2 { margin-bottom: .4rem; }
.msa-section-header p  { font-size: .9rem; }
.msa-eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .4rem;
}

/* ── PRODUCT GRID ─────────────────────────────────────────────────────────── */
.msa-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.msa-product-grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ── PRODUCT CARD ─────────────────────────────────────────────────────────── */
.msa-product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
}
.msa-product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(123,79,255,.1);
}
.msa-product-card__badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 5px;
}
.msa-product-card__badge--new       { background: var(--accent2); color: #fff; }
.msa-product-card__badge--sale      { background: var(--accent); color: #fff; }
.msa-product-card__badge--sub       { background: rgba(240,180,41,.2); color: var(--gold); border: 1px solid rgba(240,180,41,.3); }
.msa-product-card__badge--hardware  { background: rgba(255,255,255,.1); color: var(--text-muted); }

.msa-product-card__img-wrap {
  position: relative;
  height: 190px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  overflow: hidden;
}
.msa-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.msa-product-card:hover .msa-product-card__img { transform: scale(1.05); }
.msa-product-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  opacity: .25;
}
.msa-product-card__logo {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  max-height: 24px;
  max-width: 80px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .5;
}

.msa-product-card__body {
  padding: 1rem 1.1rem .8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.msa-product-card__brand {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent2);
}
.msa-product-card__title {
  font-family: var(--font-display);
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msa-product-card__tagline {
  font-size: .78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  line-height: 1.5;
}

.msa-product-card__footer {
  padding: .8rem 1.1rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.msa-product-card__price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.msa-product-card__price del {
  font-size: .78rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-right: .3rem;
}
.msa-product-card__price ins {
  text-decoration: none;
  color: var(--accent);
}
.msa-product-card__add {
  width: 36px;
  height: 36px;
  background: rgba(232,68,10,.15);
  border: 1px solid rgba(232,68,10,.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.msa-product-card__add:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── CATEGORY TILES ───────────────────────────────────────────────────────── */
.msa-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.msa-cat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.msa-cat-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  opacity: 0;
  transition: opacity .2s;
}
.msa-cat-tile:hover { border-color: var(--accent2); transform: translateY(-2px); }
.msa-cat-tile:hover::before { opacity: .08; }
.msa-cat-tile__icon { font-size: 1.8rem; position: relative; }
.msa-cat-tile__name {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
}
.msa-cat-tile__count {
  font-size: .75rem;
  color: var(--text-muted);
  position: relative;
}

/* ── PROMO BANNER ─────────────────────────────────────────────────────────── */
.msa-promo-banner {
  background: linear-gradient(135deg, rgba(123,79,255,.15), rgba(232,68,10,.1));
  border: 1px solid rgba(123,79,255,.2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.msa-promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(123,79,255,.15), transparent 70%);
  pointer-events: none;
}
.msa-promo-banner__tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: .4rem;
}
.msa-promo-banner h3 {
  font-size: 1.6rem;
  margin-bottom: .5rem;
}
.msa-promo-banner p {
  font-size: .9rem;
  color: var(--text-muted);
}

/* ── SINGLE PRODUCT ───────────────────────────────────────────────────────── */
.msa-product-single {
  padding: 3rem 0 5rem;
}
.msa-product-single__layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}
.msa-product-gallery__main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg3);
  aspect-ratio: 16/9;
}
.msa-product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.msa-product-gallery__thumbs {
  display: flex;
  gap: .6rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.msa-product-gallery__thumb {
  width: 72px;
  height: 52px;
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
  flex-shrink: 0;
}
.msa-product-gallery__thumb.active,
.msa-product-gallery__thumb:hover { border-color: var(--accent2); }
.msa-product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Buy Box */
.msa-buybox {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.msa-buybox__brand { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); margin-bottom: .35rem; }
.msa-buybox__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin-bottom: 1rem; }
.msa-buybox__price-wrap { margin-bottom: 1.25rem; }
.msa-buybox__price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.msa-buybox__price del { font-size: 1rem; color: var(--text-dim); font-weight: 400; margin-right: .4rem; }
.msa-buybox__msrp { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.msa-buybox__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.msa-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 5px;
  letter-spacing: .04em;
}
.msa-badge--platform { background: rgba(123,79,255,.15); color: #a78bfa; border: 1px solid rgba(123,79,255,.2); }
.msa-badge--billing  { background: rgba(240,180,41,.1); color: var(--gold); border: 1px solid rgba(240,180,41,.2); }
.msa-badge--virtual  { background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.msa-badge--sku      { background: rgba(255,255,255,.05); color: var(--text-muted); font-family: var(--font-mono); font-size: .68rem; }

.msa-buybox__add-btn {
  width: 100%;
  padding: .9rem;
  font-size: 1rem;
  border-radius: 10px;
  margin-bottom: .75rem;
}
.msa-buybox__note {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .75rem;
}
.msa-buybox__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.msa-buybox__features { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.msa-buybox__features li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .83rem;
  color: var(--text-muted);
}
.msa-buybox__features li::before {
  content: '✓';
  width: 18px;
  height: 18px;
  background: rgba(34,197,94,.15);
  color: #4ade80;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Product tabs */
.msa-product-tabs { margin-top: 2.5rem; }
.msa-tabs__nav {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.msa-tabs__btn {
  padding: .65rem 1.25rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all .15s;
}
.msa-tabs__btn.active, .msa-tabs__btn:hover {
  color: var(--text);
  border-bottom-color: var(--accent2);
}
.msa-tabs__panel { display: none; }
.msa-tabs__panel.active { display: block; }

/* Features list */
.msa-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem 1.5rem;
}
.msa-feature-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  color: var(--text-muted);
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
}
.msa-feature-item::before {
  content: '→';
  color: var(--accent2);
  font-size: .75rem;
  flex-shrink: 0;
  margin-top: .15rem;
}

/* Requirements table */
.msa-req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.msa-req-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.msa-req-box__os {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.msa-req-row { display: flex; justify-content: space-between; font-size: .82rem; padding: .3rem 0; }
.msa-req-row span:first-child { color: var(--text-muted); }
.msa-req-row span:last-child  { color: var(--text); font-weight: 500; text-align: right; max-width: 60%; }

/* ── CART ─────────────────────────────────────────────────────────────────── */
.msa-cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}
.msa-cart-table { width: 100%; }
.msa-cart-table thead th {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.msa-cart-table tbody tr { border-bottom: 1px solid var(--border); }
.msa-cart-table tbody td { padding: 1.1rem 0; vertical-align: middle; }
.msa-cart-item__img {
  width: 64px;
  height: 48px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--bg3);
}
.msa-cart-item__name { font-weight: 600; font-size: .92rem; margin-bottom: .2rem; }
.msa-cart-item__sku  { font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); }
.msa-cart-item__remove { color: var(--text-dim); font-size: .8rem; cursor: pointer; margin-left: .75rem; transition: color .15s; }
.msa-cart-item__remove:hover { color: var(--accent); }
.msa-cart-item__price { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }

.msa-cart-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.msa-cart-summary h3 { font-size: 1rem; margin-bottom: 1.25rem; }
.msa-cart-summary-row { display: flex; justify-content: space-between; font-size: .88rem; padding: .5rem 0; }
.msa-cart-summary-row.total {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  margin-top: .5rem;
  padding-top: .85rem;
}
.msa-cart-summary__btn { width: 100%; margin-top: 1.25rem; }

/* ── CHECKOUT ─────────────────────────────────────────────────────────────── */
.msa-checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2.5rem; align-items: start; }
.msa-form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.msa-form-section h3 { font-size: 1rem; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.msa-field { margin-bottom: 1rem; }
.msa-field label { display: block; font-size: .82rem; font-weight: 500; color: var(--text-muted); margin-bottom: .4rem; }
.msa-input {
  width: 100%;
  padding: .65rem .9rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .92rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.msa-input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px var(--accent2-glow);
}
.msa-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── ORDER SUCCESS ────────────────────────────────────────────────────────── */
.msa-order-success {
  max-width: 680px;
  margin: 5rem auto;
  text-align: center;
}
.msa-order-success__icon {
  width: 80px;
  height: 80px;
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}
.msa-license-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-align: left;
  margin-bottom: .75rem;
}
.msa-license-card__name  { font-weight: 600; margin-bottom: .6rem; }
.msa-license-card__serial {
  font-family: var(--font-mono);
  font-size: .9rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: .6rem 1rem;
  letter-spacing: .06em;
  color: #4ade80;
  margin-bottom: .6rem;
  word-break: break-all;
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
#msa-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}
.msa-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.msa-footer__brand p { font-size: .88rem; color: var(--text-muted); margin-top: .75rem; max-width: 280px; }
.msa-footer__col h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.msa-footer__col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.msa-footer__col ul li a {
  font-size: .88rem;
  color: var(--text-dim);
  transition: color .15s;
}
.msa-footer__col ul li a:hover { color: var(--text-muted); }
.msa-footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.msa-footer__copy { font-size: .82rem; color: var(--text-dim); }
.msa-footer__badges { display: flex; gap: .5rem; }
.msa-footer__badge {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  padding: .25rem .65rem;
  border-radius: 5px;
}

/* ── WOOCOMMERCE OVERRIDES ────────────────────────────────────────────────── */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info { border-radius: var(--radius); padding: .85rem 1.25rem; font-size: .9rem; margin-bottom: 1.25rem; }
.woocommerce-message { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #4ade80; }
.woocommerce-error   { background: rgba(232,68,10,.1); border: 1px solid rgba(232,68,10,.25); color: #ff8a65; }
.woocommerce-info    { background: rgba(123,79,255,.1); border: 1px solid rgba(123,79,255,.25); color: #a78bfa; }

/* ── MISC ─────────────────────────────────────────────────────────────────── */
.msa-page-title {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.msa-breadcrumb { font-size: .82rem; color: var(--text-dim); margin-bottom: .75rem; }
.msa-breadcrumb a { color: var(--text-muted); }
.msa-breadcrumb a:hover { color: var(--text); }
.msa-breadcrumb span { color: var(--text-dim); margin: 0 .4rem; }

.msa-empty { text-align: center; padding: 5rem 2rem; }
.msa-empty__icon { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }
.msa-empty h3 { margin-bottom: .5rem; }
.msa-empty p { font-size: .9rem; }

.msa-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

/* ── Large tablets / small desktops (max 1200px) ── */
@media (max-width: 1200px) {
  .msa-container { padding: 0 1.25rem; }
  .msa-product-grid { grid-template-columns: repeat(3, 1fr); }
  .msa-product-grid--wide { grid-template-columns: repeat(3, 1fr); }
  .msa-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
}

/* ── Tablets (max 1024px) ── */
@media (max-width: 1024px) {
  /* Layout shifts */
  .msa-product-single__layout { grid-template-columns: 1fr; }
  .msa-buybox { position: static; top: auto; }
  .msa-cart-layout { grid-template-columns: 1fr; }
  .msa-checkout-layout { grid-template-columns: 1fr; }
  .msa-cart-summary { position: static; }
  .msa-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* Product grid: 3 columns on tablets */
  .msa-product-grid { grid-template-columns: repeat(3, 1fr); }

  /* Shop page: hide sidebar, full width grid */
  .msa-shop-layout { flex-direction: column; }
  .msa-shop-sidebar { width: 100% !important; position: static !important; }

  /* Hero */
  .msa-hero { min-height: 480px; }
  .msa-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
  .msa-hero__stats { gap: 1.5rem; flex-wrap: wrap; }

  /* Promo banner */
  .msa-promo-banner { flex-direction: column; padding: 2rem; }
}

/* ── Mobile landscape / large phones (max 768px) ── */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* Header */
  .msa-nav { display: none; }
  .msa-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: var(--bg);
    padding: 1.25rem 1.5rem;
    z-index: 199;
    gap: .25rem;
    overflow-y: auto;
    border-top: 1px solid var(--border);
  }
  .msa-nav.open a {
    padding: .75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
  }
  .msa-menu-toggle { display: flex; }
  .msa-header-search { display: none; }
  .msa-logo__tag { display: none; }

  /* Hero */
  .msa-hero { min-height: auto; }
  .msa-hero__inner { padding: 3.5rem 0 3rem; }
  .msa-hero h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .msa-hero__sub { font-size: 1rem; }
  .msa-hero__actions { flex-direction: column; align-items: flex-start; }
  .msa-hero__actions .msa-btn { width: 100%; justify-content: center; }
  .msa-hero__stats { gap: 1.25rem; padding-top: 1.5rem; margin-top: 2.5rem; }
  .msa-hero__stat-num { font-size: 1.4rem; }

  /* Brands */
  .msa-brands__logos { gap: 1.25rem; }
  .msa-brands__logo { font-size: .8rem; }

  /* Category grid */
  .msa-cat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Product grid: 2 columns on mobile */
  .msa-product-grid { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
  .msa-product-grid--wide { grid-template-columns: repeat(2, 1fr); }

  /* Product card tweaks */
  .msa-product-card__img-wrap { height: 150px; }
  .msa-product-card__body { padding: .75rem .85rem .6rem; }
  .msa-product-card__title { font-size: .88rem; }
  .msa-product-card__tagline { display: none; }
  .msa-product-card__footer { padding: .55rem .85rem .7rem; }
  .msa-product-card__price { font-size: 1rem; }
  .msa-product-card__add { width: 30px; height: 30px; font-size: 1rem; }

  /* Shop page layout */
  .msa-shop-layout { display: block !important; }
  .msa-shop-sidebar { display: none; }

  /* Single product */
  .msa-product-gallery__main { aspect-ratio: 4/3; }
  .msa-buybox { padding: 1.25rem; }
  .msa-buybox__price { font-size: 1.8rem; }
  .msa-buybox__title { font-size: 1.1rem; }

  /* Features */
  .msa-features-grid { grid-template-columns: 1fr; }
  .msa-req-grid { grid-template-columns: 1fr; }

  /* Cart */
  .msa-cart-table__header { display: none; }
  .msa-cart-table tbody tr {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: .5rem;
    padding: .85rem 0;
    align-items: center;
  }
  .msa-cart-table tbody td { padding: 0; }
  .msa-cart-item__price { text-align: right; }
  .msa-cart-summary { padding: 1.25rem; }

  /* Checkout */
  .msa-field-row { grid-template-columns: 1fr; gap: .75rem; }
  .msa-form-section { padding: 1.25rem; }

  /* Footer */
  .msa-footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .msa-footer__brand { grid-column: 1 / -1; }
  .msa-footer__bottom { flex-direction: column; text-align: center; gap: .75rem; }

  /* Section spacing */
  .msa-section { padding: 3rem 0; }
  .msa-section--sm { padding: 2rem 0; }

  /* Promo banner */
  .msa-promo-banner { padding: 1.5rem; gap: 1.25rem; }
  .msa-promo-banner h3 { font-size: 1.2rem; }
  .msa-promo-banner::before { display: none; }
}

/* ── Small phones (max 480px) ── */
@media (max-width: 480px) {
  :root { --header-h: 56px; }
  .msa-container { padding: 0 1rem; }

  /* Header */
  .msa-logo__name { font-size: .85rem; }
  .msa-cart-btn span:not(.msa-cart-count) { display: none; }
  .msa-header-actions { gap: .5rem; }

  /* Hero */
  .msa-hero__inner { padding: 2.5rem 0 2.5rem; }
  .msa-hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); letter-spacing: -.01em; }
  .msa-hero__eyebrow { font-size: .7rem; }
  .msa-hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

  /* Product grid: still 2 columns but tighter */
  .msa-product-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .msa-product-card__img-wrap { height: 120px; }
  .msa-product-card__body { padding: .65rem .7rem .5rem; gap: .2rem; }
  .msa-product-card__brand { font-size: .62rem; }
  .msa-product-card__title { font-size: .82rem; -webkit-line-clamp: 2; }
  .msa-product-card__footer { padding: .5rem .7rem .65rem; }
  .msa-product-card__price { font-size: .9rem; }
  .msa-product-card__add { width: 28px; height: 28px; font-size: .9rem; border-radius: 6px; }

  /* Category grid: 2 columns */
  .msa-cat-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .msa-cat-tile { padding: 1.1rem 1rem; }
  .msa-cat-tile__icon { font-size: 1.4rem; }
  .msa-cat-tile__name { font-size: .82rem; }

  /* Buybox */
  .msa-buybox__price { font-size: 1.6rem; }
  .msa-buybox__badges { gap: .3rem; }
  .msa-badge { font-size: .68rem; padding: .2rem .5rem; }

  /* Tabs */
  .msa-tabs__nav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 1px; }
  .msa-tabs__btn { white-space: nowrap; font-size: .82rem; padding: .55rem .9rem; }

  /* Footer */
  .msa-footer__grid { grid-template-columns: 1fr; }
  .msa-footer { padding: 2.5rem 0 1.5rem; }

  /* Buttons */
  .msa-btn--lg { padding: .75rem 1.5rem; font-size: .92rem; }

  /* Section header */
  .msa-section-header { flex-direction: column; align-items: flex-start; }
}

/* ── Very small phones (max 360px) ── */
@media (max-width: 360px) {
  .msa-product-grid { grid-template-columns: 1fr; }
  .msa-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .msa-hero h1 { font-size: 1.5rem; }
  .msa-product-card__img-wrap { height: 160px; }
}
