:root {
  --b-50:  #eef8f4;
  --b-100: #d4ede2;
  --b-200: #a8dbc5;
  --b-300: #6fc3a0;
  --b-400: #42a87e;
  --b-500: #1e8e63;
  --b-600: #166f4d;
  --b-700: #0f5238;
  --b-800: #0a3826;
  --b-900: #051f14;

  --primary:        var(--b-500);
  --primary-hover:  var(--b-600);
  --primary-active: var(--b-700);
  --primary-soft:   var(--b-50);
  --primary-glow:   rgba(30, 142, 99, .22);

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #0ea5e9;

  --n-0:   #ffffff;
  --n-50:  #f8fafc;
  --n-100: #f1f5f9;
  --n-200: #e2e8f0;
  --n-300: #cbd5e1;
  --n-400: #94a3b8;
  --n-500: #64748b;
  --n-600: #475569;
  --n-700: #334155;
  --n-800: #1e293b;
  --n-900: #0f172a;
  --n-950: #020617;

  --text:        var(--n-900);
  --text-muted:  var(--n-500);
  --text-subtle: var(--n-400);

  --surface:        var(--n-0);
  --surface-alt:    var(--n-50);
  --surface-sunken: var(--n-100);
  --surface-invert: var(--n-900);

  --border:        var(--n-200);
  --border-strong: var(--n-300);
  --border-subtle: var(--n-100);

  --e-1: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.03);
  --e-2: 0 2px 4px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.05);
  --e-3: 0 4px 8px rgba(15,23,42,.05), 0 12px 28px rgba(15,23,42,.08);
  --e-4: 0 8px 16px rgba(15,23,42,.06), 0 24px 48px rgba(15,23,42,.10);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-bounce: cubic-bezier(.68, -.55, .27, 1.55);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 400ms;

  --pad-x: 16px;
  --gap-y: 56px;
}

body {
  background: var(--surface-alt);
}

.container {
  position: relative;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--b-400), var(--b-600));
  box-shadow: 0 0 0 4px var(--primary-glow);
  flex-shrink: 0;
}

.section-title i {
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  color: var(--primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--e-1);
  transition: all var(--dur-2) var(--ease-out);
}

.btn-view-all:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateX(-3px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-view-all:active {
  transform: translateX(0) scale(.97);
}

.btn-view-all i {
  font-size: .7rem;
  transition: transform var(--dur-2) var(--ease-out);
}

.btn-view-all:hover i {
  transform: translateX(-3px);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 128px);
  justify-content: center;
  gap: 14px;
}

.category {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 12px;
  min-height: 150px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);

  color: inherit;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;

  box-shadow: var(--e-1);
  transition: all var(--dur-2) var(--ease-out);
}

.category::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
          radial-gradient(circle at 50% 0%, var(--primary-soft) 0%, transparent 65%),
          linear-gradient(180deg, transparent 50%, var(--primary-soft) 100%);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out);
}

.category:hover {
  transform: translateY(-6px);
  border-color: var(--b-200);
  box-shadow: var(--e-4);
}

.category:hover::before { opacity: 1; }
.category:active { transform: translateY(-2px); }

.category img {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  padding: 10px;
  object-fit: contain;

  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);

  transition: all var(--dur-3) var(--ease-spring);
}

.category:hover img {
  transform: scale(1.10) rotate(-4deg);
  background: #fff;
  border-color: var(--b-300);
  box-shadow: 0 8px 16px var(--primary-glow);
}

.category span {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  max-width: 100%;

  color: var(--text);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  word-break: break-word;
  letter-spacing: -.005em;

  transition: color var(--dur-2);
}

.category:hover span { color: var(--primary); }

.category { animation: catEnter var(--dur-3) var(--ease-out) backwards; }

.category:nth-child(1) { animation-delay: .02s; }
.category:nth-child(2) { animation-delay: .04s; }
.category:nth-child(3) { animation-delay: .06s; }
.category:nth-child(4) { animation-delay: .08s; }
.category:nth-child(5) { animation-delay: .10s; }
.category:nth-child(6) { animation-delay: .12s; }
.category:nth-child(7) { animation-delay: .14s; }
.category:nth-child(8) { animation-delay: .16s; }
.category:nth-child(9) { animation-delay: .18s; }
.category:nth-child(10) { animation-delay: .20s; }
.category:nth-child(11) { animation-delay: .22s; }
.category:nth-child(12) { animation-delay: .24s; }

