/* Happy Birdy - Smart Bird Feeder - checkout v2 (Figma "One-Selection Checkout")
   Desktop board: 1440px, left column 542px, side panel from x=764.
   Mobile board: 375px, 16px gutters. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: #000;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* SDK state helpers (0.3.x leaves these to the page) */
.next-hidden,
.hide {
  display: none !important;
}

html:not(.next-display-ready) [data-next-await] {
  position: relative;
}

html:not(.next-display-ready) [data-next-await] * {
  opacity: 0;
}

html:not(.next-display-ready) [data-next-await]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #e0e0e0;
  animation: hb-pulse 1.5s ease-in-out infinite;
}

@keyframes hb-pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.9;
  }
}

.next-toast-handler {
  display: none;
}

.next-toast-handler.next-visible,
.next-toast-handler.show,
.next-toast-handler[style*="block"] {
  display: block;
}

.hb-toast {
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #f5c2c7;
  border-radius: 4px;
  background: #f8d7da;
  color: #842029;
  font-size: 14px;
}

/* ---------- Header ---------- */
.hb-header {
  border-bottom: 1px solid #dedede;
  background: #fff;
}

.hb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1068px;
  margin: 0 auto;
  padding: 0 5px 0 0;
}

.hb-header__logo {
  width: 215px;
  height: 32px;
  margin-left: -1px;
}

.hb-header__secure {
  width: 91px;
  height: 35px;
  margin-top: 1px;
}

/* ---------- Layout ---------- */
.hb-layout {
  display: flex;
  align-items: stretch;
}

.hb-main {
  flex: 0 0 calc(50% + 44px);
  padding: 33px 38px 213px 0;
}

.hb-main__inner {
  width: 542px;
  margin-left: auto;
}

.hb-side {
  flex: 1 1 auto;
  min-width: 0;
  padding: 32px 0 213px 34px;
  border-left: 1px solid #dfdfdf;
  background: #fafafa;
}

.hb-side__inner {
  width: 451px;
}

/* ---------- Promo timer + demand bar ---------- */
.hb-timer {
  margin-top: -5px;
}

.hb-demand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-top: 6px;
  background: #ffecbe;
  font-size: 15px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* ---------- Offer card ---------- */
.hb-offer {
  position: relative;
  height: 474px;
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f1f1;
  cursor: default;
}

.hb-offer__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-offer__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding-left: 15px;
  background: #1e354f;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.9px;
}

.hb-offer__header b {
  font-weight: 700;
}

.hb-offer__star {
  width: 14px;
  height: 13px;
  margin-top: -1px;
}

.hb-offer__check {
  position: absolute;
  top: 68px;
  left: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: #000;
}

.hb-offer__check img {
  width: 16px;
  height: 13.5px;
}

/* min-width: the block is right-anchored, so it must not widen when the SDK fills the prices (CLS) */
.hb-offer__prices {
  position: absolute;
  top: 68px;
  right: 25px;
  min-width: 130px;
  text-align: right;
}

.hb-offer__compare {
  min-height: 24px;
  font-size: 16px;
  line-height: 24px;
  text-decoration: line-through;
  margin-right: 3px;
}

.hb-offer__price {
  min-height: 32px;
  margin-top: 2px;
  font-size: 32px;
  font-weight: 700;
  line-height: 32px;
}

.hb-offer__extra {
  color: #0a9c6c;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin-right: 1px;
}

/* Kept in the layout while hidden, so the price block keeps its height */
.hb-offer__save[hidden] {
  display: block;
  visibility: hidden;
}

.hb-offer__save {
  min-height: 24px;
  margin-top: 7px;
  color: #0a9c6c;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin-right: 1px;
}

/* Quantity stepper (T1B-494): the Sous Vide V4 control (.quantity-controls) */
.hb-qty {
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  border-radius: 60px;
  background: #e4e6ff;
}

.hb-qty__btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #000;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.hb-qty__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hb-qty__value {
  min-width: 40px;
  font-size: 24px;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
}

/* Mobile-only blocks */
.hb-trust,
.hb-secure-bar,
.hb-summary--mobile,
.hb-mobile-break {
  display: none;
}

/* ---------- Express checkout ---------- */
.hb-express {
  position: relative;
  margin-top: 44px;
  padding: 19px 16px 16px 14px;
  border: 1px solid #bbb;
  border-radius: 8px;
}

.hb-express__label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 14px;
  background: #fff;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
}

.hb-express__buttons {
  display: grid;
  grid-template-columns: 164fr 166fr 164fr;
  gap: 8px;
}

