/* ============================================================
   FAST FOOD PRODUCT ANALYTICS — STYLE
   Magazine editorial + data dashboard aesthetic
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-text-light: #999999;
  --color-border: #e8e8e6;
  --color-border-light: #f0f0ee;
  --color-accent: #1a1a1a;
  --color-highlight: #c7512e;

  /* Brand palette — muted editorial tones */
  --brand-mcdonalds: #da291c;
  --brand-mcdonalds-bg: #fef5f3;
  --brand-kfc: #c7512e;
  --brand-kfc-bg: #fef7f4;
  --brand-burgerking: #d4721a;
  --brand-burgerking-bg: #fef9f4;

  /* Category palette */
  --cat-burger: #e07b5a;
  --cat-chicken: #d4a056;
  --cat-sides: #8b9e6b;
  --cat-drinks: #5b8c9e;
  --cat-dessert: #c47b9e;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;

  --max-width: 1200px;
  --nav-height: 64px;
}

/* ── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--nav-height);
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.navbar__dot {
  color: var(--color-highlight);
}

.navbar__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar__links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.navbar__links a:hover {
  color: var(--color-text);
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg);
}

/* Background image layer */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/hero-family.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  will-change: opacity, transform;
  transition: opacity 0.15s linear;
}

/* Left-to-right white gradient overlay — keeps text readable */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(250, 250, 249, 0.95) 0%,
    rgba(250, 250, 249, 0.8) 40%,
    rgba(250, 250, 249, 0.45) 70%,
    rgba(250, 250, 249, 0.15) 100%
  );
  pointer-events: none;
}

/* Bottom fade → blends into next section */
.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.hero__kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 24px;
}

.hero__desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 640px;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  gap: 48px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.hero__stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

/* ── Section ──────────────────────────────────────────── */
.section {
  padding: 48px 24px;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: var(--color-text);
}

.section__header + .section__subtitle {
  margin-top: 0;
}

.section__subtitle {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
  margin-top: 4px;
  line-height: 1.5;
}

.section__count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* ── Brand Overview Cards ─────────────────────────────── */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.brand-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
}

.brand-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.brand-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.brand-card__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.brand-card__dot--mcdonalds {
  background: var(--brand-mcdonalds);
}
.brand-card__dot--kfc {
  background: var(--brand-kfc);
}
.brand-card__dot--burgerking {
  background: var(--brand-burgerking);
}

.brand-card__stats {
  display: flex;
  gap: 24px;
}

.brand-card__stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-card__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.brand-card__stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

/* ── Filters ──────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.filter select,
.filter input {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  min-width: 140px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.filter select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.filter select:focus,
.filter input:focus {
  border-color: var(--color-text);
}

.filter__price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter__price-range input {
  width: 90px;
  min-width: 0;
}

.filter__price-sep {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* ── Product Grid ─────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.25s;
}

.product-card:hover {
  box-shadow: var(--shadow);
}

.product-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.3;
}

.product-card__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eef7ee;
  color: #2d7a3a;
  white-space: nowrap;
}

.product-card__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.product-card__brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--color-border-light);
  color: var(--color-text-muted);
}

.product-card__category-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.product-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.product-card__datum {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.product-card__datum-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.product-card__datum-value {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* ── New Badge ────────────────────────────────────────── */
.product-card__badge--new {
  background: #fef5f3;
  color: var(--color-highlight);
}

/* ── Product Card Date Info ───────────────────────────── */
.product-card__date {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-light);
  font-size: 0.7rem;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

.product-card__date span {
  display: inline-block;
  margin-right: 1em;
}

/* ── Latest Updates Grid ──────────────────────────────── */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.latest-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}

.latest-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.latest-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.latest-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.3;
}

.latest-card__new-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--brand-mcdonalds-bg);
  color: var(--color-highlight);
  white-space: nowrap;
}

.latest-card__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.latest-card__brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--color-border-light);
  color: var(--color-text-muted);
}

.latest-card__category-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.latest-card__date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.latest-card__link {
  display: inline-block;
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
}

.latest-card__link:hover {
  background: var(--color-text);
  color: var(--color-surface);
  border-color: var(--color-text);
}

/* ── Brand Page Link Button ───────────────────────────── */
.btn-brand-page {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-brand-page:hover {
  background: var(--color-text);
  color: var(--color-surface);
  border-color: var(--color-text);
}

/* ── Analytics Page ───────────────────────────────────── */
.analytics-page {
  padding: 32px 0 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.analytics-placeholder {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  transition: box-shadow 0.25s, transform 0.25s;
}

.analytics-placeholder:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.analytics-placeholder__icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  line-height: 1;
}

.analytics-placeholder__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--color-text);
}

.analytics-placeholder__desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ── Brand Page ───────────────────────────────────────── */
.brand-page {
  padding: 32px 0 0;
}

