:root {
  --hb-card-navy: #081b38;
  --hb-card-blue: #0861d9;
  --hb-card-blue-hover: #064faf;
  --hb-card-muted: #667085;
  --hb-card-line: #dce3ec;
  --hb-card-green: #18833a;
}

.hb-card-grid {
  display: grid;
  grid-template-columns: repeat(var(--hb-card-columns, 5), minmax(0, 1fr));
  gap: 16px;
  width: min(100% - 32px, 1320px);
  margin-inline: auto;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hb-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hb-card-line);
  border-radius: 12px;
  background: #fff;
  color: var(--hb-card-navy);
  box-shadow: 0 2px 6px rgb(8 27 56 / 5%);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hb-card:hover {
  border-color: #bdc9d8;
  box-shadow: 0 10px 28px rgb(8 27 56 / 10%);
  transform: translateY(-2px);
}

.hb-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 12px 12px 0;
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  background: #fff;
}

.hb-card__image-link {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
}

.hb-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}

.hb-card:hover .hb-card__image { transform: scale(1.025); }

.hb-card__stickers {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: flex;
  max-width: calc(100% - 68px);
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  pointer-events: none;
}

.hb-card-sticker {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.hb-card-sticker .hb-icon { width: 14px; height: 14px; }
.hb-card-sticker--red { background: #ef4444; }
.hb-card-sticker--orange { background: #ff7600; }
.hb-card-sticker--blue { background: var(--hb-card-blue); }
.hb-card-sticker--navy { background: var(--hb-card-navy); }
.hb-card-sticker--purple { background: #7c3aed; }
.hb-card-sticker--teal { background: #0f9488; }
.hb-card-sticker--red-outline { border-color: #ef4444; background: #fff; color: #dc2626; }
.hb-card-sticker--blue-outline { border-color: var(--hb-card-blue); background: #fff; color: var(--hb-card-blue); }
.hb-card-sticker--discount { min-width:68px; flex-direction:column; align-items:stretch; gap:2px; padding:0; background:transparent; font-size:11px; }
.hb-card-sticker--discount .hb-card-sticker__discount-label { padding:6px 10px; border-radius:5px 5px 2px 2px; background:#ef4444; color:#fff; font-weight:800; text-align:center; }
.hb-card-sticker--discount strong { padding:7px 10px; border-radius:2px 2px 5px 5px; background:#ef4444; color:#fff; font-size:18px; line-height:1; text-align:center; }

.hb-card__wishlist {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hb-card-line);
  border-radius: 50%;
  background: rgb(255 255 255 / 94%);
  color: var(--hb-card-navy) !important;
  text-decoration: none !important;
}

.hb-card__wishlist .hb-icon { width: 22px; height: 22px; }
.hb-card__wishlist:hover { border-color: var(--hb-card-blue); color: var(--hb-card-blue) !important; }

.hb-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 15px;
}

.hb-card__brand {
  overflow: hidden;
  color: #687387 !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none !important;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hb-card__title {
  min-height: 52px;
  margin: 5px 0 9px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500 !important;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.hb-card__title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--hb-card-navy) !important;
  font-weight: inherit;
  text-decoration: none !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hb-card__delivery {
  align-self: flex-start;
  min-height: 30px;
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.hb-card__delivery .hb-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.hb-card__delivery span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-card__delivery small { font: inherit; }
.hb-card__delivery--fast { color: var(--hb-card-green); background: #f4fbf6; }
.hb-card__delivery--order { color: #e86600; background: #fff7ed; }

.hb-card__pricing {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-top: auto;
}

.hb-card__pricing del {
  min-height: 20px;
  color: #737d8d;
  font-size: 13px;
  line-height: 1.25;
}

.hb-card__pricing strong {
  color: var(--hb-card-blue);
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.hb-card__pricing small {
  margin-top: 3px;
  color: var(--hb-card-muted);
  font-size: 11px;
}

.hb-card__cta {
  min-height: 46px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 11px;
  padding: 8px 12px;
  border: 0;
  border-radius: 7px;
  background: var(--hb-card-blue);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
}

.hb-card__cta .hb-icon { width: 19px; height: 19px; }
.hb-card__cta:hover { background: var(--hb-card-blue-hover); }
.hb-card__cta.is-loading { opacity: .65; cursor: wait; }
.hb-card__cta.is-added { background: #14833b; }
.hb-card__cta.is-disabled { background: #98a2b3; cursor: not-allowed; }

.hb-card__wishlist:focus-visible,
.hb-card__cta:focus-visible,
.hb-card__title a:focus-visible,
.hb-card__brand:focus-visible {
  outline: 3px solid #8abaf5;
  outline-offset: 2px;
}

@media (max-width: 1199px) {
  .hb-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .hb-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .hb-card-grid {
    grid-auto-columns: clamp(230px, 76vw, 328px);
    grid-template-columns: none;
    grid-auto-flow: column;
    gap: 10px;
    width: 100%;
    padding-inline: 16px;
    overflow-x: auto;
    scroll-padding-inline: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .hb-card-grid::-webkit-scrollbar { display: none; }
  .hb-card { scroll-snap-align: start; }
  .hb-card__body { padding: 12px; }
  .hb-card__title { min-height: 48px; font-size: 14px; }
  .hb-card__pricing strong { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hb-card, .hb-card__image { transition: none; }
}