/* The SDK inserts the buttons after the page shows: hold their height until it does */
.hb-express__buttons:not(:has(> *)) {
  min-height: 50px;
}

/* The SDK only inserts the wallets the device supports (no Apple Pay outside Safari, ...): share the row between them */
.hb-express__buttons:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
  grid-template-columns: repeat(2, 1fr);
}

.hb-express__buttons:not(:has(> :nth-child(2))) {
  grid-template-columns: 1fr;
}

.hb-express__buttons > * {
  min-width: 0;
}

.hb-express__buttons .payment-btn,
.hb-express__buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.hb-express__buttons .payment-btn.cc-paypal {
  background: #ffc43a;
}

/* The SDK injects its own wordmark SVGs; swap them for the Figma logos */
.hb-express__buttons .payment-btn > div:first-child {
  display: block;
  height: auto;
  background: center / contain no-repeat;
}

.hb-express__buttons .payment-btn > div:first-child > svg {
  display: none;
}

.hb-express__buttons .cc-paypal > div:first-child {
  width: 88px;
  height: 22px;
  background-image: url("../images/v2/paypal.webp");
}

.hb-express__buttons .cc-apple-pay > div:first-child {
  width: 68px;
  height: 28px;
  background-image: url("../images/v2/applepay.webp");
}

.hb-express__buttons .cc-google-pay > div:first-child {
  width: 73px;
  height: 28px;
  margin-top: 4px;
  background-image: url("../images/v2/gpay.webp");
}

.hb-express__buttons .payment-btn-spinner {
  display: none;
}

.hb-express__buttons .payment-btn[disabled] .payment-btn-spinner,
.hb-express__buttons .payment-btn.next-loading .payment-btn-spinner {
  display: block;
}

/* ---------- Sections / fields ---------- */
.hb-section {
  margin-top: 35px;
}

.hb-section__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.hb-section__subtitle {
  margin-top: 4px;
  font-size: 15px;
  line-height: 22px;
}

.hb-grid {
  display: grid;
  gap: 15px;
}

.hb-shipping .hb-grid {
  margin-top: 11px;
}

.hb-shipping .hb-field--floating {
  margin-top: 2px;
}

.hb-row {
  display: grid;
  gap: 23px;
}

.hb-row--2 {
  grid-template-columns: 259px 1fr;
}

.hb-row--3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.hb-field {
  position: relative;
  min-width: 0;
}

.hb-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: #000;
  font-size: 15px;
  line-height: 23px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.hb-input::placeholder {
  color: #2b2b2b;
  opacity: 1;
}

.hb-input:focus,
.hb-input.focus,
.hb-input.spreedly-focus {
  border-color: #000;
}

.hb-input.next-error-field,
.hb-input.error,
.hb-input.has-error {
  border-color: #e23d3d;
}

.hb-field .next-error-label,
.hb-field .pb-input-error {
  margin-top: 4px;
  color: #e23d3d;
  font-size: 12px;
}

.hb-select {
  padding-right: 44px;
  color: #2b2b2b;
  cursor: pointer;
}

.hb-field--select::after {
  content: "";
  position: absolute;
  top: 23px;
  right: 11px;
  width: 16px;
  height: 10px;
  background: url("../images/v2/caret.svg") center / 13.86px 7.5px no-repeat;
  transform: rotate(180deg);
  pointer-events: none;
}

.hb-select--strong {
  padding-top: 13px;
  color: #000;
  font-weight: 600;
}

.hb-float-label {
  position: absolute;
  top: -9px;
  left: 11px;
  z-index: 1;
  padding: 0 4px 0 5px;
  background: #fff;
  color: #2b2b2b;
  font-size: 13px;
  line-height: 20px;
}

.hb-field--search .hb-input {
  padding-right: 44px;
}

.hb-field--search::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: url("../images/v2/search.svg") center / contain no-repeat;
  pointer-events: none;
}

