:root {
  --brand: #d4af37;
  --brand-dark: #0d0d0d;
  --bg: #f8f8f6;
}

body {
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.app-navbar {
  background: var(--brand-dark);
  border-bottom: 2px solid var(--brand);
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
}

.login-body {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.login-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.stat-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card {
  border-radius: 12px;
}

.item-card {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.item-photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eee;
}

.item-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #bbb;
}

.best-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}

.sale-item-picker-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.sale-item-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-picker-col[data-out-of-stock="1"] {
  pointer-events: none;
}

.item-picker-col[data-out-of-stock="1"] .item-card {
  opacity: 0.45;
}

.item-picker-col:not([data-out-of-stock="1"]) .item-card {
  cursor: pointer;
}

.stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-color: #000;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 212, 175, 55;
}

.star-rate-form {
  display: flex;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
  color: #d8d8d8;
  cursor: pointer;
}

.star-btn.filled {
  color: var(--brand);
}

.star-btn:hover {
  color: var(--brand);
  transform: scale(1.1);
}

.nav-link.active {
  font-weight: 600;
  color: var(--brand) !important;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-underline-offset: 6px;
}

.app-navbar .nav-link:hover {
  color: var(--brand) !important;
}

.restock-alert-card {
  border: none;
  border-radius: 14px;
  border-left: 4px solid #dc3545;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.restock-item-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  height: 100%;
}

.restock-item-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.restock-item-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  color: #bbb;
  font-size: 1.8rem;
}

#restockCarousel .carousel-control-prev,
#restockCarousel .carousel-control-next {
  width: 3rem;
}

#restockCarousel .carousel-control-prev-icon,
#restockCarousel .carousel-control-next-icon {
  background-color: rgba(0,0,0,0.35);
  border-radius: 50%;
  padding: 0.9rem;
}

#restockCarousel .carousel-indicators {
  bottom: -0.5rem;
}

#restockCarousel .carousel-indicators button {
  background-color: var(--brand);
}

.live-visitors-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eafaf0;
  color: #146c43;
  border: 1px solid #b8ecd0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2fbf6e;
  box-shadow: 0 0 0 rgba(47, 191, 110, 0.6);
  animation: live-dot-pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes live-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 110, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(47, 191, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 110, 0); }
}

/* ------------------------------------------------------------------------
   Public storefront (Facebook-style feed)
   ------------------------------------------------------------------------ */

.public-body {
  background: #e9ebee;
}

.public-header {
  background: var(--brand-dark);
  border-bottom: 2px solid var(--brand);
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.public-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
}

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

.public-main {
  padding: 16px 0 48px;
}

.feed-wrap,
.item-detail-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 12px;
}

.feed-batch {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.sale-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 4px 0 14px;
}

.feed-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.feed-card-photo-link {
  display: block;
  position: relative;
}

.feed-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #eee;
}

.feed-card-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #bbb;
}

.feed-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.feed-card-badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.85rem;
}

.feed-card-body {
  padding: 12px 14px 14px;
}

.feed-card-name {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  color: #111;
  text-decoration: none;
  margin-bottom: 2px;
}

.feed-card-name:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.feed-card-price {
  font-weight: 700;
  font-size: 1.1rem;
}

.feed-card-price-original {
  font-weight: 400;
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
  margin-right: 6px;
}

.btn-telegram {
  --bs-btn-bg: #229ed9;
  --bs-btn-border-color: #229ed9;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #1b7fb0;
  --bs-btn-hover-border-color: #1b7fb0;
  --bs-btn-hover-color: #fff;
}

.item-detail-back {
  display: inline-block;
  margin: 4px 0 12px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

.item-detail-back:hover {
  color: var(--brand-dark);
}

.item-detail-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.item-detail-photo-wrap {
  position: relative;
}

.item-detail-photo {
  width: 100%;
  max-height: 480px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #eee;
}

.item-detail-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #bbb;
}

.item-detail-body {
  padding: 18px 18px 22px;
}

.item-detail-price {
  font-size: 1.6rem;
  font-weight: 700;
}

.item-detail-price-original {
  font-weight: 400;
  font-size: 1.1rem;
  color: #999;
  text-decoration: line-through;
  margin-right: 8px;
}
