/*
 * BuyBackEmpire — "Second Life" design
 * One stylesheet for the whole customer-facing site. Responsive refinements live in mediaqueries.css.
 *
 * Palette   forest #0c3b2e / #072a20 · chalk #eef3ef · mint #d8f0e2 · coral #ff6b57 (the quote button)
 * Type      Bricolage Grotesque (headlines) + Instrument Sans (text)
 * Idea      A device's second life is a loop: rings, tags and a single coral action.
 */

:root {
  --bb-forest: #0c3b2e;
  --bb-forest-deep: #072a20;
  --bb-forest-soft: #155240;
  --bb-forest-line: rgba(216, 240, 226, 0.16);
  --bb-ink: #0b2b21;
  --bb-ink-muted: #4a5f56;
  --bb-chalk: #eef3ef;
  --bb-paper: #ffffff;
  --bb-mint: #d8f0e2;
  --bb-mint-deep: #b4e2c7;
  --bb-coral: #ff6b57;
  --bb-coral-hover: #ff8371;
  --bb-coral-press: #f2543f;
  --bb-line: #d3dfd8;
  --bb-line-strong: #b4c6bb;
  --bb-success: #1e7b4f;
  --bb-danger: #b42318;
  --bb-warning: #f2b632;

  /* Legacy token names, kept so any older markup keeps resolving */
  --bb-ink-deep: var(--bb-forest-deep);
  --bb-surface: var(--bb-paper);
  --bb-surface-soft: var(--bb-chalk);
  --bb-surface-warm: var(--bb-chalk);
  --bb-border: var(--bb-line);
  --bb-border-strong: var(--bb-line-strong);
  --bb-brand: var(--bb-forest);
  --bb-brand-hover: var(--bb-forest-soft);
  --bb-brand-soft: var(--bb-mint);
  --bb-accent: var(--bb-coral);

  --bb-font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bb-font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bb-shadow-sm: 0 2px 10px rgba(7, 42, 32, 0.06);
  --bb-shadow-md: 0 18px 44px rgba(7, 42, 32, 0.14);
  --bb-radius-sm: 12px;
  --bb-radius: 18px;
  --bb-radius-lg: 30px;
  --bb-container: 1180px;
  --bb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--bb-forest) var(--bb-chalk);
}

/* Custom scrollbar: WebKit/Blink get the styled version, Firefox uses the standard properties above */
@supports selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }

  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bb-chalk);
    border-left: 1px solid var(--bb-line);
  }

  ::-webkit-scrollbar-thumb {
    min-height: 44px;
    border: 3px solid var(--bb-chalk);
    border-radius: 999px;
    background: var(--bb-forest);
  }

  ::-webkit-scrollbar-thumb:hover,
  ::-webkit-scrollbar-thumb:active {
    background: var(--bb-coral);
  }

  ::-webkit-scrollbar-corner {
    background: var(--bb-chalk);
  }
}

body.body-text {
  margin: 0;
  overflow-x: hidden;
  background: var(--bb-paper);
  color: var(--bb-ink);
  font-family: var(--bb-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.cbp-spmenu-push-toleft {
  overflow: hidden;
}

body .container {
  width: 100%;
  max-width: var(--bb-container);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--bb-ink);
  font-family: var(--bb-font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

img {
  max-width: 100%;
}

a {
  color: var(--bb-forest);
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

a:hover,
a:focus {
  color: var(--bb-forest-soft);
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--bb-forest);
  outline-offset: 3px;
}

.hero-visual a:focus-visible,
.steps-section a:focus-visible,
.cta-band a:focus-visible,
footer a:focus-visible,
.cbp-spmenu a:focus-visible,
.cbp-spmenu button:focus-visible {
  outline-color: var(--bb-mint);
}

.cta-band a:focus-visible {
  outline-color: var(--bb-forest);
}

::selection {
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
}

/* ------------------------------------------------------------------
   Loading screen (dismissed by slider.js; CSS fallback if JS fails)
   ------------------------------------------------------------------ */
.page-loader {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bb-forest-deep);
  transition: transform 700ms cubic-bezier(0.7, 0, 0.2, 1), visibility 0s linear 700ms;
  animation: bb-loader-failsafe 0.01s linear 3.4s forwards;
}

.page-loader-ring {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  border: 3px solid rgba(180, 226, 199, 0.22);
  border-top-color: var(--bb-coral);
  border-radius: 50%;
  animation: bb-spin 0.85s linear infinite;
}

.page-loader-ring::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--bb-mint);
  content: "";
  animation: bb-pulse 1.6s ease-in-out infinite;
}

html.is-ready .page-loader {
  visibility: hidden;
  transform: translateY(-100%);
}

@keyframes bb-spin {
  to { transform: rotate(360deg); }
}