/* ---------- SDK address block (data-next-address, 0.4.39+) ---------- */
/* Column gap instead of row margins, so rows the SDK hides leave no space */
[data-next-address] {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

[data-next-address] .next-address-row {
  display: flex;
  gap: 11px;
}

[data-next-address-state="loading"] {
  min-height: 115px;
}

/* Apartment and phone stay out of the way until the street is filled, like v1 */
[data-next-address]:has(.next-location-hidden) .next-address-row:has(> [data-next-address-field="address2"]),
[data-next-address]:has(.next-location-hidden) .next-address-row:has(> [data-next-address-field="phone"]) {
  display: none;
}

[data-next-address] .next-address-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.next-address-control {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 15px;
  line-height: 23px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.next-address-control::placeholder {
  color: #2b2b2b;
  opacity: 1;
}

.next-address-control:focus {
  border-color: #000;
}

.next-address-control.has-error {
  border-color: #e23d3d;
}

/* Value centered like the text inputs */
select.next-address-control {
  padding: 0 44px 0 15px;
  cursor: pointer;
}

/* Figma: the country value is semibold */
[data-next-address-field="country"] select.next-address-control {
  font-weight: 600;
}

/* Floating label: always on selects, on inputs once they hold a value */
.next-address-label {
  position: absolute;
  top: -9px;
  left: 11px;
  z-index: 1;
  padding: 0 4px 0 5px;
  background: #fff;
  color: #2b2b2b;
  font-size: 13px;
  line-height: 20px;
  pointer-events: none;
}

input.next-address-control:placeholder-shown + .next-address-label {
  display: none;
}

[data-next-address] .next-address-field:has(> select)::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 21px;
  width: 16px;
  height: 10px;
  background: url("../images/v2/caret.svg") center / 13.86px 7.5px no-repeat;
  transform: rotate(180deg);
  pointer-events: none;
}

[data-next-address="shipping"] [data-next-address-field="address1"] .next-address-control {
  padding-right: 44px;
}

[data-next-address="shipping"] [data-next-address-field="address1"]::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 22px;
  width: 14px;
  height: 14px;
  background: url("../images/v2/search.svg") center / contain no-repeat;
  pointer-events: none;
}

[data-next-address] .next-error-label {
  display: block;
  margin-top: 4px;
  color: #e23d3d;
  font-size: 12px;
}

.hb-shipping .hb-address {
  margin-top: 2px;
}

.hb-input.spreedly-field {
  padding: 0;
  overflow: hidden;
}

.spreedly-field iframe {
  width: 100% !important;
  height: 48px !important;
}

/* Card number / Security code placeholders. The hosted iframes cannot load Poppins (their CSP has no font-src),
   so the placeholder is a page label over the empty field: the SDK links a .label-checkout next to a card mount
   with data-label-behavior="placeholder" and adds .has-value on focus or input (the iframe placeholder is blank
   in config.js). The SDK also sets padding-top: 14px on the mount for floating labels; keep it at 0. */
.hb-input.spreedly-field[data-label-behavior] {
  padding-top: 0 !important;
}

.hb-card-placeholder {
  position: absolute;
  top: 50%;
  left: 16px;
  color: #2b2b2b;
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hb-field--cvv .hb-card-placeholder {
  left: 14px;
}

.hb-card-placeholder.has-value {
  visibility: hidden;
}

.hb-field__icon {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

.hb-field--cvv .hb-field__icon {
  right: 16px;
}

/* ---------- Payment ---------- */
.hb-payment {
  margin-top: 34px;
  background: #f2f2f2;
}

.hb-payment__header {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 16px 0 15px;
  border: 1px solid #141414;
  cursor: pointer;
}

.hb-payment__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hb-payment__radio-icon {
  width: 24px;
  height: 24px;
}

.hb-payment__title {
  margin-left: 9px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.hb-payment__brands {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #6a6a6a;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.hb-payment__form {
  padding: 20px 16px 15px 17px;
}

.hb-row--card {
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 11px;
}

.hb-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  cursor: pointer;
}

.hb-check__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hb-check__box {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
}

.hb-check__input:checked + .hb-check__box {
  border: 0;
  background: url("../images/v2/checkbox-checked.svg") center / 26px 26px no-repeat;
}

.hb-check__label {
  font-size: 14px;
  line-height: 21px;
}

/* The SDK opens/closes this block with inline height (0px <-> auto) when
   use_shipping_address changes; it stays collapsed until the SDK sets it up. */
.hb-billing {
  height: 0;
  overflow: hidden;
}

.hb-billing__title {
  margin: 16px 0 12px;
  font-size: 18px;
}

/* ?banner=n hides the promo banner and promo bar, ?reviews=n the reviews block */
.hb-no-banner promo-banner,
.hb-no-banner promo-timer,
.hb-no-reviews .hb-reviews {
  display: none !important;
}

/* ---------- Order bumps ---------- */
.hb-bump {
  margin-top: 26px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.hb-bump--warranty {
  margin-top: 25px;
}

.hb-bump__header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 15px;
  background: #f8e69d;
  cursor: pointer;
  user-select: none;
}

.hb-bump__check {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
}

[data-next-toggle-card].next-selected .hb-bump__check {
  border: 0;
  background: url("../images/v2/checkbox-checked.svg") center / 26px 26px no-repeat;
}

.hb-bump__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 23px;
}

.hb-bump__body {
  position: relative;
  padding: 18px 15px 13px 15px;
}

.hb-bump__prices {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding-left: 6px;
  font-size: 22px;
  line-height: 32px;
}

.hb-bump__price {
  font-weight: 700;
}

.hb-bump__compare {
  color: #373737;
  text-decoration: line-through;
}

.hb-bump__note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid #ededed;
  margin-right: 13px;
}

