/* BuyBackEmpire global design system */
:root {
  --bb-ink: #162536;
  --bb-ink-deep: #0e1a28;
  --bb-ink-muted: #516172;
  --bb-surface: #ffffff;
  --bb-surface-soft: #f5f7f9;
  --bb-surface-warm: #faf9f7;
  --bb-border: #dce3e8;
  --bb-border-strong: #c8d2da;
  --bb-brand: #087e8b;
  --bb-brand-hover: #056772;
  --bb-brand-soft: #e6f4f5;
  --bb-accent: #f1b434;
  --bb-success: #207a50;
  --bb-danger: #b42318;
  --bb-shadow-sm: 0 2px 8px rgba(19, 38, 56, 0.06);
  --bb-shadow-md: 0 14px 36px rgba(19, 38, 56, 0.10);
  --bb-radius-sm: 8px;
  --bb-radius: 12px;
  --bb-radius-lg: 18px;
  --bb-container: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body.body-text {
  margin: 0;
  overflow-x: hidden;
  background: var(--bb-surface);
  color: var(--bb-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--bb-brand);
  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-brand-hover);
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(8, 126, 139, 0.32);
  outline-offset: 3px;
}

/* Demo notice */
.demo-banner {
  position: relative;
  z-index: 1035;
  background: #fff7dd;
  border-bottom: 1px solid #ecd595;
  color: #5f4700;
  padding: 8px 0;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

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

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

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

/* Header and primary navigation */
header {
  position: relative;
  z-index: 1030;
  background: var(--bb-surface);
  border-bottom: 1px solid var(--bb-border);
}

.navbar {
  min-height: 78px;
  padding: 0;
  background: var(--bb-surface);
}

.navbar > .container {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 26px;
  position: relative;
}

.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-height: 46px;
  max-width: 215px;
}

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

.navbar .main-menu {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
}

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

.navbar .main-menu .item {
  display: block;
  padding: 10px 10px;
  color: var(--bb-ink-muted);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.navbar .main-menu .item:hover,
.navbar .main-menu .item:focus,
.navbar .main-menu li.active .item {
  color: var(--bb-brand);
}

.navbar .main-menu li.active .item {
  position: relative;
}

.navbar .main-menu li.active .item::after {
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 2px;
  background: var(--bb-brand);
  border-radius: 99px;
  content: "";
}

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

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

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

.icon-menu > li > a:hover,
.icon-menu > li > a:focus,
.icon-menu .toggle-btn button:hover,
.icon-menu .toggle-btn button:focus {
  border-color: var(--bb-border);
  background: var(--bb-surface-soft);
}

.icon-user,
.icon-search,
.icon-cart {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.icon-menu .sale-link {
  width: auto;
  gap: 4px;
  padding: 0 7px 0 5px;
  border-radius: 20px;
  color: var(--bb-ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.icon-menu .sale-link:hover,
.icon-menu .sale-link:focus {
  color: var(--bb-brand);
}

.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: -3px;
  right: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--bb-surface);
  border-radius: 99px;
  background: var(--bb-brand);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.icon-menu .submenu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  min-width: 170px;
  margin: 0;
  padding: 7px;
  list-style: none;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-sm);
  background: var(--bb-surface);
  box-shadow: var(--bb-shadow-md);
}

.icon-menu .user:hover .submenu,
.icon-menu .user:focus-within .submenu {
  display: block;
}

.icon-menu .submenu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--bb-ink);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.icon-menu .submenu a:hover,
.icon-menu .submenu a:focus {
  background: var(--bb-surface-soft);
  color: var(--bb-brand);
}

.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% + 9px);
  right: 15px;
  display: none;
  width: min(440px, calc(100vw - 30px));
  padding: 12px;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  background: var(--bb-surface);
  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: 46px;
  min-width: 0;
  border: 1px solid var(--bb-border-strong);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  box-shadow: none;
  color: var(--bb-ink);
  font-size: 0.9rem;
}

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

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