@keyframes bb-pulse {
  0%, 100% { transform: scale(0.7); opacity: 0.6; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes bb-loader-failsafe {
  to { visibility: hidden; opacity: 0; pointer-events: none; }
}

/* ------------------------------------------------------------------
   Scroll reveal (progressive: only hidden when JS is running)
   ------------------------------------------------------------------ */
html.js [data-reveal] {
  opacity: 0;
}

html.js [data-reveal].is-visible {
  opacity: 1;
  animation: bb-reveal 650ms var(--bb-ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes bb-reveal {
  from { opacity: 0; transform: translateY(16px); }
}

@keyframes bb-rise {
  from { opacity: 0; transform: translateY(26px); }
}

@keyframes bb-device-in {
  from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 28px)); }
}

@keyframes bb-arc-draw {
  from { stroke-dashoffset: 100; }
}

@keyframes bb-chip-in {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn {
  border-radius: 999px;
  font-family: var(--bb-font-body);
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--bb-ease);
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn-primary,
.home-search-form .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(7, 42, 32, 0.18), 0 8px 18px rgba(255, 107, 87, 0.3);
}

.btn-primary:hover,
.btn-primary:focus,
.home-search-form .btn-primary:hover,
.home-search-form .btn-primary:focus {
  border: 0;
  background: var(--bb-coral-hover);
  color: var(--bb-forest-deep);
  box-shadow: 0 1px 0 rgba(7, 42, 32, 0.18), 0 12px 24px rgba(255, 107, 87, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  border: 0;
  background: var(--bb-coral-press);
  color: var(--bb-forest-deep);
  transform: translateY(1px) scale(0.985);
}

.btn-primary:disabled,
.btn-primary.disabled {
  opacity: 0.55;
  transform: none;
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.75rem 1.9rem;
  border: 0;
  background: var(--bb-forest-deep);
  color: var(--bb-mint);
  font-size: 1rem;
}

.btn-ink:hover,
.btn-ink:focus {
  background: var(--bb-forest);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.5rem;
  border: 2px solid var(--bb-forest);
  background: transparent;
  color: var(--bb-forest);
}

.btn-outline:hover,
.btn-outline:focus {
  background: var(--bb-forest);
  color: #fff;
}

/* ------------------------------------------------------------------
   Demo notice
   ------------------------------------------------------------------ */
.demo-banner {
  position: relative;
  z-index: 1035;
  padding: 7px 0;
  border-bottom: 1px solid var(--bb-mint-deep);
  background: var(--bb-mint);
  color: var(--bb-forest);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

.demo-banner p {
  position: relative;
  max-width: var(--bb-container);
  margin: 0 auto;
  padding: 0 36px 0 20px;
}

.demo-banner strong {
  font-weight: 800;
}

.demo-banner .close-banner {
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--bb-forest);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-50%);
}

.demo-banner .close-banner:hover {
  color: var(--bb-danger);
}

/* ------------------------------------------------------------------
   Header and primary navigation
   ------------------------------------------------------------------ */
header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 14px 0 0;
  background: transparent;
  pointer-events: none;
}

header > .navbar {
  pointer-events: auto;
}

.navbar {
  min-height: 0;
  padding: 0;
  background: transparent;
}

/* The navigation is a floating capsule with a hard offset shadow. */
.navbar > .container {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: calc(100% - 24px);
  max-width: 1180px;
  min-height: 68px;
  padding: 8px 10px 8px 22px;
  gap: 12px;
  border: 2px solid var(--bb-ink);
  border-radius: 999px;
  background: var(--bb-paper);
  box-shadow: 5px 5px 0 var(--bb-forest);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

header.is-scrolled .navbar > .container {
  box-shadow: 3px 3px 0 var(--bb-forest);
  transform: translateY(-2px);
}

.logo,
.logo:hover {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.logo-padding {
  padding: 0;
}

.logo-img-lg,
.logo-img-default {
  display: block;
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 44px;
}

.main-menu,
.icon-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar .main-menu {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 4px;
}

.navbar .main-menu > li {
  margin: 0;
}

.navbar .main-menu .item {
  position: relative;
  display: block;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--bb-ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

.navbar .main-menu .item::after {
  display: none;
}

.navbar .main-menu .item:hover,
.navbar .main-menu .item:focus {
  background: var(--bb-mint);
  color: var(--bb-forest);
}

.navbar .main-menu li.active .item {
  background: var(--bb-forest);
  color: #fff;
}

.navbar .icon-menu {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.icon-menu > li {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}

.icon-menu > li:not(.nav-cta) > a,
.icon-menu .toggle-btn button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--bb-ink);
  cursor: pointer;
  text-decoration: none;
}

.icon-menu > li:not(.nav-cta) > a:hover,
.icon-menu > li:not(.nav-cta) > a:focus,
.icon-menu .toggle-btn button:hover,
.icon-menu .toggle-btn button:focus {
  background: var(--bb-mint);
  color: var(--bb-forest);
}

.icon-user,
.icon-search,
.icon-cart {
  width: 20px;
  height: 20px;
  font-size: 1.08rem;
  line-height: 20px;
  text-align: center;
  object-fit: contain;
}

.icon-menu .sale-link {
  width: auto;
  height: 42px;
  gap: 6px;
  padding: 0 12px 0 11px;
  border-radius: 999px;
  color: var(--bb-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-menu > li > .sale-link {
  width: auto;
}

.sale-link-text {
  line-height: 1;
}

.icon-menu .cart .sale-link-text {
  position: static;
  display: inline;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.icon-menu .cart {
  position: relative;
}

.icon-menu .cart span {
  position: absolute;
  top: 1px;
  right: -1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid var(--bb-paper);
  border-radius: 99px;
  background: var(--bb-forest);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.icon-menu .cart span:empty {
  display: none;
}

.icon-menu .nav-cta {
  margin-left: 10px;
}

.btn-nav,
.btn-nav:hover {
  min-height: 44px;
  padding: 0.55rem 1.3rem;
  font-size: 0.93rem;
  text-decoration: none;
}

.icon-menu .submenu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 5;
  display: none;
  min-width: 190px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow-md);
}

.icon-menu .submenu::before {
  position: absolute;
  top: -14px;
  right: 0;
  left: 0;
  height: 14px;
  content: "";
}

.icon-menu .user:hover .submenu,
.icon-menu .user:focus-within .submenu,
.icon-menu .user.is-open .submenu {
  display: block;
  animation: bb-chip-in 200ms var(--bb-ease);
}

.icon-menu .submenu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.icon-menu .submenu a:hover,
.icon-menu .submenu a:focus {
  background: var(--bb-mint);
  color: var(--bb-forest);
}

.icon-menu .submenu .cart {
  display: none;
}

.toggle-btn {
  display: none !important;
}

/* Header search retains the JavaScript IDs */
.search-form-top {
  position: absolute;
  top: calc(100% + 8px);
  right: 15px;
  display: none;
  width: min(460px, calc(100vw - 30px));
  padding: 12px;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow-md);
}

.search-form-top.active {
  display: block;
}

.search-form-top .input-group {
  display: flex;
  flex-wrap: nowrap;
}

.search-form-top .form-control {
  height: 48px;
  min-width: 0;
  padding-left: 18px;
  border: 2px solid var(--bb-line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: var(--bb-chalk);
  box-shadow: none;
  color: var(--bb-ink);
  font-size: 0.95rem;
}

.search-form-top .form-control:focus {
  border-color: var(--bb-forest);
  background: var(--bb-paper);
}

.search-form-top .input-group-append {
  display: flex;
}

.search-form-top .input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 48px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  box-shadow: none;
}

.search-form-top .input-group-text:hover,
.search-form-top .input-group-text:focus {
  background: var(--bb-coral-hover);
  color: var(--bb-forest-deep);
  transform: none;
  box-shadow: none;
}

#suggestions-list2,
#suggestions-list {
  position: absolute;
  z-index: 1040;
  right: 0;
  left: 0;
  max-height: 264px;
  margin: 6px 0 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow-md);
  text-align: left;
}

#suggestions-list2:empty,
#suggestions-list:empty {
  display: none;
}

