/* ==============================
   PREMIUM DESIGN SYSTEM
   Inspired by Slate Digital, FabFilter,
   Plugin Alliance, Denise Audio
   ============================== */

:root {
  --accent: #2563eb;
  --accent-50: #eff6ff;
  --accent-100: #dbeafe;
  --accent-200: #bfdbfe;
  --accent-600: #2563eb;
  --accent-700: #1d4ed8;
  --accent-900: #1e3a5f;
  --surface: #fff;
  --bg: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px -8px rgba(0,0,0,.12);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Typography ─── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Glassmorphism Header ─── */
.site-header {
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,.6) !important;
  height: 64px !important;
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

/* ─── Navigation ─── */
.nav a:not(.btn) {
  font-size: .88rem !important;
  font-weight: 500 !important;
  letter-spacing: -.01em;
}
.nav a:not(.btn)::after {
  bottom: -2px !important;
  height: 2px !important;
}
.nav .btn {
  font-size: .85rem !important;
  padding: .45rem 1rem !important;
}

/* ─── Hero Section ─── */
.hero-premium {
  position: relative;
  padding: 4rem 2rem;
  border-radius: var(--radius-xl);
  margin-bottom: 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f 0%, #1a365d 30%, #0f172a 100%);
  color: #fff;
  isolation: isolate;
}
.hero-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(37,99,235,.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,.15) 0%, transparent 50%);
  z-index: 0;
}
.hero-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 60 0 L 0 60' stroke='rgba(255,255,255,.03)' stroke-width='1' fill='none'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23g)'/%3E%3C/svg%3E");
  z-index: 0;
}
.hero-premium > * {
  position: relative;
  z-index: 1;
}
.hero-premium .eyebrow {
  color: var(--accent-200);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 .75rem;
}
.hero-premium h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 700px;
}
.hero-premium .lead {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: .8;
  max-width: 560px;
  margin: 0 0 1.5rem;
}
.hero-premium .actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.hero-premium .btn {
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  border-radius: 10px;
  padding: .65rem 1.5rem;
  font-size: .9rem;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.hero-premium .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
  opacity: 1;
}
.hero-premium .btn-secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
}
.hero-premium .btn-secondary:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 8px 25px rgba(0,0,0,.2);
}

/* ─── Glass Cards ─── */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.glass-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ─── Premium Product Card ─── */
.product-card-premium {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
}
.product-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-100);
}
.product-card-premium .card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f1f5f9;
}
.product-card-premium .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card-premium:hover .card-img-wrap img {
  transform: scale(1.05);
}
.product-card-premium .card-img-overlay {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.product-card-premium .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.product-card-premium .card-body h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
}
.product-card-premium .card-body p {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-premium .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* ─── Category Pills ─── */
.pill-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.pill:hover, .pill.active {
  border-color: var(--accent);
  background: var(--accent-50);
  color: var(--accent);
}

/* ─── Price Tag ─── */
.price-tag {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.02em;
}
.price-tag small {
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
}

/* ─── Badge Premium ─── */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.badge-new { background: var(--accent); color: #fff; }
.badge-popular { background: #f59e0b; color: #fff; }
.badge-free { background: #10b981; color: #fff; }
.badge-update { background: var(--accent-50); color: var(--accent-700); }

/* ─── Section Headers ─── */
.section-header-premium {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.section-header-premium h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}
.section-header-premium .section-link {
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
}
.section-header-premium .section-link:hover {
  text-decoration: underline;
}

/* ─── Trust Bar ─── */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
}
.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* ─── Gradient Text ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-600), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Feature Grid ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all var(--transition);
}
.feature-item:hover {
  border-color: var(--accent-100);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.feature-item .icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-50);
  color: var(--accent);
}
.feature-item h4 {
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 .15rem;
}
.feature-item p {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── Product Detail ─── */
.product-detail-premium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.product-detail-premium .gallery {
  background: #f1f5f9;
  min-height: 400px;
  display: grid;
  place-items: center;
}
.product-detail-premium .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-detail-premium .info {
  padding: 2rem 2rem 2rem 0;
}
.product-detail-premium .info h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.product-detail-premium .info .version-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 6px;
  background: var(--accent-50);
  color: var(--accent-700);
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.product-detail-premium .info .desc {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.product-detail-premium .info .pricing {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

/* ─── Global Section Header Consistency ─── */
.section > div:first-child:not(.hero-premium):not(.grid):not(.feature-grid):not(.product-card-premium):not(.product-layout) {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--line) !important;
  margin-bottom: 2rem !important;
  padding: 1.75rem 1.5rem !important;
  background: linear-gradient(135deg, var(--accent-50), var(--surface)) !important;
  position: relative;
  overflow: hidden;
}
.section > div:first-child h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  margin: 0 0 .2rem !important;
}
.section > div:first-child > p {
  font-size: .9rem !important;
  color: var(--muted) !important;
  margin: .2rem 0 0 !important;
}
.section {
  margin-top: 0;
}

/* ─── Page Title Class ─── */
.page-title h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em;
  margin: 0 0 .2rem;
}
.page-title p {
  font-size: .9rem;
  color: var(--muted);
  margin: .2rem 0 0;
}
.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

/* ─── Card Consistency ─── */
.card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--line) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
  transition: all var(--transition) !important;
}
.card:hover {
  box-shadow: var(--shadow-md) !important;
}

/* ─── Table Consistency ─── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.table thead th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
}
.table tbody td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover {
  background: var(--accent-50);
}

/* ─── Grid spacing ─── */
.grid {
  display: grid;
  gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ─── Auth Card Premium ─── */
.auth-card {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  margin: 0 0 .25rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.auth-card > p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}

/* ─── Badge tag ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--accent-50);
  color: var(--accent-700);
}

/* ─── Code inline ─── */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .82em;
  padding: .15em .4em;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
}

/* ─── Section container ─── */
.section {
  padding: 0 0 2rem;
}

/* ─── Actions row ─── */
.actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ─── btn-small ─── */
.btn-small {
  font-size: .8rem !important;
  padding: .35rem .85rem !important;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero-premium {
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
  }
  .hero-premium h1 {
    font-size: 1.5rem;
  }
  .product-detail-premium {
    grid-template-columns: 1fr;
  }
  .product-detail-premium .info {
    padding: 1.5rem;
  }
  .trust-bar {
    gap: 1.5rem;
    padding: 1.5rem 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .product-card-premium .card-img-wrap {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 480px) {
  .hero-premium {
    padding: 2rem 1.25rem;
  }
  .hero-premium h1 {
    font-size: 1.3rem;
  }
  .hero-premium .lead {
    font-size: .92rem;
  }
  .product-card-premium .card-body {
    padding: 1rem 1.25rem 1.25rem;
  }
}