@keyframes catEnter {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.horizontal-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 0 24px;

  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--n-300) transparent;
}

.horizontal-scroll .scroll-wrapper {
  display: flex;
  gap: 18px;
  padding: 4px 2px;
  justify-content: center;
  min-width: min-content;
}

.horizontal-scroll .scroll-item {
  flex: 0 0 auto;
  width: 300px;
  max-width: 84vw;
  scroll-snap-align: start;
}

.horizontal-scroll::-webkit-scrollbar { height: 6px; }
.horizontal-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--n-300);
  border-radius: var(--r-pill);
  transition: background var(--dur-1);
}
.horizontal-scroll::-webkit-scrollbar-thumb:hover { background: var(--n-400); }

.car-card {
  position: relative;
  display: block;
  height: 100%;
  min-height: 340px;
  overflow: hidden;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);

  box-shadow: var(--e-1);
  color: inherit;
  text-decoration: none;

  transition: all var(--dur-2) var(--ease-out);
}

.car-card:hover {
  transform: translateY(-6px);
  border-color: var(--b-200);
  box-shadow: var(--e-4);
}

.car-card .card-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}

.car-card:hover .card-img { transform: scale(1.08); }

.car-card .card-img-overlay {
  display: flex;
  align-items: flex-end;
  padding: 22px;

  background: linear-gradient(
          180deg,
          rgba(15, 23, 42, 0) 0%,
          rgba(15, 23, 42, 0) 40%,
          rgba(15, 23, 42, .72) 78%,
          rgba(15, 23, 42, .92) 100%
  );

  border-radius: 0;
  pointer-events: none;
}

.car-card .card-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.car-card::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f172a'%3E%3Cpath d='M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
  opacity: 0;
  transform: translateY(-8px) scale(.8);
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  transition: all var(--dur-3) var(--ease-spring);
}

.car-card:hover::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.basket-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);

  box-shadow: var(--e-1);
  color: inherit;
  text-decoration: none;

  transition: all var(--dur-2) var(--ease-out);
}

.basket-card:hover {
  transform: translateY(-6px);
  border-color: var(--b-200);
  box-shadow: var(--e-4);
}

.basket-image-wrap {
  position: relative;
  height: 190px;
  flex-shrink: 0;
  overflow: hidden;
}

.basket-image-wrap .card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}

.basket-card:hover .basket-image-wrap .card-img { transform: scale(1.08); }

.basket-image-wrap .basket-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
          180deg,
          rgba(15, 23, 42, 0) 30%,
          rgba(15, 23, 42, .78) 100%
  );
  pointer-events: none;
}

.basket-image-wrap .basket-bottom-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  z-index: 2;
}

.basket-title {
  flex: 1;
  margin: 0;
  color: #fff;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.badge-amount {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 13px;
  color: #fff;
  background: var(--primary);
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, .15);
}

.badge-amount span {
  font-size: .92rem;
  font-weight: 900;
  line-height: 1;
}

.basket-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 18px;
}

.features-list {
  flex: 1;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 2px 0;

  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.55;
}

.features-list li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--b-50), var(--b-100));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e8e63'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--b-200);
}

.price-section {
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .84rem;
}

.price-row .label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .8rem;
}

.price-row .value {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price-row.highlight .value {
  color: var(--primary);
  font-size: .96rem;
  font-weight: 900;
}

.price-row .mony {
  display: inline-block;
  direction: ltr;
  font-feature-settings: "tnum";
}

.free-badge {
  display: inline-block;
  padding: 4px 11px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: var(--success);
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
  border: 1px solid rgba(16, 185, 129, .2);
}

#autoScroll {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 25px;
  padding: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--n-300) transparent;
  box-shadow: var(--e-1);
}

#autoScroll::-webkit-scrollbar { height: 5px; }
#autoScroll::-webkit-scrollbar-track { background: transparent; }
#autoScroll::-webkit-scrollbar-thumb {
  background: var(--n-300);
  border-radius: var(--r-pill);
}

#autoScroll .col-3.col-lg-1 {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 0;
}

