@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'PretendardVariable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #d1d5db;
  color: #111827;
}

.bm-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f8f9fb;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  position: relative;
}

.bm-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  background: #1a2260; color: #fff; border: none; border-radius: 0.75rem;
  font-weight: 700; font-size: 0.875rem; cursor: pointer; padding: 0 1rem;
  text-decoration: none; transition: background 0.15s;
}
.bm-btn-primary:hover:not(:disabled) { background: #141b4d; }
.bm-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.bm-btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  background: #fff; color: #4b5563; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  font-weight: 700; font-size: 0.875rem; cursor: pointer; padding: 0 1rem;
  text-decoration: none;
}

.bm-field {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 0.625rem;
  padding: 0 0.875rem; height: 2.75rem; font-size: 0.875rem; color: #1a2260;
  background: #f9fafb; outline: none;
}
.bm-field:focus { border-color: #1a2260; background: #fff; }
.bm-field::placeholder { color: #9ca3af; }

.bm-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.bm-tabs::-webkit-scrollbar { display: none; }
.bm-tab {
  flex: 0 0 auto; border-radius: 9999px; padding: 8px 13px; font-size: 12.5px; font-weight: 700;
  border: 1px solid #e5e7eb; background: #fff; color: #6b7280; cursor: pointer; white-space: nowrap;
}
.bm-tab.active { background: #1a2260; border-color: #1a2260; color: #fff; }

.bm-sort-btn {
  border: 1px solid #e5e7eb; background: #fff; color: #374151; font-size: 12px; font-weight: 700;
  border-radius: 9999px; padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.bm-sort-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16); overflow: hidden; z-index: 15; min-width: 108px;
}
.bm-sort-opt { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: #374151; background: #fff; border: none; cursor: pointer; }
.bm-sort-opt.active { background: #1a2260; color: #fff; }
.bm-sort-opt:hover:not(.active) { background: #f3f4f6; }

.bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bm-card { background: #fff; border-radius: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: hidden; display: flex; flex-direction: column; }
.bm-card-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.bm-card-name { font-size: 13.5px; font-weight: 700; color: #1f2937; line-height: 1.3; }
.bm-card-price { font-size: 16px; font-weight: 800; color: #1a2260; }
.bm-card-rating { font-size: 11.5px; color: #6b7280; display: flex; align-items: center; gap: 3px; }
.bm-card-footer { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

.bm-qty-btn {
  width: 26px; height: 26px; border-radius: 9999px; border: 1px solid #e5e7eb; background: #fff;
  color: #4b5563; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bm-qty-val { min-width: 18px; text-align: center; font-size: 13px; font-weight: 700; color: #1f2937; }
.bm-add-btn {
  flex: 1; min-width: 0; background: #1a2260; color: #fff; border: none; border-radius: 9999px;
  font-size: 12px; font-weight: 700; height: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.bm-add-btn:active { background: #141b4d; }

.bm-myinfo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f4f6;
}
.bm-myinfo-row:last-child { border-bottom: none; }

.bm-toast-host {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 70;
  background: #1a2260; color: #fff; font-size: 13px; font-weight: 600;
  padding: 12px 18px; border-radius: 9999px; max-width: 90vw;
}

@keyframes bm-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes bm-sheet-in { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes bm-spin { to { transform: rotate(360deg); } }

/* ── 로그인 (baromatch login.html) ─────────────────────────── */
.bm-login-page {
  min-height: 100vh;
  padding: 0;
  background: #fff;
}
.bm-login-inner {
  padding: 50px 24px 40px;
}
.bm-login-tagline {
  margin: 0 0 14px;
  text-align: center;
  color: #9b9b9b;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}
.bm-login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.bm-login-logo-icon {
  width: 45px;
  height: 64px;
  margin-bottom: 3px;
}
.bm-login-logo-main {
  color: #20248b;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}
.bm-login-logo-sub {
  margin-top: 5px;
  color: #a0a0a0;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.09em;
}
.bm-login-field-group {
  margin-bottom: 21px;
}
.bm-login-field-group label {
  display: block;
  margin-bottom: 9px;
  color: #666;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}
.bm-login-input {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #edf4ff;
  padding: 0 15px;
}
.bm-login-input:focus-within {
  border-color: #20248b;
  background: #edf4ff;
}
.bm-login-input input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #000;
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}
.bm-login-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  border: none;
  background: none;
  color: #b7b7b7;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.bm-login-options {
  display: flex;
  align-items: center;
  margin: 0 0 20px;
}
.bm-login-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6a6a6a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.bm-login-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #20248b;
}
.bm-login-submit {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 8px;
  background: #20248b;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.bm-login-submit:active {
  background: #171b72;
}
.bm-login-error {
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.bm-login-find {
  display: block;
  width: max-content;
  margin: 24px auto 0;
  border: none;
  background: none;
  color: #777;
  font-size: 14px;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}
.bm-login-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  border-radius: 9px;
  background: #eef0fb;
  color: #20248b;
  min-height: 38px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
}
.bm-login-demo svg { flex-shrink: 0; }
.bm-login-demo span { min-width: 0; }
.bm-login-demo strong { font-weight: 900; }
@media (max-width: 374px) {
  .bm-login-inner { padding-left: 18px; padding-right: 18px; }
  .bm-login-demo { font-size: 12px; gap: 6px; }
}