.search-form-top .input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--bb-brand);
  border-radius: 0 8px 8px 0;
  background: var(--bb-brand);
}

.search-form-top .input-group-text:hover,
.search-form-top .input-group-text:focus {
  border-color: var(--bb-brand-hover);
  background: var(--bb-brand-hover);
}

.search-form-top .input-group-text img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

#suggestions-list2,
#suggestions-list {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1040;
  max-height: 260px;
  margin: 3px 0 0;
  padding: 5px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius-sm);
  background: var(--bb-surface);
  box-shadow: var(--bb-shadow-md);
}

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

#suggestions-list2 li,
#suggestions-list li {
  padding: 9px 11px;
  border-bottom: 1px solid var(--bb-border);
  border-radius: 5px;
  color: var(--bb-ink);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

#suggestions-list2 li:last-child,
#suggestions-list li:last-child {
  border-bottom: 0;
}

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

#suggestions-list2 a {
  color: inherit;
  text-decoration: none;
}

.error-message,
.error-message2 {
  display: none;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #f5c5bf;
  border-radius: 6px;
  background: #fff3f2;
  color: var(--bb-danger);
  font-size: 0.8125rem;
  font-weight: 650;
}

/* Mobile drawer preserves legacy classes and ID */
.cbp-spmenu {
  position: fixed;
  top: 0;
  height: 100%;
  background: var(--bb-ink-deep);
  transition: right 280ms ease;
}

.cbp-spmenu.cbp-spmenu-right {
  z-index: 1100;
  right: -320px;
  width: 320px;
  padding: 22px 18px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
}

.cbp-spmenu.cbp-spmenu-right.cbp-spmenu-open {
  right: 0;
}

.cbp-spmenu-push {
  position: relative;
  left: 0;
  transition: left 280ms ease;
}

.cbp-spmenu-push-toleft {
  left: -320px;
}

.cbp-spmenu .close-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0 0 20px auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 0;
}

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

.cbp-spmenu a {
  display: block;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

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

/* 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: 9px;
  padding: 12px 14px;
  border: 1px solid var(--bb-border);
  border-left: 4px solid var(--bb-brand);
  border-radius: var(--bb-radius-sm);
  background: var(--bb-surface);
  box-shadow: var(--bb-shadow-sm);
  color: var(--bb-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.message-icon {
  color: var(--bb-brand);
}

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

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

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

/* Homepage */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 76px 0 82px;
  background: var(--bb-ink-deep);
  color: #fff;
}

.hero-section::before {
  position: absolute;
  top: -320px;
  right: -160px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  content: "";
}

.hero-section::after {
  position: absolute;
  right: 17%;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(8, 126, 139, 0.48);
  border-radius: 50%;
  content: "";
}

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

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 17px;
  color: #a9dce0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  width: 21px;
  height: 2px;
  background: var(--bb-accent);
  content: "";
}

.hero-title {
  max-width: 650px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.5rem, 4.25vw, 4.35rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.hero-title .highlight {
  color: #aee4e4;
}

.hero-subtitle {
  max-width: 555px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  line-height: 1.65;
}

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

.home-search-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  font-weight: 750;
}

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

.home-search-form .input-group {
  display: flex;
  flex-wrap: nowrap;
  padding: 5px;
  border-radius: var(--bb-radius);
  background: #fff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.20);
}

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

.search-input.form-control::placeholder {
  color: #7b8997;
}

.search-input.form-control:focus {
  box-shadow: none;
}

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

.home-search-form .btn-primary,
.btn-primary {
  min-height: 46px;
  padding: 0.7rem 1.05rem;
  border: 1px solid var(--bb-brand);
  border-radius: 8px;
  background: var(--bb-brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.home-search-form .btn-primary:hover,
.home-search-form .btn-primary:focus,
.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--bb-brand-hover);
  background: var(--bb-brand-hover);
  color: #fff;
  box-shadow: 0 7px 16px rgba(8, 126, 139, 0.24);
}