.partner-card {
  flex: 0 0 auto;
  width: 120px;
  min-height: 120px;
  padding: 16px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);

  cursor: pointer;
  text-align: center;

  transition: all var(--dur-2) var(--ease-out);
}

.partner-card:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: var(--b-200);
  box-shadow: var(--e-3);
}

.partner-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: grayscale(1) opacity(.55);
  transition: filter var(--dur-2) var(--ease-out);
}

.partner-card:hover img {
  filter: grayscale(0) opacity(1);
}

.partner-name {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.partner-card:hover .partner-name { color: var(--primary); }

[data-bs-theme="dark"] {
  --text:        #f1f5f9;
  --text-muted:  #cbd5e1;
  --text-subtle: #64748b;

  --surface:        #1e293b;
  --surface-alt:    #0f172a;
  --surface-sunken: #0b1220;
  --surface-invert: #f8fafc;

  --border:        #334155;
  --border-strong: #475569;
  --border-subtle: #1e293b;

  --primary-soft: #1a2e28;
  --primary-glow: rgba(30, 142, 99, .25);

  --e-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .25);
  --e-2: 0 2px 4px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .35);
  --e-3: 0 4px 8px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .45);
  --e-4: 0 8px 16px rgba(0, 0, 0, .4), 0 24px 48px rgba(0, 0, 0, .55);
}

[data-bs-theme="dark"] .category img {
  background: var(--surface-sunken);
  border-color: var(--border);
}

[data-bs-theme="dark"] .category:hover img {
  background: var(--surface);
  border-color: var(--b-600);
}

[data-bs-theme="dark"] .partner-card {
  background: var(--surface-sunken);
  border-color: var(--border);
}

[data-bs-theme="dark"] .partner-card:hover {
  background: var(--surface);
  border-color: var(--b-500);
}

[data-bs-theme="dark"] .horizontal-scroll::-webkit-scrollbar-thumb,
[data-bs-theme="dark"] #autoScroll::-webkit-scrollbar-thumb {
  background: var(--n-600);
}

@media (max-width: 992px) {
  .category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 128px));
    justify-content: center;
    gap: 14px;
    max-width: fit-content;
    margin-inline: auto;
  }

  .category { min-height: 135px; padding: 18px 10px; }
  .category img { width: 52px; height: 52px; padding: 9px; }
  .category span { font-size: .82rem; }

  .horizontal-scroll .scroll-item { width: 280px; }

  .car-card { min-height: 300px; }
  .car-card .card-img { height: 300px; }

  .basket-image-wrap { height: 175px; }
}

@media (max-width: 576px) {
  :root {
    --gap-y: 36px;
    --pad-x: 14px;
  }

  .category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 128px));
    justify-content: center;
    gap: 14px;
    max-width: fit-content;
    margin-inline: auto;
  }

  .category {
    min-height: 112px;
    padding: 14px 8px;
    gap: 9px;
    border-radius: var(--r-md);
  }

  .category img {
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: var(--r-sm);
  }

  .category span {
    font-size: .72rem;
    line-height: 1.35;
  }

  .section-title { font-size: 1.05rem; gap: 10px; }
  .section-title::before { height: 18px; }
  .section-title i { font-size: 1rem; }

  .btn-view-all {
    padding: 7px 13px;
    font-size: .72rem;
  }

  .horizontal-scroll .scroll-item {
    width: 260px;
    max-width: 80vw;
  }

  .car-card { min-height: 270px; }
  .car-card .card-img { height: 270px; }
  .car-card .card-title { font-size: .92rem; }
  .car-card .card-img-overlay { padding: 16px; }

  .basket-image-wrap { height: 155px; }
  .basket-title { font-size: .86rem; }

  .badge-amount {
    padding: 4px 10px;
    font-size: .68rem;
  }
  .badge-amount span { font-size: .82rem; }

  .basket-body { padding: 14px; gap: 12px; }

  .features-list li { font-size: .76rem; }

  .price-row { font-size: .78rem; }
  .price-row.highlight .value { font-size: .88rem; }

  #autoScroll { padding: 14px; gap: 10px; }

  .partner-card {
    width: 92px;
    min-height: 92px;
    padding: 12px 6px;
    gap: 8px;
  }

  .partner-card img { width: 38px; height: 38px; }
  .partner-name { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}