.brand-page__back {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.brand-page__back:hover {
  color: var(--color-text);
}

.brand-page__title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--color-text);
}

.brand-page__count {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

/* ── Charts ───────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.chart-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--color-text);
}

.chart-card__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.chart-card__canvas canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--color-border-light);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer__text {
  font-size: 0.8rem;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

/* ── AI Chat Widget (floating) ─────────────────────────── */
.chat-widget {
  position: fixed;
  z-index: 1000;
}

.chat-widget__anchor {
  display: block;
  position: relative;
}

.chat-widget__fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-widget__fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

/* ── Tooltip bubble ───────────────────────────────────── */
.chat-widget__tooltip {
  position: absolute;
  bottom: 64px;
  right: 0;
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: 12px 12px 4px 12px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-widget__tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--color-text);
}

.chat-widget__tooltip--in {
  opacity: 1;
  transform: scale(1);
}

.chat-widget__tooltip--out {
  opacity: 0;
  transform: scale(0.6);
}

/* ── Panel ────────────────────────────────────────────── */
.chat-widget__panel {
  display: none;
  flex-direction: column;
  width: 360px;
  height: 480px;
  max-height: calc(100vh - 100px);
  background: #ededed;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  position: fixed;
}

.chat-widget__panel--open {
  display: flex;
}

.chat-widget__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s, color 0.2s;
}

.chat-widget__close:hover {
  background: rgba(0, 0, 0, 0.18);
  color: var(--color-text);
}

.chat-widget__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

/* ── Placeholder hint (centered, shown before first msg) ─ */
.chat-widget__placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  color: #b0b0b0;
  text-align: center;
  line-height: 1.6;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Bubble base ──────────────────────────────────────── */
.chat-widget__msg {
  width: fit-content;
  max-width: 70%;
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 10px 14px;
  white-space: pre-line;
  word-break: break-word;
  position: relative;
}

/* ── AI bubble (left side, white) ─────────────────────── */
.chat-widget__msg--ai,
.chat-widget__msg--system {
  align-self: flex-start;
  background: #ffffff;
  color: var(--color-text);
  border-radius: 4px 12px 12px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Left tail */
.chat-widget__msg--ai::after,
.chat-widget__msg--system::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #ffffff;
}

/* ── User bubble (right side, dark) ───────────────────── */
.chat-widget__msg--user {
  align-self: flex-end;
  background: var(--color-text);
  color: var(--color-surface);
  border-radius: 12px 4px 12px 12px;
}

/* Right tail */
.chat-widget__msg--user::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--color-text);
}

/* ── Loading / Error ──────────────────────────────────── */
.chat-widget__msg--loading {
  align-self: flex-start;
  background: #ffffff;
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-style: italic;
  border-radius: 4px 12px 12px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-widget__msg--loading::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #ffffff;
}

.chat-widget__msg--error {
  align-self: flex-start;
  background: var(--brand-mcdonalds-bg);
  border: 1px solid var(--brand-mcdonalds);
  color: var(--color-highlight);
  font-size: 0.8rem;
  border-radius: 4px 12px 12px 12px;
}

.chat-widget__msg--error::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid var(--brand-mcdonalds-bg);
}

/* ── Input row ────────────────────────────────────────── */
.chat-widget__input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}

.chat-widget__input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: #ffffff;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.chat-widget__input:focus {
  border-color: var(--color-text);
}

.chat-widget__send {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 18px;
  background: var(--color-text);
  color: var(--color-surface);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.chat-widget__send:hover {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .chat-widget {
    bottom: 12px;
    right: 12px;
  }

  .chat-widget__panel {
    width: calc(100vw - 24px);
    height: 420px;
    max-height: calc(100vh - 80px);
  }

  .chat-widget__msg {
    max-width: 85%;
  }
}

/* ── Responsive: Tablet ───────────────────────────────── */
@media (max-width: 960px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .latest-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .chart-card:last-child {
    grid-column: 1 / -1;
  }

  .chart-card__canvas {
    aspect-ratio: 4 / 3;
  }

  .hero__stats {
    gap: 32px;
  }
}

/* ── Responsive: Mobile ───────────────────────────────── */
@media (max-width: 640px) {
  .navbar__links {
    gap: 16px;
  }

  .navbar__links a {
    font-size: 0.75rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__desc {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .hero__stats {
    gap: 24px;
  }

  .hero__stat-value {
    font-size: 1.6rem;
  }

  .section {
    padding: 32px 16px;
  }

  .section__title {
    font-size: 1.4rem;
  }

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

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

  .chart-card:last-child {
    grid-column: auto;
  }

  .chart-card__canvas {
    aspect-ratio: 4 / 3;
  }

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

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

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

  .filters {
    flex-direction: column;
    gap: 12px;
  }

  .filter select,
  .filter input {
    width: 100%;
    min-width: 0;
  }

  .filter__price-range input {
    width: 100%;
  }
}