.hb-bump__note img {
  flex: 0 0 59px;
  width: 59px;
  height: 50px;
  object-fit: cover;
}

.hb-bump__note p {
  padding-top: 6px;
  font-size: 14px;
  line-height: 21px;
}

.hb-bump__note b {
  display: block;
  color: #b73339;
  font-weight: 700;
}

.hb-bump__list {
  margin-top: 4px;
  padding-left: 22.5px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 28px;
}

.hb-bump--warranty .hb-bump__body {
  padding-bottom: 12px;
}

.hb-bump__badge {
  position: absolute;
  top: 29px;
  right: 30px;
  width: 132px;
  height: 132px;
}

/* ---------- CTA + trust badges ---------- */
.hb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  height: 60px;
  margin-top: 17px;
  border: 1px solid #ddb107;
  border-radius: 8px;
  background: #ffd431;
  box-shadow: 0 2px 0 0 #d7d7d7;
  color: #000;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.hb-cta:hover {
  filter: brightness(0.97);
}

.hb-cta__lock {
  width: 22px;
  height: 27px;
}

.hb-cta__text {
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
  letter-spacing: 2.16px;
  text-transform: uppercase;
}

.hb-badges {
  display: flex;
  gap: 17.9px;
  margin-top: 22px;
  padding-left: 100px;
}

.hb-badges__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5c5c5e;
  font-size: 12px;
  font-weight: 600;
  line-height: 13px;
  letter-spacing: 2.4px;
}

.hb-badges__item:first-child {
  gap: 6.5px;
}

.hb-badges__item:first-child img {
  width: 20.5px;
  height: 24.4px;
}

.hb-payment-strip {
  width: 458px;
  height: 34px;
  margin: 16px 0 0 39px;
}

/* ---------- Order summary ---------- */
.hb-summary {
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
}

.hb-summary--desktop {
  margin-top: 0;
}

.hb-summary__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 48px;
  padding: 0 18px 0 15px;
  border: 0;
  background: none;
  font-size: 18px;
  font-weight: 600;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.hb-summary__caret {
  width: 14px;
  height: 8px;
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.hb-summary.is-open .hb-summary__caret {
  transform: none;
}

.hb-summary__body {
  display: none;
  padding: 14px 15px 23px 16px;
  border-top: 1px solid #d6d6d6;
}

.hb-summary.is-open .hb-summary__body {
  display: block;
}

.hb-summary__items {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 9px 0 0 3px;
}

/* Figma order: feeder, SD card, warranty - whatever order the lines entered the cart */
.hb-line[data-package-id="12"] {
  order: 1;
}

.hb-line[data-package-id="4"] {
  order: 2;
}

.hb-line {
  display: grid;
  grid-template-columns: 73px 1fr auto;
  align-items: center;
  column-gap: 17px;
}

.hb-line__thumb {
  position: relative;
  width: 73px;
  height: 73px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #fff;
}

.hb-line__thumb img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.hb-line__qty {
  position: absolute;
  top: -10px;
  right: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #36679e;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.hb-line__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}

.hb-line__prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}

.hb-line__compare {
  color: #4b4b4b;
  font-size: 14px;
  line-height: 17px;
  text-decoration: line-through;
}

.hb-line__price {
  color: #222;
  font-size: 15px;
  line-height: 18px;
}

.hb-summary__row,
.hb-summary__savings,
.hb-summary__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hb-summary__row {
  margin-top: 24px;
  font-size: 15px;
  line-height: 23px;
}

.hb-summary__savings {
  height: 36px;
  margin-top: 13px;
  padding: 0 0 0 1px;
  border-top: 1px solid #d6d6d6;
  border-bottom: 1px solid #d6d6d6;
  background: #fffee3;
  font-size: 15px;
}

.hb-summary__savings-value {
  color: #0a9c6c;
  font-weight: 700;
}

.hb-summary__savings-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hb-summary__savings-row img {
  width: 15px;
  height: 15px;
  margin-right: 3px;
}

/* Exit offer applied (exit tier selected): Figma "display after exit pop applied" */
[data-hb-exit-only] {
  display: none !important;
}

.hb-exit-applied .hb-offer__extra[data-hb-exit-only] {
  display: block !important;
}

.hb-exit-applied .hb-summary__savings-row[data-hb-exit-only] {
  display: flex !important;
}

.hb-exit-applied .hb-summary__savings {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  height: auto;
  padding-top: 6px;
  padding-bottom: 6px;
}

.hb-summary__total {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 27px;
}

/* ---------- Side column ---------- */
.hb-divider-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  white-space: nowrap;
}

