:root {
  --bic-red: #E70012;
  --bic-red-dark: #B8000E;
  --bg: #FAFAFA;
  --card-bg: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --border: #E5E5E5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 72px; /* space for fixed tab bar */
}

/* ---- Header ---- */
.bikku-header {
  background: var(--bic-red);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bikku-logo-badge {
  width: 40px;
  height: 40px;
  background: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.bikku-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bikku-app-name {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* ---- Tab panels ---- */
.bikku-tab-panel {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}

.bikku-placeholder {
  color: var(--text-muted);
  text-align: center;
  padding: 48px 16px;
}

.bikku-error {
  color: var(--bic-red-dark);
  text-align: center;
  padding: 24px 16px;
}

/* ---- Search bar ---- */
.bikku-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.bikku-search-bar input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* prevents iOS auto-zoom on focus */
}

.bikku-search-bar input:focus {
  outline: 2px solid var(--bic-red);
  outline-offset: 1px;
}

.bikku-search-bar button {
  padding: 12px 18px;
  background: var(--bic-red);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.bikku-search-bar button:hover,
.bikku-search-bar button:focus {
  background: var(--bic-red-dark);
}

.bikku-status {
  color: var(--text-muted);
  font-size: 14px;
  min-height: 20px;
  margin: 4px 2px 12px;
}

/* ---- Result cards ---- */
.bikku-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bikku-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.stock-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.stock-in { background: #E3F6E8; color: #1F8A3B; }
.stock-low { background: #FFF3D6; color: #A6720B; }
.stock-order { background: #EDEDED; color: #4A4A4A; }
.stock-preorder { background: #EDE7FA; color: #6633CC; }
.stock-digital { background: #E3EEFB; color: #1B5FAD; }
.stock-unknown { background: #F0F0F0; color: #707070; }

.card-price-breakdown {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-bottom: 4px;
}

.price-row {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding: 1px 0;
}

.price-usd {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

.coupon-applied {
  font-size: 11px;
  color: #1F8A3B;
  font-weight: 600;
}

.coupon-excluded {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.card-used {
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0;
}

.card-actions {
  margin-top: 10px;
}

/* ---- Bottom tab bar ---- */
.bikku-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 10;
}

.bikku-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  color: var(--text-muted);
}

.bikku-tab img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.55;
}

.bikku-tab span {
  font-size: 11px;
  font-weight: 500;
}

.bikku-tab.active {
  color: var(--bic-red);
}

.bikku-tab.active img {
  opacity: 1;
}

.bikku-tab:focus-visible {
  outline: 2px solid var(--bic-red);
  outline-offset: -2px;
}
