:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --accent: #0d9488;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.ct-container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.ct-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.ct-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.ct-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}
.ct-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ct-nav a { color: var(--muted); font-weight: 500; font-size: 0.94rem; }
.ct-nav a:hover { color: var(--ink); text-decoration: none; }

.ct-country-pills { display: flex; gap: 6px; }
.ct-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}
.ct-pill.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
}

.ct-hero {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 55%, #0d9488 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.ct-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}
.ct-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.ct-hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); line-height: 1.15; margin: 0 0 14px; }
.ct-hero p { font-size: 1.06rem; opacity: 0.92; margin: 0 0 22px; }

.ct-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.ct-section { padding: 48px 0; }
.ct-section h2 { font-size: 1.55rem; margin: 0 0 18px; }

.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ct-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.ct-grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }

.ct-form-group { margin-bottom: 14px; }
.ct-form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.ct-input, .ct-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
.ct-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.ct-btn:hover { background: var(--brand-dark); text-decoration: none; }
.ct-btn-block { width: 100%; }
.ct-btn-outline { background: transparent; color: var(--brand-dark); border: 1px solid var(--brand); }
.ct-btn-outline:hover { background: var(--brand-soft); }
.ct-btn-sm { padding: 6px 12px; font-size: 0.84rem; }

.ct-flash { padding: 12px 16px; border-radius: 10px; margin: 16px 0; font-weight: 600; font-size: 0.92rem; }
.ct-flash-notice { background: #dcfce7; color: #166534; }
.ct-flash-alert { background: #fee2e2; color: #991b1b; }

.ct-stat-value { font-size: 1.75rem; font-weight: 800; color: var(--brand-dark); }
.ct-muted { color: var(--muted); font-size: 0.9rem; }
.ct-price { font-size: 1.3rem; font-weight: 800; color: #0f766e; }

.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ct-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}
.ct-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.ct-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ct-table th, .ct-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.ct-table th { background: #f1f5f9; font-weight: 700; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }

.ct-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .ct-hero-grid { grid-template-columns: 1fr; }
  .ct-form-row { grid-template-columns: 1fr; }
}

/* Catalog & Product Experience */
.ct-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.ct-catalog-search {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 410px;
}
.ct-catalog-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.ct-filter-block { display: flex; flex-direction: column; gap: 8px; }
.ct-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ct-filter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ct-filter-actions { display: flex; align-items: center; gap: 12px; }
.ct-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ct-chip-ghost {
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
}
.ct-btu-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.ct-btu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.ct-btu-btn strong { font-size: 0.98rem; line-height: 1.2; }
.ct-btu-btn span { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.ct-btu-btn:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.ct-btu-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ct-btu-btn.is-active span { color: rgba(255, 255, 255, 0.88); }

.ct-btu-helper {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-top: 4px;
}
.ct-btu-helper-dial {
  min-width: 96px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--brand-soft);
  text-align: center;
}
.ct-btu-helper-dial strong { display: block; font-size: 1.25rem; color: var(--brand-dark); line-height: 1.1; }
.ct-btu-helper-dial span { font-size: 0.74rem; color: var(--muted); font-weight: 700; }
.ct-btu-helper-body { flex: 1; }

.ct-catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ct-catalog-count { font-size: 0.95rem; color: var(--ink); }
.ct-catalog-toolbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ct-catalog-sort { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct-sort-link {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
}
.ct-sort-link.is-active { background: var(--brand-soft); color: var(--brand-dark); border-color: #bae6fd; }
.ct-clear-link { font-size: 0.84rem; font-weight: 600; color: var(--danger); }

.ct-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ct-product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.ct-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
  border-color: #bae6fd;
  text-decoration: none;
}
.ct-product-media {
  position: relative;
  height: 172px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.ct-card-discount {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.ct-multi-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.74rem;
  font-weight: 700;
}
.ct-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ct-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid #bae6fd;
  font-size: 0.8rem;
  font-weight: 700;
}
.ct-active-chip:hover {
  background: #bae6fd;
  text-decoration: none;
}
.ct-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-top: 6px;
}
.ct-verdict-great { background: #dcfce7; color: #166534; }
.ct-verdict-good { background: #ccfbf1; color: #0f766e; }
.ct-verdict-wait { background: #fef3c7; color: #92400e; }
.ct-verdict-fair { background: #f1f5f9; color: var(--muted); }
.ct-savings-banner {
  padding: 10px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.ct-offer-row.is-best-offer {
  background: #f8fafc;
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 10px;
}
.ct-energy-card { margin-top: 24px; }
.ct-energy-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}
.ct-energy-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ct-energy-savings {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.83rem;
  font-weight: 600;
}
.ct-product-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ct-product-fallback {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ct-product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.ct-product-brand {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
}
.ct-product-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ct-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.ct-product-badges span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
}
.ct-product-badges span.is-accent {
  background: #ccfbf1;
  color: #0f766e;
}
.ct-product-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

/* Pagination (Pagy) */
.ct-pagy-wrap {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}
.pagy.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagy.nav a, .pagy.nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}
.pagy.nav a:hover:not([aria-disabled="true"]) {
  border-color: var(--brand);
  color: var(--brand-dark);
  text-decoration: none;
}
.pagy.nav a.current, .pagy.nav span.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pagy.nav a[aria-disabled="true"], .pagy.nav .gap {
  opacity: 0.45;
  pointer-events: none;
}

/* Product Show Page */
.ct-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.ct-product-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 1.3fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.ct-product-hero-media {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 290px;
}
.ct-product-hero-media img { max-width: 100%; max-height: 270px; object-fit: contain; }
.ct-product-summary-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}
.ct-product-summary-price .ct-price { font-size: 1.9rem; }
.ct-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.76rem;
  font-weight: 700;
}
.ct-offer-list { display: flex; flex-direction: column; }
.ct-offer-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.75fr 0.85fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.ct-offer-row:last-child { border-bottom: 0; }
.ct-offer-row.is-unavailable { opacity: 0.58; }
.ct-offer-store small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
.ct-offer-price s {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.ct-stock-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.ct-stock-badge.is-live { background: #dcfce7; color: #166534; }
.ct-stock-badge.is-out { background: #f1f5f9; color: var(--muted); }

/* Price Evolution Chart */
.ct-chart-card { margin-top: 24px; }
.ct-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ct-chart-periods {
  display: inline-flex;
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ct-chart-periods button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.ct-chart-periods button.is-on {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.ct-chart-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ct-chart-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.ct-chart-stat span { display: block; font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.ct-chart-stat strong { display: block; font-size: 1.05rem; margin-top: 3px; color: var(--ink); }
.ct-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}
.ct-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ct-chart-legend-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.ct-chart-stage {
  position: relative;
  width: 100%;
  min-height: 260px;
}
.ct-chart-svg { width: 100%; height: 260px; display: block; overflow: visible; }
.ct-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  z-index: 10;
  white-space: nowrap;
}
.ct-chart-stable {
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f0f9ff;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

/* Specs Grid */
.ct-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
}
.ct-specs-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.ct-specs-row dt { color: var(--muted); font-weight: 600; }
.ct-specs-row dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

@media (max-width: 1024px) {
  .ct-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .ct-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-btu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ct-filter-row, .ct-product-hero, .ct-specs-grid, .ct-energy-grid { grid-template-columns: 1fr; }
  .ct-chart-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-offer-row { grid-template-columns: 1fr auto; }
  .ct-offer-row .ct-offer-meta-hide { display: none; }
  .ct-chips-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .ct-chips-scroll .ct-chip { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .ct-catalog-grid { grid-template-columns: 1fr; }
}