.hb-divider-title::before,
.hb-divider-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #aeaeae;
}

.hb-promise {
  margin-top: 29px;
}

.hb-promise .hb-divider-title::before,
.hb-promise .hb-divider-title::after {
  flex: 0 0 107px;
}

.hb-promise .hb-divider-title {
  justify-content: space-between;
}

.hb-promise__item {
  display: grid;
  grid-template-columns: 77px 1fr;
  column-gap: 16px;
  align-items: start;
  margin-top: 19px;
}

.hb-promise__item:nth-of-type(2) {
  margin-top: 36px;
}

.hb-promise__item:nth-of-type(3) {
  margin-top: 26px;
}

/* Figma text-box widths drive the line breaks */
.hb-promise__item:nth-of-type(1) p {
  max-width: 324px;
}

.hb-promise__item:nth-of-type(2) p {
  max-width: 340px;
}

.hb-promise__item h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 23px;
}

.hb-promise__item p {
  margin-top: 7px;
  font-size: 15px;
  line-height: 23px;
}

.hb-promise__badge {
  width: 66px;
  height: 73px;
  margin: 4px 0 0 16px;
}

.hb-promise__box {
  width: 66px;
  height: 61px;
  margin: 3px 0 0 6px;
}

.hb-promise__hand {
  width: 63px;
  height: 59px;
  margin: 1px 0 0 8px;
}

.hb-reviews {
  margin-top: 42px;
}

.hb-divider-title--reviews {
  font-size: 20px;
}

.hb-divider-title--reviews::before,
.hb-divider-title--reviews::after {
  flex: 0 0 50px;
  margin-top: -5px;
}

.hb-stars {
  display: flex;
  justify-content: center;
  gap: 1.75px;
  margin-top: 4px;
}

.hb-stars img {
  width: 15px;
  height: 15px;
}

.hb-stars--left {
  justify-content: flex-start;
  margin-top: 8px;
}

.hb-reviews__based {
  margin-top: 8px;
  font-size: 14px;
  line-height: 21px;
  text-align: center;
}

.hb-video {
  width: 451px;
  height: 451px;
  margin-top: 19px;
  border-radius: 4px;
  overflow: hidden;
  background: #222;
}

.hb-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hb-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}

.hb-review {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 19px 20px 19px 13px;
  border: 1px solid #ececec;
  border-radius: 4px;
  background: #fff;
}

.hb-review:nth-child(2) {
  min-height: 222px;
}

.hb-review > img {
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  margin-top: 4px;
  object-fit: cover;
}

.hb-review__body {
  flex: 1 1 auto;
  min-width: 0;
}

.hb-review__body h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 23px;
}

.hb-review + .hb-review h3 {
  height: 27px;
}

.hb-review__body p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 23px;
}

.hb-review__author {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 23px;
}

.hb-review__author b {
  font-weight: 700;
}

.hb-review__author i {
  width: 1px;
  height: 9px;
  background: #000;
}

.hb-review__author img {
  width: 14px;
  height: 13px;
}

/* ---------- Footer ---------- */
.hb-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 112px;
  background: #000;
  color: #a8a8a8;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 15px;
  text-align: center;
}

.hb-footer a {
  color: inherit;
  text-decoration: none;
}

.hb-footer a:hover {
  text-decoration: underline;
}

