:root {
  --bmi-brand: #1f7a8c;
  --bmi-brand-dark: #114b5f;
  --bmi-muted: #6b7280;
  --bmi-border: #e5e7eb;
  --bmi-surface: #ffffff;
  --bmi-background: #f3f4f6;
}

.bmi-shop {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', Arial, sans-serif;
}

/* Ensure all catalog UI uses Inter */
.bmi-shop * {
  font-family: 'Inter', Arial, sans-serif;
}

.bmi-header {
  background: var(--bmi-surface);
  border-bottom: 1px solid var(--bmi-border);
}

.bmi-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bmi-brand {
  font-weight: 700;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bmi-brand-dark);
}

.bmi-tagline {
  font-size: 0.95rem;
  color: var(--bmi-muted);
}

.bmi-lang {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bmi-lang a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.bmi-lang a:hover {
  border-color: var(--bmi-brand);
}

.bmi-lang a.is-active {
  background: var(--bmi-brand);
  color: #fff;
  border-color: var(--bmi-brand);
}

.bmi-brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.bmi-header-section {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bmi-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.bmi-nav a {
  color: var(--bmi-brand-dark);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bmi-nav a:hover {
  color: var(--bmi-brand);
  background-color: rgba(31, 122, 140, 0.1);
}

.bmi-nav a[aria-current='page'] {
  background: var(--bmi-brand);
  color: #fff;
}

.bmi-right {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.bmi-phone {
  color: var(--bmi-brand-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bmi-phone:hover {
  color: var(--bmi-brand);
}

@media (max-width: 960px) {
  .bmi-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bmi-right {
    justify-content: flex-start;
  }

  .bmi-brand-block {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .bmi-nav,
  .bmi-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 10px;
  }

  .bmi-nav a {
    padding: 8px 14px;
  }
}

.bmi-main {
  flex: 1;
}

.bmi-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.bmi-intro {
  max-width: 720px;
  margin: 0 0 24px 0;
  color: var(--bmi-muted);
  line-height: 1.6;
}

.bmi-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bmi-controls .bmi-btn {
  white-space: nowrap;
}

.bmi-search {
  flex: 1;
  min-width: 240px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--bmi-border);
  background: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bmi-search:focus {
  outline: none;
  border-color: var(--bmi-brand);
  box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.15);
}

.bmi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bmi-brand);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
}

.bmi-btn:hover {
  background: var(--bmi-brand-dark);
  border-color: var(--bmi-brand-dark);
}

.bmi-btn.sec {
  background: #fff;
  color: var(--bmi-brand-dark);
  border-color: var(--bmi-brand);
}

.bmi-btn.sec:hover {
  background: #ecfeff;
}

.bmi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 20px 0 12px;
}

/* Animated header behavior (shop page) */
.header-anim {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  will-change: transform, opacity;
}

.header-anim.header-visible {
  transform: translateY(0);
  opacity: 1;
}

.header-anim.header-scrolled {
  box-shadow: 0 8px 22px rgba(17, 75, 95, 0.15);
  background: var(--bmi-surface);
}

.header-anim.header-hidden {
  transform: translateY(-100%);
  opacity: 0.98;
  pointer-events: none;
}

/* Hide top header when scroll header is active */
.header-top-hidden {
  visibility: hidden !important;
}

/* Avoid initial double header flash: hide scroll header until JS attaches */
#rec1307997203:not(.header-anim) {
  display: none;
}

/* Clean up inner background/stripe in the floating header */
#rec1307997203.header-anim .tn-elem[data-elem-id="1755539127351"] .tn-atom {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 992px) {
  .bmi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bmi-grid {
    grid-template-columns: 1fr;
  }
}

.bmi-card {
  background: #fff;
  border: 1px solid var(--bmi-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.bmi-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fafafa;
}

.bmi-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bmi-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.bmi-desc {
  color: var(--bmi-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 42px;
}

.bmi-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.bmi-price {
  font-weight: 600;
  color: var(--bmi-brand-dark);
}

.bmi-actions {
  display: flex;
  gap: 8px;
}

.bmi-more {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}

.bmi-empty,
.bmi-pane-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--bmi-muted);
}

.bmi-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.bmi-modal.show {
  display: flex;
}

.bmi-panel {
  background: #fff;
  border-radius: 18px;
  max-width: 980px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  position: relative;
}

@media (max-width: 900px) {
  .bmi-panel {
    grid-template-columns: 1fr;
  }
}

.bmi-panel img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--bmi-border);
  border-radius: 14px;
}

#bmi-p-close,
#bmi-c-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--bmi-border);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.bmi-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.bmi-tabs {
  margin-top: 18px;
}

.bmi-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bmi-tabs-nav button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--bmi-border);
  background: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.bmi-tabs-nav button.active {
  background: var(--bmi-brand);
  color: #fff;
  border-color: var(--bmi-brand);
}

.bmi-pane {
  display: none;
  border: 1px solid var(--bmi-border);
  border-radius: 14px;
  padding: 14px;
  max-height: 260px;
  overflow: auto;
  line-height: 1.55;
}

.bmi-pane.active {
  display: block;
}

.bmi-modal .bmi-pane ul {
  padding-left: 18px;
}

.bmi-modal .bmi-pane li {
  margin-bottom: 6px;
}

#bmi-cart {
  display: none;
  align-items: center;
  justify-content: center;
}

#bmi-cart.show {
  display: flex;
}

.bmi-cart {
  background: #fff;
  border-radius: 18px;
  max-width: 900px;
  width: 100%;
  padding: 28px 24px;
  position: relative;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bmi-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.bmi-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.bmi-cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--bmi-border);
}

@media (max-width: 640px) {
  .bmi-cart-row {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto;
  }

  .bmi-cart-price,
  .bmi-cart-qty,
  .bmi-cart-remove {
    justify-self: flex-start;
  }
}

.bmi-cart-row img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fafafa;
  border: 1px solid var(--bmi-border);
  border-radius: 10px;
}

.bmi-cart-title {
  font-weight: 600;
}

.bmi-cart-meta {
  font-size: 0.85rem;
  color: var(--bmi-muted);
  margin-top: 4px;
}

.bmi-cart-price {
  font-weight: 600;
}

.bmi-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bmi-cart-qty button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--bmi-border);
  background: #fff;
  cursor: pointer;
}

.bmi-cart-remove button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--bmi-brand);
  cursor: pointer;
}

.bmi-cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bmi-border);
}

.bmi-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.bmi-summary-label {
  color: var(--bmi-muted);
  font-size: 0.9rem;
}

.bmi-summary-value {
  font-weight: 600;
  font-size: 1.2rem;
}

.bmi-cart-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
