/* ===== BUILD YOUR TANK - Sacred Aquatics ===== */
/* v2 */
/* cache-bust: 2026-06-30-2 */
/* Ensure missing theme vars have fallbacks */
:root {
  --byt-bio-glow: rgba(45, 106, 79, 0.15);
  --byt-border-light: #e0e0e0;
  --byt-shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --byt-version: 2;
}
.byt-hero {
  background: var(--color-bg);
  color: var(--color-text);
  padding: 48px 24px;
  text-align: center;
  border-bottom: 1px solid var(--byt-border-light);
}
.byt-hero__inner { max-width: var(--container-max); margin: 0 auto; }
.byt-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--color-text);
}
.byt-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 8px;
  line-height: 1.7;
  color: var(--color-text-body);
}
.byt-hero__tag {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: 8px;
}
.byt-hero__discount {
  display: block;
  margin-top: 8px;
  font-size: 0.9375rem;
}
.byt-hero__discount-pct {
  font-weight: 700;
  color: #166534;
}
.byt-hero__discount-text {
  font-weight: 400;
  color: #475569;
}

/* ===== PROGRESS ===== */
.byt-progress {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 24px 24px;
}
.byt-progress__steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 8px;
}
.byt-progress__steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--byt-border-light);
  transform: translateY(-50%);
}
.byt-progress__track {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--color-bio);
  transform: translateY(-50%);
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.byt-progress__step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.byt-progress__dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.byt-progress__step.active .byt-progress__dot {
  background: var(--color-bio);
  border-color: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 4px var(--byt-bio-glow);
}
.byt-progress__step.done .byt-progress__dot {
  background: var(--color-bio);
  border-color: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.byt-progress__label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  display: none;
}
.byt-progress__step.active .byt-progress__label,
.byt-progress__step.done .byt-progress__label {
  display: block;
  color: var(--color-primary);
}
.byt-progress__counter {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== STEPPER ===== */
.byt-stepper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 64px;
}
.byt-step { display: none; animation: bytFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.byt-step.active { display: block; }

@keyframes bytFade {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.byt-step__header { margin-bottom: 28px; }
.byt-step__header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.byt-step__header p { color: var(--color-text-muted); font-size: 0.9375rem; }
.byt-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
}
.byt-optional { font-weight: 400; font-size: 0.8125rem; color: var(--color-text-muted); }

/* ===== GRID ===== */
.byt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.byt-card {
  background: var(--color-surface);
  border: 2px solid var(--byt-border-light);
  border-radius: var(--radius-md);
  padding: 32px 16px 16px;
  cursor: pointer;
  transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.byt-card:focus-visible,
.byt-size-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.byt-card:hover {
  border-color: var(--color-bio);
  box-shadow: var(--byt-shadow-card);
  transform: translateY(-2px);
}
.byt-card.selected {
  border-color: var(--color-bio);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.15);
}
.byt-card.compatibility-warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.byt-card.compatibility-block {
  border-color: #fecaca;
  background: #fef2f2;
  opacity: 0.55;
  cursor: not-allowed;
}
.byt-card.multi-select { border-style: dashed; }
.byt-card.multi-select.selected { border-style: solid; }
.byt-card__img-placeholder {
  width: 100%;
  height: 110px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--color-bg-soft), var(--color-bio-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}
.byt-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.byt-card__title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.byt-card__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.byt-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}
.byt-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.byt-card__warn-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #b45309;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.byt-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.byt-card.selected .byt-card__check { display: flex; }
.byt-card.compatibility-block .byt-card__check { display: none !important; }

/* ===== QUANTITY STEPPER ON CARDS ===== */
.byt-card__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--byt-border-light);
}
.byt-card:not(.selected) .byt-card__qty { display: none; }
.byt-qty__btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-bio);
  background: #fff;
  color: var(--color-bio);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: 0.15s;
}
.byt-qty__btn:hover {
  background: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.byt-qty__value {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-text);
  min-width: 20px;
  text-align: center;
}

/* ===== CATEGORY TABS ===== */
.byt-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.byt-tab {
  padding: 6px 16px;
  border: 1px solid var(--byt-border-light);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.byt-tab:hover {
  border-color: var(--color-bio);
  color: var(--color-bio);
}
.byt-tab.active {
  background: var(--color-bio);
  border-color: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* ===== MINI SELECTION LIST ===== */
.byt-mini {
  display: none;
  background: var(--color-primary-light);
  border: 1px solid var(--color-bio);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.byt-mini__header {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-bio);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.byt-mini__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(45,106,79,0.1);
  gap: 8px;
}
.byt-mini__row:last-child { border-bottom: none; }
.byt-mini__name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.byt-mini__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.byt-mini__btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--color-bio);
  background: #fff;
  color: var(--color-bio);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: 0.15s;
}
.byt-mini__btn:hover {
  background: var(--color-bio);
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.byt-mini__val {
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--color-text);
  min-width: 16px;
  text-align: center;
}
.byt-mini__price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  min-width: 48px;
  text-align: right;
}