/* ================= Tablet: shrink columns before stacking ================= */
@media (max-width: 1199px) and (min-width: 992px) {
  .hb-main {
    flex-basis: 56%;
    padding-left: 24px;
    padding-right: 32px;
  }

  .hb-main__inner {
    width: auto;
    max-width: 542px;
  }

  .hb-side {
    padding-right: 24px;
  }

  .hb-side__inner {
    width: auto;
    max-width: 451px;
  }

  .hb-video {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .hb-payment-strip {
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  .hb-header__inner {
    padding: 0 24px;
  }

  .hb-promise .hb-divider-title::before,
  .hb-promise .hb-divider-title::after,
  .hb-divider-title--reviews::before,
  .hb-divider-title--reviews::after {
    flex: 1 1 20px;
  }

  .hb-divider-title {
    white-space: normal;
  }
}

/* Mobile layout on wider screens: keep the 375 composition, centred */
@media (min-width: 576px) and (max-width: 991px) {
  .hb-main .hb-main__inner,
  .hb-side .hb-side__inner {
    max-width: 560px;
    margin: 0 auto;
  }
}

/* ================= Mobile (Figma 375 board) ================= */
@media (max-width: 991px) {
  body,
  .hb-main {
    background: #fafafa;
  }

  .hb-float-label,
  .next-address-label,
  .hb-express__label {
    background: #f8f8f8;
  }

  .hb-header {
    border-bottom: 0;
  }

  .hb-header__inner {
    justify-content: center;
    height: 64px;
    padding-top: 1px;
  }

  .hb-header__logo {
    width: 185px;
    height: 28px;
  }

  .hb-header__secure {
    display: none;
  }

  .hb-layout {
    display: block;
  }

  .hb-main {
    padding: 15px 0 0;
  }

  .hb-main__inner {
    width: auto;
    margin: 0;
  }

  .hb-main__inner > * {
    margin-left: 16px;
    margin-right: 16px;
  }

  .hb-timer {
    margin-top: -5px;
  }

  .hb-demand {
    height: 37px;
    margin-top: 3px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
  }

  .hb-main__inner > .hb-offer-selector {
    margin: 14px 0 0 1px;
  }

  .hb-offer {
    height: auto;
    aspect-ratio: 374 / 349;
    margin-top: 0;
    border-radius: 0;
  }

  .hb-offer__header {
    gap: 4px;
    height: 42px;
    padding-left: 50px;
  }

  .hb-offer__check {
    top: 58px;
    left: 14px;
  }

  .hb-offer__prices {
    top: 55px;
    right: 17px;
    min-width: 114px;
  }

  .hb-offer__compare {
    min-height: 23px;
    margin-right: 2px;
    font-size: 15px;
    line-height: 23px;
  }

  .hb-offer__price {
    min-height: 23px;
    margin-top: 3px;
    font-size: 28px;
    line-height: 23px;
  }

  .hb-offer__save {
    min-height: 23px;
    margin-top: 3px;
    font-size: 15px;
    line-height: 23px;
  }

  /* Trust row */
  .hb-main__inner > .hb-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 19px 0 0;
    padding: 0 0 28px;
  }

  .hb-trust__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 106px;
    padding-top: 4px;
  }

  .hb-trust__item + .hb-trust__item {
    border-left: 1px solid #ddd;
  }

  .hb-trust__item p {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    line-height: 15px;
    text-align: center;
  }

  /* Three lines: top-aligned with the other titles, running below the row */
  .hb-trust__item:nth-child(3) p {
    max-width: 113px;
    margin-bottom: -15px;
  }

  .hb-trust__badge {
    width: 56px;
    height: 62px;
  }

  .hb-trust__box {
    width: 66px;
    height: 55px;
  }

  .hb-trust__hand {
    width: 54px;
    height: 54px;
  }

  .hb-main__inner > .hb-secure-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 38px;
    margin: 0;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
  }

  .hb-secure-bar img {
    width: 11px;
    height: 14px;
    margin-top: -2px;
  }

  /* Express */
  .hb-express {
    margin-top: 37px;
    padding: 19px 10px 16px;
  }

  .hb-express__label {
    top: -10px;
    font-size: 15px;
    line-height: 18px;
  }

  .hb-express__buttons,
  .hb-express__buttons:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Three stacked buttons until the SDK says which wallets the device has */
  .hb-express__buttons:not(:has(> *)) {
    min-height: 176px;
  }

  .hb-express__buttons .payment-btn,
  .hb-express__buttons button {
    height: 48px;
  }

  /* Shipping */
  .hb-section {
    margin-top: 29px;
  }

  .hb-section__title {
    font-size: 18px;
    font-weight: 800;
    line-height: 27px;
  }

  .hb-section__subtitle {
    margin-top: 4px;
    font-size: 14px;
    line-height: 21px;
  }

  .hb-shipping .hb-grid {
    margin-top: 17px;
    gap: 12px;
  }

  .hb-shipping .hb-field--floating {
    margin-top: 8px;
  }

  .hb-row--2,
  .hb-row--3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hb-input {
    padding: 0 12px;
  }

  .hb-select--strong {
    padding: 13px 44px 0 14px;
  }

  [data-next-address] {
    gap: 12px;
  }

  [data-next-address] .next-address-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  [data-next-address] .next-address-row > .next-address-field {
    flex: 1 1 100% !important;
  }

  .next-address-control {
    padding: 0 12px;
  }

  select.next-address-control {
    padding: 0 44px 0 14px;
  }

  .next-address-label {
    left: 10px;
  }

  .hb-shipping .hb-address {
    margin-top: 8px;
  }

  .hb-float-label {
    left: 10px;
  }

  /* Field icons (Figma 375) */
  .hb-field--select::after {
    top: 24px;
    right: 14px;
  }

  [data-next-address] .next-address-field:has(> select)::after {
    right: 12px;
  }

  [data-next-address="shipping"] [data-next-address-field="address1"]::after {
    right: 14px;
  }

  /* Payment */
  .hb-payment {
    margin-top: 23px;
  }

  .hb-payment__header {
    padding: 0 12px 0 11px;
  }

  .hb-payment__title {
    margin-left: 6px;
  }

  .hb-payment__brands {
    gap: 0;
  }

  .hb-payment__brands img {
    width: 152px;
  }

  .hb-payment__brands span {
    display: none;
  }

  .hb-payment__form {
    padding: 23px 13px 20px 13px;
  }

  .hb-row--card {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
  }

  .hb-row--card .hb-field--select {
    margin-right: 3px;
  }

  .hb-row--card .hb-select {
    padding-left: 15px;
  }

  .hb-check {
    gap: 8px;
    margin-top: 23px;
  }

  /* Bumps */
  /* Figma: 341px boxes (1px narrower each side than the other blocks) */
  .hb-main__inner > .hb-bump {
    margin-top: 23px;
    margin-left: 17px;
    margin-right: 17px;
  }

  .hb-bump--warranty {
    margin-top: 23px;
  }

  .hb-bump__header {
    gap: 10px;
    height: 62px;
    padding: 0 11px;
  }

  .hb-bump--warranty .hb-bump__header {
    height: 53px;
  }

  .hb-bump__title {
    font-size: 16px;
    line-height: 21px;
  }

  .hb-bump--warranty .hb-bump__title {
    line-height: 20px;
  }

  .hb-bump__body {
    padding: 8px 12px 16px 12px;
  }

  .hb-bump--warranty .hb-bump__body {
    padding-top: 9px;
    padding-bottom: 23px;
  }

  .hb-bump__prices {
    gap: 14px;
    padding-left: 5px;
    font-size: 20px;
  }

  .hb-bump--warranty .hb-bump__prices {
    gap: 6px;
  }

  .hb-bump--sd .hb-bump__body {
    padding-bottom: 7px;
  }

  .hb-bump__note {
    gap: 13px;
    margin: 7px 0 0;
    padding: 5px 0 0 2px;
  }

  .hb-bump__note img {
    margin-top: 5px;
  }

  .hb-bump__note p {
    max-width: 244px;
    padding-top: 0;
  }

  .hb-bump__list {
    margin-top: 3px;
    padding-left: 22px;
    padding-right: 64px;
    font-size: 14px;
    line-height: 27px;
  }

  .hb-bump__badge {
    top: 9px;
    right: 13px;
    width: 91px;
    height: 91px;
  }

  /* Mobile summary */
  .hb-main__inner > .hb-summary--mobile {
    display: block;
    margin-top: 23px;
  }

  .hb-summary__toggle {
    height: 48px;
    padding: 0 13px 0 18px;
  }

  .hb-summary__body {
    padding: 12px 13px 16px 16px;
  }

  .hb-summary__items {
    gap: 18px;
    padding: 11px 0 0 3px;
  }

  .hb-summary__row {
    margin-top: 19px;
  }

  .hb-summary__total {
    margin-top: 10px;
  }

  .hb-summary__savings {
    height: 35px;
    margin-left: -7px;
    margin-right: -3px;
    padding-right: 3px;
  }

  /* Figma: 175px name column (one-line "1x 64GB Micro SD Card"), names 8px above the thumb centre */
  .hb-line {
    grid-template-columns: 73px 192px minmax(0, 1fr);
    column-gap: 0;
  }

  .hb-line__name {
    margin-bottom: 16px;
    padding-left: 17px;
  }

  .hb-line__compare {
    line-height: 21px;
  }

  .hb-line__price {
    line-height: 22px;
  }

  .hb-summary__row {
    line-height: 22px;
  }

  .hb-summary__total {
    line-height: 18px;
  }

  /* CTA */
  .hb-main__inner > .hb-cta {
    width: calc(100% - 32px);
    height: 66px;
    margin-top: 20px;
  }

  .hb-cta__lock {
    display: none;
  }

  .hb-cta__text {
    font-size: 18px;
    line-height: 23px;
    letter-spacing: 0.9px;
  }

  .hb-mobile-break {
    display: inline;
  }

  /* Figma 375: lock x73, shield x195 */
  .hb-badges {
    gap: 11.9px;
    margin-top: 17px;
    padding-left: 57px;
  }

  .hb-badges__item {
    gap: 6px;
    font-size: 8px;
    line-height: 9px;
    letter-spacing: 1.6px;
  }

  .hb-badges__item:first-child {
    gap: 6px;
  }

  .hb-badges__item:first-child img {
    width: 16px;
    height: 20px;
  }

  .hb-badges__item + .hb-badges__item img {
    width: 18px;
    height: 20px;
  }

  .hb-main__inner > .hb-payment-strip {
    width: 320px;
    height: auto;
    margin: 14px auto 0;
  }

  /* Side column becomes the reviews block */
  .hb-side {
    padding: 0 16px;
    border-left: 0;
    background: #fafafa;
  }

  .hb-side__inner {
    width: auto;
  }

  .hb-summary--desktop,
  .hb-promise {
    display: none;
  }

  .hb-reviews {
    margin-top: 29px;
  }

  .hb-divider-title--reviews {
    font-size: 18px;
    line-height: 22px;
    white-space: normal;
  }

  .hb-divider-title--reviews::before,
  .hb-divider-title--reviews::after {
    flex: 0 0 64px;
    align-self: flex-start;
    margin-top: 12px;
  }

  .hb-reviews > .hb-stars {
    margin-top: 11px;
  }

  .hb-reviews__based {
    margin-top: 6px;
  }

  .hb-video {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin-top: 15px;
  }

  .hb-review-list {
    gap: 10px;
    margin: 23px -1px 0 2px;
  }

  .hb-review {
    gap: 15px;
    padding: 11px 11px 11px 13px;
  }

  .hb-review > img {
    flex-basis: 90px;
    width: 90px;
    height: 90px;
    margin-top: 3px;
  }

  .hb-review__body h3,
  .hb-review + .hb-review h3 {
    height: auto;
    line-height: 23px;
  }

  .hb-review__body p {
    margin-top: 8px;
  }

  .hb-footer {
    gap: 9px;
    height: 104px;
    margin-top: 186px;
    font-family: "Inter", sans-serif;
  }
}

