/* budget-categories component */

.budget-categories {
  margin: 18px 0;
  padding: 24px 20px 27px;
  border: 1px solid #eeeeef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(24 24 27 / 5%);
}

.budget-categories-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.budget-categories-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 4px;
  color: #18181b;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.1;
}

.budget-categories-heading h2 i {
  position: relative;
  display: block;
  width: 23px;
  height: 18px;
}

.budget-categories-heading h2 i::before,
.budget-categories-heading h2 i::after {
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #ed0017;
  content: "";
  transform-origin: left center;
}

.budget-categories-heading h2 i::before { top: 4px; transform: rotate(-24deg); }
.budget-categories-heading h2 i::after { bottom: 4px; transform: rotate(18deg); }
.budget-categories-heading p { margin: 0; color: #71717a; font-size: 13px; }

.budget-categories-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #e00019;
  font-size: 13px;
  font-weight: 700;
}

.budget-categories-heading > a img { width: 18px; height: 18px; }
.budget-category-shell { position: relative; }

.budget-category-track {
  display: grid;
  grid-auto-columns: minmax(174px, 1fr);
  grid-auto-flow: column;
  gap: 13px;
  padding: 8px 2px 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.budget-category-track::-webkit-scrollbar { display: none; }

.budget-category-card {
  position: relative;
  display: block;
  min-height: 295px;
  overflow: hidden;
  border-radius: 14px;
  background: #df0019 center / cover no-repeat;
  box-shadow: 0 7px 18px rgb(128 0 13 / 13%);
  color: #fff;
  scroll-snap-align: start;
  transition: box-shadow .2s ease, transform .2s ease;
}

.budget-category-card::after {
  position: absolute;
  background: linear-gradient(180deg, rgb(91 0 7 / 30%) 0%, transparent 32%, transparent 76%, rgb(76 0 5 / 18%) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
}

.budget-category-card:hover,
.budget-category-card:focus-visible {
  box-shadow: 0 14px 29px rgb(128 0 13 / 25%);
  outline: none;
  transform: translateY(-4px);
}

.budget-category-card h3 {
  position: absolute;
  z-index: 2;
  top: 15px;
  left: 15px;
  width: 68%;
  margin: 0;
  color: #fff;
  font-size: 19px;
  line-height: 1.04;
  text-shadow: 0 2px 9px rgb(86 0 8 / 30%);
}

.budget-price-tag {
  position: absolute;
  z-index: 2;
  top: 42%;
  left: 46%;
  display: grid;
  min-width: 88px;
  min-height: 55px;
  place-items: center;
  padding: 7px 10px 7px 18px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 13px rgb(75 0 7 / 22%);
  color: #18181b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  transform: rotate(-7deg);
}

.budget-price-tag strong { display: block; font-size: 20px; }

.budget-price-tag::before {
  position: absolute;
  left: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4d4d8;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 25%);
  content: "";
}

.budget-price-tag::after {
  position: absolute;
  right: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.budget-category-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #ececef;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgb(24 24 27 / 15%);
  cursor: pointer;
  transform: translateY(-50%);
}

.budget-category-arrow img { width: 18px; height: 18px; }
.budget-category-prev { left: -17px; }
.budget-category-prev img { transform: rotate(180deg); }
.budget-category-next { right: -17px; }
.budget-category-arrow:disabled { opacity: 0; pointer-events: none; }

@media (min-width: 1200px) {
  .budget-category-track { grid-auto-columns: calc((100% - 65px) / 6); }
}

@media (max-width: 767px) {
  .budget-categories { padding: 19px 14px 21px; border-radius: 14px; }
  .budget-categories-heading { align-items: start; }
  .budget-categories-heading > a { margin-top: 4px; font-size: 0; }
  .budget-categories-heading > a img { width: 23px; height: 23px; }
  .budget-category-track { grid-auto-columns: minmax(152px, 66%); gap: 10px; }
  .budget-category-card { min-height: 276px; }
  .budget-category-card h3 { font-size: 18px; }
  .budget-category-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .budget-category-track { scroll-behavior: auto; }
  .budget-category-card { transition: none; }
}
