html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.category-filter-btn.active {
  color: #fff;
}

.decision-filter-btn {
  border-width: 2px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: #fff;
}

.decision-filter-buy {
  color: #17663f;
  border-color: #87d6ae;
}

.decision-filter-dont-buy {
  color: #8a1f45;
  border-color: #f0a5bc;
}

.decision-filter-unknown {
  color: #7a5200;
  border-color: #f4cb74;
}

.decision-filter-btn.is-active {
  color: #fff;
}

.decision-filter-buy.is-active {
  background: #1f8a56;
  border-color: #1f8a56;
}

.decision-filter-dont-buy.is-active {
  background: #bf2f62;
  border-color: #bf2f62;
}

.decision-filter-unknown.is-active {
  background: #bc7d00;
  border-color: #bc7d00;
}

.min-w-0 {
  min-width: 0;
}

.product-thumb-link {
  display: block;
  text-decoration: none;
}

.product-thumb {
  width: 96px;
  height: 96px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f9fa;
}

.product-thumb-lg {
  width: 140px;
  height: 140px;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  display: block;
}

.product-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
  color: #6c757d;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.5rem;
}

.product-thumb.is-missing .product-thumb-placeholder {
  display: flex;
}

.product-upload-preview {
  width: 100%;
  max-width: 280px;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  display: block;
}

.camera-video-preview {
  width: 100%;
  max-width: 360px;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  background: #000;
  display: block;
}

.ai-analyze-state {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
}

.product-rating-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.product-rating-mini-star {
  color: #ffc107;
  line-height: 1;
}

.product-decision-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.product-decision-inline i {
  font-size: 0.8rem;
  color: #6c757d;
}

.product-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.product-rating-star {
  color: #ced4da;
  font-size: 1.15rem;
  line-height: 1;
}

.product-rating-star.is-filled {
  color: #ffc107;
}

.product-detail-card {
  border-radius: 1rem;
}

.product-detail-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.product-detail-image {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 0.9rem;
}

.product-detail-image img {
  object-fit: contain;
}

.product-detail-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.product-detail-metric-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.9rem;
  width: 100%;
  max-width: 100%;
}

.product-detail-row-icon {
  width: 1.3rem;
  min-width: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

.product-detail-row-icon i {
  font-size: 0.9rem;
}

.product-detail-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
}

.product-detail-rating-stars .product-rating-star {
  font-size: 1.3rem;
}

.product-detail-row-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #212529;
  overflow-wrap: anywhere;
}

.product-detail-rating-row {
  gap: 0;
}

.product-detail-decision.is-buy {
  color: #1e7d4e;
}

.product-detail-decision.is-buy .product-detail-row-icon {
  color: #2f9e62;
}

.product-detail-decision.is-dont-buy {
  color: #9b2c52;
}

.product-detail-decision.is-dont-buy .product-detail-row-icon {
  color: #d6336c;
}

.product-detail-decision.is-maybe {
  color: #946200;
}

.product-detail-decision.is-maybe .product-detail-row-icon {
  color: #f59f00;
}

.product-detail-tag {
  font-size: 0.95rem;
  padding: 0.4rem 0.7rem;
}

.product-detail-tags .badge {
  font-weight: 600;
}

.product-detail-text-wrap {
  padding-top: 0.15rem;
}

.product-detail-description {
  font-size: 1.04rem;
  line-height: 1.55;
  color: #212529;
}

.product-detail-note {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #495057;
}

.product-grid-image-link {
  text-decoration: none;
}

.product-grid-card {
  position: relative;
}

.product-grid-main-link {
  border-radius: 0.5rem;
}

.product-grid-action-btn {
  position: relative;
  z-index: 2;
}

.product-grid-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 120px;
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0 0;
  background: #f8f9fa;
}

.product-grid-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  display: block;
}

.product-grid-image-wrap .product-thumb-placeholder {
  height: 100%;
}

@media (max-width: 576px) {
  .product-grid-image-wrap {
    max-height: 160px;
  }

  .product-detail-row-value {
    font-size: 1.15rem;
  }
}

.product-grid-image-wrap.is-missing .product-thumb-placeholder {
  display: flex;
}

.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.1rem;
}

.star-rating-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-rating-star {
  color: #ced4da;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  padding: 0.125rem;
}

.star-rating-star:hover,
.star-rating-star:hover ~ .star-rating-star {
  color: #ffd966;
}

.star-rating-input:checked ~ .star-rating-star {
  color: #ffc107;
}

.star-rating-input:focus-visible + .star-rating-star {
  outline: 2px solid rgba(13, 110, 253, 0.5);
  outline-offset: 2px;
  border-radius: 0.2rem;
}

.decision-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.375rem;
}

.decision-toggle-btn {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: 0.65rem;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0.65rem;
}

.btn-check:checked + .decision-toggle-btn {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

.btn-check:focus-visible + .decision-toggle-btn {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

@media (max-width: 576px) {
  .decision-toggle-btn {
    font-size: 0.85rem;
    min-height: 2.5rem;
  }

  .star-rating-star {
    font-size: 1.35rem;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