@media (max-width: 374px) {
  .hb-payment__brands img {
    width: 128px;
  }
}

/* ================= Desktop order summary, open (Figma 2037:494) ================= */
@media (min-width: 992px) {
  .hb-summary--desktop .hb-summary__toggle {
    height: 47px;
    padding: 0 18px 0 16px;
  }

  .hb-summary--desktop .hb-summary__body {
    margin: 0 17px;
    padding: 0 0 13px;
    border-top: 1px solid #d6d6d6;
  }

  .hb-summary--desktop .hb-summary__items {
    gap: 17px;
    padding: 25px 1px 0 0;
  }

  .hb-summary--desktop .hb-line {
    grid-template-columns: 73px 1fr auto;
    column-gap: 27px;
  }

  .hb-summary--desktop .hb-line__thumb {
    background: #f6f6f6;
  }

  .hb-summary--desktop .hb-line[data-package-id="4"] .hb-line__thumb,
  .hb-summary--desktop .hb-line[data-package-id="12"] .hb-line__thumb {
    background: #fff;
  }

  .hb-summary--desktop .hb-line__qty {
    top: -9px;
    right: -12px;
    background: #36679e;
  }

  .hb-summary--desktop .hb-line__name {
    font-size: 16px;
    line-height: 20px;
  }

  .hb-summary--desktop .hb-line__prices {
    gap: 7px;
  }

  .hb-summary--desktop .hb-line__compare,
  .hb-summary--desktop .hb-line__price {
    line-height: 15px;
  }

  .hb-summary--desktop .hb-summary__row {
    margin-top: 15px;
    font-size: 15px;
    line-height: 24px;
  }

  /* The yellow band runs past the dividers: 11px left, 8px right */
  .hb-summary--desktop .hb-summary__savings {
    position: relative;
    height: 35px;
    margin: 10px -8px 0 -11px;
    padding: 0 8px 0 11px;
    border: 0;
    font-size: 16px;
  }

  .hb-summary--desktop .hb-summary__savings::before,
  .hb-summary--desktop .hb-summary__savings::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 8px;
    height: 1px;
    background: #d6d6d6;
  }

  .hb-summary--desktop .hb-summary__savings::before {
    top: 1px;
  }

  .hb-summary--desktop .hb-summary__savings::after {
    bottom: 0;
  }

  .hb-exit-applied .hb-summary--desktop .hb-summary__savings {
    height: 69px;
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 8px;
  }

  .hb-summary--desktop .hb-summary__savings-row {
    line-height: 23px;
  }

  .hb-summary--desktop .hb-summary__total {
    margin-top: 12px;
  }
}