.home-search-form .btn-primary i {
  margin-right: 7px;
}

.hero-reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 650;
}

.hero-reassurance li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-reassurance i {
  color: #9adad8;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  text-align: center;
}

.hero-image::before {
  position: absolute;
  width: min(29vw, 345px);
  height: min(29vw, 345px);
  border-radius: 50%;
  background: rgba(8, 126, 139, 0.20);
  content: "";
}

.hero-image .header-image {
  position: relative;
  z-index: 1;
  max-height: 390px;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.32));
}

/* Shared content sections */
.home-section {
  padding: 88px 0;
}

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

.section-header {
  max-width: 620px;
  margin: 0 auto 43px;
}

.section-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--bb-brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0;
  color: var(--bb-ink);
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-weight: 770;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.section-header h2 span {
  color: var(--bb-brand);
}

.section-header .lead {
  margin: 14px 0 0;
  color: var(--bb-ink-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.steps-wrapper {
  position: relative;
}

.step-item {
  display: flex;
  margin-bottom: 20px;
}

.step-card {
  width: 100%;
  padding: 28px 24px 25px;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  background: var(--bb-surface);
  box-shadow: var(--bb-shadow-sm);
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--bb-brand-soft);
}

.step-icon img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.step-label {
  margin-bottom: 7px;
  color: var(--bb-brand);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.step-card h3,
.step-card h4 {
  margin: 0 0 9px;
  color: var(--bb-ink);
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.3;
}

.step-card p {
  margin: 0;
  color: var(--bb-ink-muted);
  font-size: 0.89rem;
  line-height: 1.58;
}

.category-grid {
  margin-bottom: -24px;
}

.category-grid > div {
  display: flex;
  margin-bottom: 24px !important;
}

.category-card {
  display: flex;
  width: 100%;
  min-height: 205px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  background: var(--bb-surface);
  box-shadow: 0 2px 7px rgba(19, 38, 56, 0.03);
  color: inherit;
  text-decoration: none;
}

.category-card:hover,
.category-card:focus {
  border-color: rgba(8, 126, 139, 0.48);
  box-shadow: var(--bb-shadow-md);
  color: inherit;
  text-decoration: none;
  transform: translateY(-3px);
}

.category-image {
  width: 100%;
  height: 124px;
  margin-bottom: 17px;
  object-fit: contain;
}

.category-card h3,
.category-card h4 {
  margin: 0;
  color: var(--bb-ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
}

.why-choose-us {
  padding: 66px 0;
  border-top: 1px solid var(--bb-border);
  background: var(--bb-surface-warm);
}

.feature-box {
  height: 100%;
  padding: 8px 20px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 17px;
  border-radius: 50%;
  background: var(--bb-brand-soft);
  color: var(--bb-brand);
  font-size: 1.15rem;
}

.feature-box h3,
.feature-box h4 {
  margin: 0 0 8px;
  color: var(--bb-ink);
  font-size: 1.05rem;
  font-weight: 760;
}

.feature-box p {
  max-width: 285px;
  margin: 0 auto;
  color: var(--bb-ink-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Footer */
footer {
  background: var(--bb-ink-deep);
  color: rgba(255, 255, 255, 0.66);
}

.footer-top {
  padding: 58px 0 42px;
}

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

.logo-img-footer {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 45px;
  height: auto;
}

.footer-intro {
  max-width: 230px;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.59);
  font-size: 0.84rem;
  line-height: 1.6;
}

.footer-top .block > h3 {
  margin: 2px 0 14px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

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

.footer-top li + li {
  margin-top: 8px;
}

.footer-top a {
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
}

.footer-top a:hover,
.footer-top a:focus {
  color: #fff;
}

.social {
  margin-top: 25px;
}

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

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

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 0.82rem;
}

.social a:hover,
.social a:focus {
  border-color: var(--bb-brand);
  background: var(--bb-brand);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin: 0;
  padding: 17px 0;
  color: rgba(255, 255, 255, 0.53);
  font-size: 0.78rem;
}
