/* =========================================================
   TechKaiju — techkaiju-style.css
   Save as: /wp-content/themes/YOUR-CHILD-THEME/techkaiju-style.css
   ========================================================= */

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --blue-900: #0a1628;
  --blue-800: #0f2044;
  --blue-700: #1a3160;
  --blue-600: #1e4fd8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;

  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
  --transition: .2s ease;
}

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

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── ARCHIVE PAGE ────────────────────────────────────────── */
.tk-archive-wrap {
  min-height: 100vh;
}

/* Hero banner */
.tk-archive-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-600) 100%);
  padding: 56px 24px 48px;
  position: relative;
  overflow: hidden;
}
.tk-archive-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.tk-archive-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.tk-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-400);
  background: rgba(59,130,246,.15);
  border: 1px solid rgba(59,130,246,.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.tk-archive-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}

/* Layout */
.tk-archive-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── FILTER SIDEBAR ──────────────────────────────────────── */
.tk-filter-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 24px;
  position: sticky;
  top: 20px;
  box-shadow: var(--shadow-sm);
}

.tk-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-900);
}

.tk-filter-reset {
  font-size: 12px;
  color: var(--blue-500);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition);
}
.tk-filter-reset:hover { background: var(--blue-50); }

.tk-filter-group {
  margin-bottom: 28px;
}
.tk-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-400);
  margin-bottom: 12px;
}

/* Brand pills */
.tk-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tk-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}
.tk-pill:hover {
  border-color: var(--blue-400);
  color: var(--blue-500);
}
.tk-pill.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: var(--white);
  font-weight: 600;
}

/* Price range */
.tk-price-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 14px;
  text-align: center;
}
.tk-range-wrap {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
}
.tk-range {
  -webkit-appearance: none;
  width: 100%;
  position: absolute;
  background: transparent;
  pointer-events: none;
}
.tk-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
  cursor: pointer;
  pointer-events: all;
}
.tk-range::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
}

.tk-apply-btn {
  display: none; /* shown on mobile */
  width: 100%;
  background: var(--blue-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.tk-apply-btn:hover { background: var(--blue-600); }

/* ── RESULTS BAR ─────────────────────────────────────────── */
.tk-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
#tkResultCount {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 500;
}
.tk-mobile-filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition);
}
.tk-mobile-filter-toggle:hover { border-color: var(--blue-400); }

/* ── DEVICE GRID ─────────────────────────────────────────── */
.tk-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.tk-device-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.tk-device-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200, #bfdbfe);
}
.tk-device-card a { display: block; }

.tk-card-img {
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 180px;
}
.tk-card-img img {
  height: 140px;
  width: auto;
  object-fit: contain;
  transition: transform .3s ease;
}
.tk-device-card:hover .tk-card-img img { transform: scale(1.05); }

.tk-card-body {
  padding: 16px;
  border-top: 1px solid var(--gray-100);
}
.tk-card-brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--blue-500);
  display: block;
  margin-bottom: 6px;
}
.tk-card-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 10px;
}
.tk-card-price {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-600);
  background: var(--blue-50);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Load More */
.tk-pagination { text-align: center; margin-top: 32px; }
.tk-load-more {
  background: var(--white);
  color: var(--blue-600);
  border: 2px solid var(--blue-500);
  padding: 12px 36px;
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.tk-load-more:hover {
  background: var(--blue-500);
  color: var(--white);
}
.tk-no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
  font-size: 16px;
}

/* ── SINGLE DEVICE ───────────────────────────────────────── */
.tk-single-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* Breadcrumb */
.tk-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.tk-breadcrumb a {
  color: var(--blue-500);
  font-weight: 500;
}
.tk-breadcrumb a:hover { text-decoration: underline; }

/* Hero Card */
.tk-hero-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  padding: 36px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 36px;
}

.tk-hero-image {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--gray-100);
}
.tk-hero-image img {
  max-height: 280px;
  width: auto;
  object-fit: contain;
}
.tk-no-img {
  color: var(--gray-400);
  font-size: 14px;
}

.tk-hero-brand {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--blue-500);
  background: var(--blue-50);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.tk-hero-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.15;
  margin-bottom: 24px;
}

.tk-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.tk-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-600);
}
.tk-meta-row svg { color: var(--blue-400); flex-shrink: 0; }
.tk-meta-row strong { color: var(--gray-800); }

.tk-hero-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.tk-price-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-400);
}
.tk-price-value {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  color: var(--blue-600);
  line-height: 1;
}

.tk-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
}
.tk-buy-btn:hover {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  box-shadow: 0 6px 24px rgba(37,99,235,.45);
  transform: translateY(-2px);
}

/* Specs */
.tk-specs-wrap { margin-top: 8px; }
.tk-specs-heading {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 20px;
}

.tk-specs-section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.tk-specs-section-title {
  background: linear-gradient(90deg, var(--blue-900), var(--blue-800));
  color: var(--white);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 12px 20px;
}

.tk-specs-table {
  width: 100%;
  border-collapse: collapse;
}
.tk-specs-table tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.tk-specs-table tr:last-child { border-bottom: none; }
.tk-specs-table tr:hover { background: var(--blue-50); }

.tk-spec-label {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  width: 180px;
  vertical-align: top;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-100);
}
.tk-spec-value {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.5;
}

/* Bottom CTA bar */
.tk-bottom-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue-900);
  border-top: 1px solid var(--blue-700);
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}
.tk-bottom-cta__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tk-bottom-cta__name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}
.tk-bottom-cta__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-400);
  margin-top: 2px;
}

/* ── LOADING SPINNER ─────────────────────────────────────── */
.tk-loading {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  padding: 48px;
}
.tk-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: tk-spin .7s linear infinite;
}
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .tk-archive-main {
    grid-template-columns: 1fr;
  }
  .tk-filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    z-index: 200;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .tk-filter-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .tk-mobile-filter-toggle {
    display: flex;
  }
  .tk-apply-btn {
    display: block;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .tk-hero-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
  .tk-hero-image {
    min-height: 220px;
  }
  .tk-device-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .tk-spec-label {
    width: 120px;
    font-size: 12px;
  }
  .tk-spec-value {
    font-size: 13px;
  }
  .tk-bottom-cta__inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .tk-buy-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tk-device-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .tk-card-img { min-height: 140px; padding: 16px; }
  .tk-card-img img { height: 100px; }
  .tk-card-body { padding: 12px; }
  .tk-card-title { font-size: 12px; }
  .tk-price-value { font-size: 26px; }
}

/* ── OVERLAY (mobile filter) ─────────────────────────────── */
.tk-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.tk-overlay.active { display: block; }