/* ===== SIZE GRID ===== */
.byt-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.byt-size-card {
  background: var(--color-surface);
  border: 2px solid var(--byt-border-light);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.byt-size-card:hover {
  border-color: var(--color-bio);
  transform: translateY(-2px);
  box-shadow: var(--byt-shadow-card);
}
.byt-size-card.selected {
  border-color: var(--color-bio);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.15);
}
.byt-size-card__icon { font-size: 1.75rem; margin-bottom: 6px; }
.byt-size-card__label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}
.byt-size-card__desc { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 2px; }
.byt-size-card:not(.selected) .byt-card__qty { display: none; }
.byt-size-card .byt-card__qty { justify-content: center; }
.byt-size-card .byt-qty__btn { width: 22px; height: 22px; font-size: 0.8125rem; }
.byt-size-card .byt-qty__value { font-size: 0.8125rem; min-width: 16px; }
.byt-card__weight {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-surface);
  border: 1px solid var(--byt-border-light);
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.byt-size-card.selected .byt-card__weight,
.byt-size-card.selected .byt-card__warn-badge + .byt-card__weight,
.byt-size-card.selected .byt-card__badge + .byt-card__weight { display: none; }
.byt-card.selected .byt-card__warn-badge + .byt-card__weight,
.byt-card.selected .byt-card__badge + .byt-card__weight { display: none; }
.byt-card .byt-card__weight { display: block; }
.byt-card.selected .byt-card__weight,
.byt-card.compatibility-warn .byt-card__weight { display: none; }

/* ===== NAV ===== */
.byt-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--byt-border-light);
}
.byt-nav__left, .byt-nav__right { display: flex; gap: 12px; }

/* ===== COMPAT ===== */
.byt-compat {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  display: none;
}
.byt-compat.visible { display: block; }
.byt-compat__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.byt-compat__list { list-style: none; font-size: 0.8125rem; color: #92400e; }
.byt-compat__list li { padding: 2px 0 2px 16px; position: relative; }
.byt-compat__list li::before { content: '!'; position: absolute; left: 0; font-weight: 700; }

/* ===== SUMMARY ===== */
.byt-summary {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--byt-border-light);
  overflow: hidden;
}
.byt-summary__header {
  background: var(--color-primary);
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 20px 24px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
}
.byt-summary__body { padding: 24px; }
.byt-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--byt-border-light);
}
.byt-summary__row:last-child { border-bottom: none; }
.byt-summary__discount { background: #f0fdf4; border-color: #86efac !important; }
.byt-summary__discount .byt-summary__row-title { color: #15803d; }
.byt-summary__discount .byt-summary__row-price { color: #15803d; }
.byt-summary__row-title { font-weight: 600; font-size: 0.9375rem; color: var(--color-text); }
.byt-summary__row-detail { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 2px; }
.byt-summary__row-price { font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.byt-summary__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--color-primary-light);
  border-top: 2px solid var(--color-bio);
}
.byt-summary__total-label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.byt-summary__total-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}
.byt-summary__actions {
  padding: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.byt-summary__empty { text-align: center; padding: 40px 24px; color: var(--color-text-muted); }

/* ===== SAVED ===== */
.byt-saved {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 48px;
}
.byt-saved h2 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
}
.byt-saved__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.byt-saved__card {
  background: var(--color-surface);
  border: 1px solid var(--byt-border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.byt-saved__card:hover {
  border-color: var(--color-bio);
  box-shadow: var(--byt-shadow-card);
}
.byt-saved__card-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.byt-saved__card-info p { font-size: 0.8125rem; color: var(--color-text-muted); }
.byt-saved__card-price { font-weight: 700; color: var(--color-primary); }

/* ===== TOAST ===== */
.byt-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-text);
  color: #fff;
  -webkit-text-fill-color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.byt-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== AI PREVIEW ===== */
.byt-preview {
  margin-top: 24px;
  padding: 24px;
  background: var(--color-bg-soft, #f0f1ee);
  border-radius: 12px;
  text-align: center;
}
.byt-preview__header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0 0 4px;
  color: var(--color-text);
}
.byt-preview__header p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}
.byt-preview__image {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.byt-preview__img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.byt-preview__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: byt-spin 0.8s linear infinite;
}
@keyframes byt-spin {
  to { transform: rotate(360deg); }
}
.byt-preview__status {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  min-height: 1.2em;
}
.byt-preview__status.success { color: var(--color-success, #15803d); }
.byt-preview__status.error { color: var(--color-danger, #b91c1c); }
#bytPreviewBtn { margin-top: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .byt-progress__label { display: none !important; }
  .byt-progress__step.active .byt-progress__label,
  .byt-progress__step.done .byt-progress__label { display: none !important; }
  .byt-progress__dot { width: 28px; height: 28px; font-size: 0.75rem; }
  .byt-grid { grid-template-columns: 1fr; }
  .byt-size-grid { grid-template-columns: repeat(2, 1fr); }
  .byt-nav { flex-direction: column; gap: 12px; }
  .byt-nav__left, .byt-nav__right { width: 100%; }
  .byt-nav__left .btn, .byt-nav__right .btn { flex: 1; }
  .byt-summary__actions { flex-direction: column; }
  .byt-summary__actions .btn { width: 100%; }
  .byt-stepper { padding: 0 16px 40px; }
  .byt-hero { padding: 32px 16px; }
}