#suggestions-list2 li,
#suggestions-list li {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--bb-ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
}

#suggestions-list2 li:hover,
#suggestions-list li:hover {
  background: var(--bb-mint);
}

#suggestions-list2 a,
#suggestions-list a {
  display: block;
  margin: -10px -12px;
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
}

.error-message,
.error-message2 {
  display: none;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid #f2c0b9;
  border-radius: 10px;
  background: #fff3f1;
  color: var(--bb-danger);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Mobile drawer keeps the legacy classes and IDs */
.nav-scrim {
  position: fixed;
  z-index: 1090;
  inset: 0;
  visibility: hidden;
  background: rgba(7, 42, 32, 0.55);
  opacity: 0;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}

body.cbp-spmenu-push-toleft .nav-scrim {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.cbp-spmenu {
  position: fixed;
  top: 0;
  height: 100%;
  background: var(--bb-forest-deep);
  visibility: hidden;
  transition: right 320ms var(--bb-ease), visibility 0s linear 320ms;
}

.cbp-spmenu.cbp-spmenu-right {
  z-index: 1100;
  right: -360px;
  display: flex;
  flex-direction: column;
  width: 340px;
  padding: 22px 26px 30px;
  overflow-y: auto;
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.25);
}

.cbp-spmenu.cbp-spmenu-right.cbp-spmenu-open {
  right: 0;
  visibility: visible;
  transition-delay: 0s;
}

/* The page no longer slides sideways when the drawer opens; the scrim carries the transition */
.cbp-spmenu-push {
  position: relative;
  left: 0;
}

.cbp-spmenu-push-toleft {
  left: 0;
}

.cbp-spmenu .close-menu {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 0 18px auto;
  border: 1px solid var(--bb-forest-line);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 0;
  transition: background-color 180ms ease, transform 260ms var(--bb-ease);
}

.cbp-spmenu .close-menu:hover {
  background: var(--bb-forest);
  transform: rotate(90deg);
}

.cbp-spmenu .close-menu::before {
  content: "×";
  font-size: 1.6rem;
  line-height: 1;
}

.cbp-spmenu a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--bb-forest-line);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--bb-font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.cbp-spmenu a:hover,
.cbp-spmenu a:focus,
.cbp-spmenu a.active {
  color: #fff;
}

.cbp-spmenu a.active {
  color: var(--bb-coral);
}

.cbp-spmenu a.drawer-sub {
  padding: 11px 4px;
  color: rgba(216, 240, 226, 0.7);
  font-family: var(--bb-font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.cbp-spmenu a.drawer-cta {
  margin-top: 26px;
  padding: 15px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  font-family: var(--bb-font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.cbp-spmenu a.drawer-cta:hover,
.cbp-spmenu a.drawer-cta:focus {
  background: var(--bb-coral-hover);
  color: var(--bb-forest-deep);
}

/* ------------------------------------------------------------------
   Feedback messages
   ------------------------------------------------------------------ */
.messages {
  position: relative;
  z-index: 1020;
  max-width: var(--bb-container);
  margin: 18px auto 0;
  padding: 0 15px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px 16px;
  border: 1px solid var(--bb-line);
  border-left: 5px solid var(--bb-forest);
  border-radius: var(--bb-radius-sm);
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow-sm);
  color: var(--bb-ink);
  font-size: 0.93rem;
  font-weight: 600;
  transition: opacity 300ms ease, transform 300ms ease;
}

.message-success { border-left-color: var(--bb-success); }
.message-error { border-left-color: var(--bb-danger); }
.message-warning { border-left-color: var(--bb-warning); }

.message-icon { color: var(--bb-forest); }
.message-success .message-icon { color: var(--bb-success); }
.message-error .message-icon { color: var(--bb-danger); }
.message-warning .message-icon { color: #9a6a00; }

.message-text {
  flex: 1 1 auto;
}

.message .close-button {
  margin: -3px -4px -3px 0;
  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: var(--bb-ink-muted);
  cursor: pointer;
}

/* ------------------------------------------------------------------
   Homepage: hero
   ------------------------------------------------------------------ */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 48px 0 84px;
  background: var(--bb-chalk);
}

.hero-section .container,
.hero-section .row {
  position: relative;
  z-index: 1;
}

.hero-content {
  padding-right: 34px;
}

.hero-title {
  max-width: 13em;
  margin: 0 0 22px;
  font-size: clamp(2.6rem, 5.4vw, 4.7rem);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-subtitle {
  max-width: 34em;
  margin: 0 0 32px;
  color: var(--bb-ink-muted);
  font-size: 1.14rem;
  line-height: 1.6;
}

.search-box-wrapper {
  position: relative;
  z-index: 3;
  max-width: 620px;
}

.home-search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--bb-ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.home-search-form {
  position: relative;
}

.home-search-form .input-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  padding: 6px;
  border: 2px solid var(--bb-forest);
  border-radius: 999px;
  background: var(--bb-paper);
  box-shadow: 6px 6px 0 var(--bb-forest);
  transition: box-shadow 220ms var(--bb-ease), transform 220ms var(--bb-ease);
}

.home-search-form .input-group:focus-within {
  box-shadow: 3px 3px 0 var(--bb-forest);
  transform: translate(3px, 3px);
}

.search-input.form-control {
  height: 54px;
  min-width: 0;
  padding: 0 8px 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--bb-ink);
  font-size: 1.02rem;
}

.search-input.form-control::placeholder {
  color: #74877d;
}

.search-input.form-control:focus {
  box-shadow: none;
  background: transparent;
  color: var(--bb-ink);
}

.search-input.form-control:focus-visible {
  outline: 0;
}

.search-input.form-control.error {
  box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.85);
}

.home-search-form .btn-primary {
  min-height: 54px;
  padding-right: 1.6rem;
  padding-left: 1.6rem;
}

.hero-cats-label {
  margin: 30px 0 10px;
  color: var(--bb-ink-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-cats a {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1.5px solid var(--bb-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.hero-cats a:hover,
.hero-cats a:focus {
  border-color: var(--bb-forest);
  background: var(--bb-forest);
  color: #fff;
  transform: translateY(-2px);
}

/* Hero visual: three devices inside a loop */
.hero-visual-col {
  position: relative;
}

.hero-visual {
  position: relative;
  aspect-ratio: 520 / 560;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  border-radius: var(--bb-radius-lg);
  background:
    radial-gradient(circle at 50% 46%, var(--bb-forest-soft) 0, var(--bb-forest) 62%);
  box-shadow: 0 30px 60px rgba(7, 42, 32, 0.22);
}

.hero-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dv-arc {
  stroke-dasharray: 100;
  stroke-dashoffset: 22;
}

html.js .dv {
  opacity: 0;
}

html.js.is-ready .dv {
  opacity: 1;
  animation: bb-device-in 900ms var(--bb-ease) backwards;
  animation-delay: calc(var(--i, 0) * 110ms + 200ms);
}

html.js.is-ready .dv-arc {
  animation: bb-arc-draw 1500ms cubic-bezier(0.5, 0, 0.2, 1) 150ms backwards;
}

.hero-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.hero-chip i {
  font-size: 0.95rem;
}

.hero-chip--tag {
  top: 9%;
  left: -8%;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
}

.hero-chip--ship {
  top: 44%;
  right: -6%;
  background: var(--bb-paper);
  color: var(--bb-forest);
}

.hero-chip--free {
  bottom: 9%;
  left: -5%;
  background: var(--bb-mint);
  color: var(--bb-forest);
}

html.js .hero-chip {
  opacity: 0;
}

html.js.is-ready .hero-chip {
  opacity: 1;
  animation: bb-chip-in 600ms var(--bb-ease) backwards;
  animation-delay: calc(var(--i, 0) * 120ms + 900ms);
}

/* Orchestrated hero entrance */
html.js .hero-section [data-hero] {
  opacity: 0;
}

html.js.is-ready .hero-section [data-hero] {
  opacity: 1;
  animation: bb-rise 800ms var(--bb-ease) backwards;
  animation-delay: calc(var(--i, 0) * 90ms + 120ms);
}

/* ------------------------------------------------------------------
   Homepage: brand strip
   ------------------------------------------------------------------ */
.brand-strip {
  padding: 22px 0;
  border-bottom: 1px solid var(--bb-line);
  background: var(--bb-paper);
}

.brand-strip .container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-strip-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--bb-ink-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.brand-strip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-strip-list li {
  color: var(--bb-forest);
  font-family: var(--bb-font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------------
   Shared section furniture
   ------------------------------------------------------------------ */
.home-section {
  padding: 96px 0;
}

.home-section--soft {
  background: var(--bb-chalk);
}

.section-header {
  max-width: 640px;
  margin: 0 0 46px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.section-header .lead {
  max-width: 34em;
  margin: 16px 0 0;
  color: var(--bb-ink-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.section-header--split {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-header--split > div {
  max-width: 640px;
}

/* ------------------------------------------------------------------
   Category / brand / device picking cards
   ------------------------------------------------------------------ */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 18px;
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: 26px;
  background: var(--bb-chalk);
  color: var(--bb-ink);
  text-decoration: none;
}

.category-card:hover,
.category-card:focus {
  border-color: var(--bb-forest);
  background: var(--bb-mint);
  color: var(--bb-ink);
  text-decoration: none;
  transform: translateY(-4px);
}

.category-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bb-paper);
}

.category-image {
  width: 100%;
  height: 100%;
  padding: 16px;
  object-fit: contain;
  transition: transform 420ms var(--bb-ease);
}

.category-card:hover .category-image,
.category-card:focus .category-image {
  transform: scale(1.06) rotate(-1.5deg);
}

.category-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 8px 0;
  font-family: var(--bb-font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.category-go {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bb-forest);
  color: #fff;
  font-size: 0.8rem;
  transition: background-color 200ms ease, color 200ms ease, transform 300ms var(--bb-ease);
}

.category-card:hover .category-go,
.category-card:focus .category-go {
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  transform: translateX(3px);
}

.pick-grid--brands .category-media {
  height: 150px;
}

/* Stagger the reveal by column, so a whole row never waits on its last card */
.pick-grid > [data-reveal]:nth-child(4n + 1),
.device-grid > [data-reveal]:nth-child(4n + 1) { --i: 0; }
.pick-grid > [data-reveal]:nth-child(4n + 2),
.device-grid > [data-reveal]:nth-child(4n + 2) { --i: 1; }
.pick-grid > [data-reveal]:nth-child(4n + 3),
.device-grid > [data-reveal]:nth-child(4n + 3) { --i: 2; }
.pick-grid > [data-reveal]:nth-child(4n + 4),
.device-grid > [data-reveal]:nth-child(4n + 4) { --i: 3; }

/* Device cards (model lists and search results) */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.device-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.device-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1.5px solid var(--bb-line);
  border-radius: 22px;
  background: var(--bb-paper);
  color: var(--bb-ink);
  text-decoration: none;
}

.device-card:hover,
.device-card:focus {
  border-color: var(--bb-forest);
  color: var(--bb-ink);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--bb-forest);
}

.device-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  padding: 14px;
  background: var(--bb-chalk);
}

.device-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 420ms var(--bb-ease);
}

.device-card:hover .device-media img,
.device-card:focus .device-media img {
  transform: scale(1.07);
}

.device-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.device-name {
  margin: 0;
  font-family: var(--bb-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.device-text {
  margin: 8px 0 0;
  color: var(--bb-ink-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.device-cta {
  margin-top: auto;
  padding-top: 14px;
  color: var(--bb-forest);
  font-size: 0.88rem;
  font-weight: 700;
}

.device-cta i {
  margin-left: 10px;
  transition: transform 250ms var(--bb-ease);
}

.device-card:hover .device-cta i,
.device-card:focus .device-cta i {
  transform: translateX(4px);
}

/* Inner page heading */
.page-head {
  padding: 46px 0 40px;
  background: var(--bb-chalk);
}

.page-head h1 {
  max-width: 18em;
  margin: 0;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.page-lede {
  max-width: 36em;
  margin: 14px 0 0;
  color: var(--bb-ink-muted);
  font-size: 1.08rem;
}

.page-body {
  padding: 46px 0 88px;
}

.page-note {
  padding: 34px 20px;
  border: 1.5px dashed var(--bb-line-strong);
  border-radius: var(--bb-radius);
  color: var(--bb-ink-muted);
  text-align: center;
}

/* Filter form (category page) */
.filters-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 34px;
  padding: 20px;
  border-radius: var(--bb-radius);
  background: var(--bb-chalk);
}

.filters-form .form-label,
.filters-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-select,
.filters-form .form-select {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 2px solid var(--bb-line);
  border-radius: 14px;
  background: var(--bb-paper);
  color: var(--bb-ink);
  font-weight: 600;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-select:focus,
.filters-form .form-select:focus {
  border-color: var(--bb-forest);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(12, 59, 46, 0.12);
}

/* Bootstrap form controls, tuned to the new look */
.form-control {
  min-height: 46px;
  border: 2px solid var(--bb-line);
  border-radius: 14px;
  color: var(--bb-ink);
}

.form-control:focus {
  border-color: var(--bb-forest);
  box-shadow: 0 0 0 4px rgba(12, 59, 46, 0.12);
}

/* Bootstrap cards used by legacy templates */
.card {
  border: 1.5px solid var(--bb-line);
  border-radius: 22px;
  background: var(--bb-paper);
  box-shadow: none;
}

/* ------------------------------------------------------------------
   Homepage: how it works (a real sequence, so it is numbered)
   ------------------------------------------------------------------ */
.steps-section {
  padding: 100px 0 108px;
  background: var(--bb-forest);
  color: rgba(255, 255, 255, 0.8);
}

.steps-section .section-header h2 {
  color: #fff;
}

.steps-section .section-header .lead {
  color: rgba(216, 240, 226, 0.78);
}

.steps-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bb-step;
}

.steps-list::before {
  position: absolute;
  top: 27px;
  right: 8%;
  left: 27px;
  border-top: 2px dashed rgba(216, 240, 226, 0.3);
  content: "";
}

.step-item {
  position: relative;
  counter-increment: bb-step;
}

.step-num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 26px;
  border-radius: 50%;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  font-family: var(--bb-font-display);
  font-size: 1.4rem;
  font-weight: 800;
  transition: transform 350ms var(--bb-ease);
}

.step-item:hover .step-num {
  transform: scale(1.1) rotate(-6deg);
}

.step-icon {
  margin-bottom: 14px;
  color: var(--bb-mint-deep);
  font-size: 1.5rem;
}

.step-item h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.step-item p {
  max-width: 17em;
  margin: 0;
  color: rgba(216, 240, 226, 0.78);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   Homepage: why sell with us
   ------------------------------------------------------------------ */
.why-choose-us {
  padding: 100px 0;
  background: var(--bb-chalk);
}

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}

.why-intro h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.why-intro p {
  max-width: 30em;
  margin: 0 0 26px;
  color: var(--bb-ink-muted);
  font-size: 1.08rem;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-box {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 4px 22px;
  padding: 26px 0;
  border-top: 1.5px solid var(--bb-line-strong);
}

.feature-box:last-child {
  border-bottom: 1.5px solid var(--bb-line-strong);
}

.feature-icon {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--bb-forest);
  color: var(--bb-mint);
  font-size: 1.35rem;
  transition: transform 350ms var(--bb-ease), background-color 200ms ease;
}

.feature-box:hover .feature-icon {
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
  transform: rotate(-6deg) scale(1.05);
}

.feature-box h3 {
  margin: 4px 0 0;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.feature-box p {
  max-width: 34em;
  margin: 0;
  color: var(--bb-ink-muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------------
   Homepage: closing call to action
   ------------------------------------------------------------------ */
.cta-section {
  padding: 96px 0;
  background: var(--bb-paper);
}

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 58px 60px;
  overflow: hidden;
  border-radius: var(--bb-radius-lg);
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
}

.cta-band::before,
.cta-band::after {
  position: absolute;
  border: 2px solid rgba(7, 42, 32, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.cta-band::before {
  top: -140px;
  right: 150px;
  width: 340px;
  height: 340px;
}

.cta-band::after {
  right: -90px;
  bottom: -170px;
  width: 340px;
  height: 340px;
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  max-width: 14em;
  margin: 0 0 12px;
  color: var(--bb-forest-deep);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.cta-band p {
  max-width: 30em;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 500;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
footer {
  padding: 40px 12px 12px;
  background: transparent;
}

.footer-shell {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 40px;
  background: var(--bb-forest-deep);
  color: rgba(216, 240, 226, 0.72);
}

.footer-top {
  padding: 68px 0 20px;
}

.footer-top .row {
  row-gap: 40px;
}

.logo-img-footer {
  display: block;
  width: auto;
  height: auto;
  max-width: 210px;
  max-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bb-paper);
  box-sizing: content-box;
}

.footer-intro {
  max-width: 21em;
  margin: 24px 0 24px;
  color: #fff;
  font-family: var(--bb-font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.footer-cta {
  min-height: 46px;
}

.footer-top .block > h3 {
  margin: 4px 0 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bb-coral);
  color: #fff;
  font-family: var(--bb-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-top ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-top li + li {
  margin-top: 0;
}

.footer-top .col-6 li a,
.footer-top .col-md-4 li a,
.footer-top .col-lg-3 li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--bb-forest-line);
  color: rgba(216, 240, 226, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease, padding 260ms var(--bb-ease);
}

.footer-top .col-6 li a::after,
.footer-top .col-md-4 li a::after,
.footer-top .col-lg-3 li a::after {
  color: var(--bb-coral);
  content: "\2192";
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 260ms var(--bb-ease);
}

.footer-top .col-6 li a:hover,
.footer-top .col-6 li a:focus,
.footer-top .col-md-4 li a:hover,
.footer-top .col-md-4 li a:focus,
.footer-top .col-lg-3 li a:hover,
.footer-top .col-lg-3 li a:focus {
  padding-left: 8px;
  color: #fff;
}

.footer-top li a:hover::after,
.footer-top li a:focus::after {
  opacity: 1;
  transform: none;
}

.footer-top li.footer-badge a {
  display: inline-block;
  padding: 14px 0 0;
  border-bottom: 0;
}

.footer-top li.footer-badge a::after {
  display: none;
}

.footer-top a.btn {
  font-size: 0.98rem;
}

.footer-top a.btn-primary,
.footer-top a.btn-primary:hover,
.footer-top a.btn-primary:focus {
  color: var(--bb-forest-deep);
}

.social {
  margin-top: 30px;
}

.social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-top .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--bb-forest-line);
  border-radius: 50%;
  color: #fff;
  font-size: 0.9rem;
  transition: background-color 180ms ease, transform 220ms var(--bb-ease);
}

.footer-top .social a::after {
  display: none;
}

.footer-top .social a:hover,
.footer-top .social a:focus {
  padding: 0;
  border-color: var(--bb-coral);
  background-color: var(--bb-coral);
  color: var(--bb-forest-deep);
  transform: translateY(-3px);
}

.footer-top img[alt="checkmend logo"] {
  width: 110px;
  height: auto;
  opacity: 0.9;
}

/* Oversized outlined wordmark that closes the page */
.footer-mark {
  margin: 8px 0 -0.14em;
  color: transparent;
  font-family: var(--bb-font-display);
  font-size: clamp(3.4rem, 15vw, 12.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 1.5px rgba(216, 240, 226, 0.2);
  user-select: none;
  pointer-events: none;
}

.footer-bottom {
  position: relative;
  border-top: 1px solid var(--bb-forest-line);
  background: var(--bb-forest-deep);
}

.footer-bottom p {
  margin: 0;
  padding: 18px 0;
  color: rgba(216, 240, 226, 0.6);
  font-size: 0.82rem;
}

/* ------------------------------------------------------------------
   Content pages (CMS pages such as How it works, Support, Terms)
   ------------------------------------------------------------------ */
.page-content {
  max-width: 820px;
  color: var(--bb-ink);
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin: 1.6em 0 0.5em;
}

.page-content h1:first-child,
.page-content h2:first-child {
  margin-top: 0;
}

.page-content img {
  height: auto;
  border-radius: var(--bb-radius-sm);
}

.page-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------
   Account area, customer dashboard and checkout flow
   ------------------------------------------------------------------ */
.acct-page {
  padding: 36px 0 90px;
}

.acct-heading {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  text-align: center;
}

.acct-lede {
  max-width: 34em;
  margin: 0 auto 30px;
  color: var(--bb-ink-muted);
  font-size: 1.05rem;
  text-align: center;
}

/* Sign in, register and password screens */
.auth-shell {
  display: flex;
  justify-content: center;
  padding: 52px 15px 96px;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 38px 34px;
  border: 2px solid var(--bb-ink);
  border-radius: 30px;
  background: var(--bb-paper);
  box-shadow: 6px 6px 0 var(--bb-forest);
  text-align: center;
}

.auth-card--wide {
  max-width: 940px;
  text-align: left;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
}

.auth-card > p,
.auth-lede {
  margin: 0 0 22px;
  color: var(--bb-ink-muted);
  line-height: 1.6;
}

.auth-card a:not(.btn) {
  color: var(--bb-forest);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--bb-coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--bb-mint);
  color: var(--bb-forest);
  font-size: 1.7rem;
}

.auth-icon--warn {
  background: #ffe3de;
  color: var(--bb-coral-press);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  max-width: 1080px;
  margin: 52px auto 96px;
  overflow: hidden;
  border: 2px solid var(--bb-ink);
  border-radius: 34px;
  background: var(--bb-paper);
  box-shadow: 7px 7px 0 var(--bb-forest);
}

.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px 46px;
}

.auth-main h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
}

.auth-main .auth-lede {
  margin-bottom: 26px;
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 38px;
  overflow: hidden;
  background: var(--bb-forest);
  color: var(--bb-mint);
  text-align: center;
}

.auth-aside::before {
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  border: 46px solid rgba(216, 240, 226, 0.07);
  border-radius: 50%;
  content: "";
}

.auth-aside h2 {
  position: relative;
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.auth-aside p {
  position: relative;
  margin: 0 0 22px;
  color: rgba(216, 240, 226, 0.82);
}

.auth-aside img {
  position: relative;
  width: auto;
  max-width: 100%;
  max-height: 230px;
  margin-top: 26px;
  border-radius: 18px;
}

/* Forms (works with hand-written fields and Django's as_p output) */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  text-align: left;
}

.form-stack p,
.form-stack .field {
  margin: 0;
}

.form-stack label {
  display: block;
  margin: 0 0 6px;
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-stack input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]),
.form-stack select,
.form-stack textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1.05rem;
  border: 2px solid var(--bb-line);
  border-radius: 16px;
  background: var(--bb-chalk);
  box-shadow: none;
  color: var(--bb-ink);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.form-stack textarea {
  min-height: 130px;
}

.form-stack input:focus,
.form-stack select:focus,
.form-stack textarea:focus {
  border-color: var(--bb-forest);
  outline: 0;
  background: var(--bb-paper);
  box-shadow: 0 0 0 4px rgba(12, 59, 46, 0.12);
}

.form-stack input[type="checkbox"],
.form-stack input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  accent-color: var(--bb-forest);
}

.form-stack .helptext,
.form-stack small {
  display: block;
  margin-top: 6px;
  color: var(--bb-ink-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.form-stack .errorlist,
.form-stack .text-danger {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  color: var(--bb-danger) !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-stack .btn,
.form-stack button[type="submit"] {
  width: 100%;
}

.form-note {
  margin: 0;
  text-align: center;
}

.form-section {
  margin: 12px 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bb-mint);
  color: var(--bb-forest);
  font-family: var(--bb-font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

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

.form-grid > .span-2 {
  grid-column: 1 / -1;
}

.auth-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-fieldset legend {
  width: auto;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 2px solid var(--bb-mint);
  color: var(--bb-forest);
  font-family: var(--bb-font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

/* Alerts */
.auth-alert,
.auth-alert.alert {
  position: relative;
  width: 100%;
  margin: 0 0 20px;
  padding: 16px 44px 16px 18px;
  border: 2px solid var(--bb-danger);
  border-radius: 18px;
  background: #fff1ef;
  color: #6b1a12;
  font-size: 0.92rem;
  text-align: left;
}

.auth-alert h3 {
  margin: 0 0 8px;
  color: var(--bb-danger);
  font-family: var(--bb-font-body);
  font-size: 1rem;
  font-weight: 800;
}

.auth-alert ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.auth-alert p {
  margin: 0 0 4px;
}

.auth-alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bb-danger);
  cursor: pointer;
}

.auth-alert-close:hover {
  background: rgba(180, 35, 24, 0.1);
}

.auth-note {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--bb-mint);
  color: var(--bb-forest);
  font-size: 0.92rem;
  text-align: left;
}

.auth-note p {
  margin: 0;
}

.auth-success {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 2px solid var(--bb-success);
  border-radius: 16px;
  background: #e8f6ee;
  color: var(--bb-success);
  font-weight: 700;
}

/* Customer dashboard tabs */
.acct-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
  padding: 6px;
  border: 2px solid var(--bb-ink);
  border-radius: 999px;
  background: var(--bb-paper);
}

.acct-tabs .tab-link {
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--bb-ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.acct-tabs .tab-link:hover,
.acct-tabs .tab-link:focus {
  background: var(--bb-mint);
  color: var(--bb-forest);
}

.acct-tabs .tab-link.active {
  background: var(--bb-forest);
  color: #fff;
}

.panel {
  margin-bottom: 28px;
  padding: 30px;
  border: 1.5px solid var(--bb-line);
  border-radius: 28px;
  background: var(--bb-paper);
  box-shadow: var(--bb-shadow-sm);
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.panel-title {
  margin: 0 0 18px;
  font-size: 1.4rem;
}

.welcome-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 26px 30px;
  border-radius: 28px;
  background: var(--bb-forest);
  color: var(--bb-mint);
}

.welcome-band h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.welcome-band p {
  margin: 4px 0 0;
  color: rgba(216, 240, 226, 0.8);
}

/* Tables */
.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.data-table th {
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid var(--bb-forest);
  background: transparent;
  color: var(--bb-forest);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: left;
}

.data-table td {
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--bb-line);
  text-align: left;
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: var(--bb-chalk);
}

.data-table tbody tr[data-order-id] {
  cursor: pointer;
}

.data-table td.revised-price {
  padding: 14px;
  border-radius: 16px;
  background: #fff6e0;
  text-align: center;
}

.data-table td.revised-price p {
  margin: 4px 0;
  font-size: 0.88rem;
}

.data-table td.revised-price form {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.data-table td.revised-price .user-response {
  font-weight: 700;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--bb-mint);
  color: var(--bb-forest);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.btn-chip:hover {
  background: var(--bb-forest);
  color: #fff;
}

.btn-chip--solid {
  background: var(--bb-forest);
  color: #fff;
}

.btn-chip--solid:hover {
  background: var(--bb-forest-soft);
}

.btn-accept,
.btn-reject {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
}

.btn-accept {
  background: var(--bb-success);
}

.btn-reject {
  background: var(--bb-danger);
}

.was-price {
  color: var(--bb-danger);
  text-decoration: line-through;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.9rem;
}

.pager a {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bb-mint);
  color: var(--bb-forest);
  font-weight: 700;
  text-decoration: none;
}

.pager a:hover {
  background: var(--bb-forest);
  color: #fff;
}

.status-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.status-legend .status-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bb-chalk);
}

.status-legend .status {
  display: block;
  color: var(--bb-forest);
  font-size: 0.95rem;
  font-weight: 800;
}

.status-legend .description {
  display: block;
  margin-top: 2px;
  color: var(--bb-ink-muted);
  font-size: 0.86rem;
}

/* Sale flow: progress, layout and summary */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 30px;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-steps li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px 8px 9px;
  border: 2px solid var(--bb-line);
  border-radius: 999px;
  background: var(--bb-paper);
  color: var(--bb-ink-muted);
  font-size: 0.9rem;
  font-weight: 700;
  counter-increment: flow;
}

.flow-steps li::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bb-chalk);
  color: var(--bb-ink-muted);
  content: counter(flow);
  font-size: 0.8rem;
}

.flow-steps li.is-done {
  border-color: var(--bb-forest);
  color: var(--bb-forest);
}

.flow-steps li.is-done::before {
  background: var(--bb-forest);
  color: #fff;
}

.flow-steps li.is-current {
  border-color: var(--bb-forest);
  background: var(--bb-forest);
  color: #fff;
}

.flow-steps li.is-current::before {
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 26px;
  align-items: start;
}

.flow-side {
  position: sticky;
  top: 110px;
}

.total-card {
  padding: 28px;
  border-radius: 28px;
  background: var(--bb-forest);
  color: var(--bb-mint);
}

.total-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1.25rem;
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bb-forest-line);
  font-size: 0.95rem;
}

.total-row:last-of-type {
  border-bottom: 0;
}

.total-row--big {
  padding-top: 16px;
  font-weight: 700;
}

.total-row--big .total-figure {
  color: #fff;
  font-family: var(--bb-font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.total-card .btn {
  width: 100%;
  margin-top: 14px;
}

.total-card .btn-outline {
  border-color: rgba(216, 240, 226, 0.5);
  color: var(--bb-mint);
}

.total-card .btn-outline:hover {
  border-color: #fff;
  background: #fff;
  color: var(--bb-forest);
}

.choice {
  position: relative;
  margin-bottom: 10px;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 15px 18px;
  border: 2px solid var(--bb-line);
  border-radius: 18px;
  background: var(--bb-paper);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.choice label::before {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--bb-line-strong);
  border-radius: 50%;
  content: "";
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice label:hover {
  border-color: var(--bb-forest);
}

.choice input:checked + label {
  border-color: var(--bb-forest);
  background: var(--bb-mint);
}

.choice input:checked + label::before {
  border-color: var(--bb-forest);
  background: var(--bb-forest);
  box-shadow: inset 0 0 0 4px var(--bb-mint);
}

.choice input:focus-visible + label {
  outline: 3px solid var(--bb-coral);
  outline-offset: 2px;
}

.confirm-note {
  margin: 18px 0;
  padding: 15px 18px;
  border-radius: 16px;
  background: var(--bb-chalk);
  font-size: 0.9rem;
  line-height: 1.55;
}

.confirm-note p {
  margin: 0;
}

.confirm-note a {
  color: var(--bb-forest);
  font-weight: 700;
  text-decoration: underline;
}

.success-hero {
  padding: 40px 30px;
  border-radius: 30px;
  background: var(--bb-forest);
  color: var(--bb-mint);
  text-align: center;
}

.success-hero h1 {
  margin: 14px 0 6px;
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.success-hero p {
  margin: 0;
  color: rgba(216, 240, 226, 0.85);
}

.success-hero .auth-icon {
  margin: 0;
  background: var(--bb-coral);
  color: var(--bb-forest-deep);
}

.order-chip {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 18px;
  border: 1.5px dashed rgba(216, 240, 226, 0.5);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ship-label {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0;
  padding: 22px;
  border: 2px dashed var(--bb-forest);
  border-radius: 20px;
  background: var(--bb-paper);
  text-align: left;
}

.ship-label p {
  margin: 2px 0;
}

.ship-label .sender-details {
  font-weight: 700;
  line-height: 1.6;
}

.ship-label .postage-info-box {
  padding: 12px 18px;
  border: 2px dashed var(--bb-line-strong);
  border-radius: 14px;
  background: var(--bb-chalk);
  font-weight: 700;
  text-align: center;
}

.modal-content {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
}

.modal-header {
  border-bottom: 0;
  background: var(--bb-forest);
  color: #fff;
}

.modal-header .close {
  color: #fff;
  opacity: 0.85;
  text-shadow: none;
}

@media (max-width: 991.98px) {
  .flow-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-side {
    position: static;
  }

  .auth-split {
    grid-template-columns: minmax(0, 1fr);
    margin-right: 12px;
    margin-left: 12px;
  }

  .auth-main,
  .auth-aside {
    padding: 38px 26px;
  }
}

@media (max-width: 767.98px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card {
    padding: 30px 22px;
  }

  .panel {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .acct-tabs {
    border-radius: 24px;
  }

  .acct-tabs .tab-link {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
}

/* ------------------------------------------------------------------
   Reduced motion: everything is visible immediately and nothing moves
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .page-loader {
    display: none;
  }

  html.js [data-reveal],
  html.js .dv,
  html.js .hero-chip,
  html.js .hero-section [data-hero] {
    opacity: 1;
  }
}
