/* ============================================
   EcransPC.com — Components
   ============================================ */

/* --- Product Image Block (in articles) --- */
.product-image {
  display: block;
  height: 800px;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border-light);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: 0 0 0 1px rgba(108, 92, 231, 0.1), var(--shadow-md);
  background: #000;
}

.product-image:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(108, 92, 231, 0.3), var(--shadow-lg), 0 0 30px rgba(108, 92, 231, 0.1);
  transform: translateY(-2px);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  object-fit: contain;
  padding: var(--space-md);
}

/* --- Product Card --- */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-light);
}

.product-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-lg);
  transition: transform var(--transition-base);
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
}

.product-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__category {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
  margin-bottom: var(--space-xs);
}

.product-card__title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.product-card__title a {
  color: var(--color-text);
}

.product-card__title a:hover {
  color: var(--color-primary-light);
}

.product-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.product-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* --- Spec Tag --- */
.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
}

.badge--gold {
  background: linear-gradient(135deg, #F9A825, #FF8F00);
  color: #1A1A2E;
}

.badge--silver {
  background: linear-gradient(135deg, #90A4AE, #607D8B);
  color: #FFFFFF;
}

.badge--bronze {
  background: linear-gradient(135deg, #A1887F, #795548);
  color: #FFFFFF;
}

.badge--new {
  background: var(--color-accent);
  color: #1A1A2E;
}

.badge--promo {
  background: var(--color-danger);
  color: #FFFFFF;
}

/* --- Rating --- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating__stars {
  display: flex;
  gap: 2px;
  color: var(--color-warning);
  font-size: var(--text-sm);
}

.rating__stars--empty {
  color: var(--color-border);
}

.rating__score {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.rating__score--lg {
  font-size: var(--text-2xl);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Comparison Table --- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.comparison-table thead {
  background: var(--color-bg-alt);
}

.comparison-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.comparison-table__product-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.comparison-table__highlight {
  color: var(--color-accent);
  font-weight: var(--font-weight-semibold);
}

/* --- Responsive table wrapper --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}

/* --- Guide Card (Article listing) --- */
.guide-card {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-light);
}

.guide-card__image {
  width: 280px;
  min-height: 180px;
  flex-shrink: 0;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.guide-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.guide-card:hover .guide-card__image img {
  transform: scale(1.05);
}

.guide-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.guide-card__category {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
  margin-bottom: var(--space-xs);
}

.guide-card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.guide-card__title a {
  color: var(--color-text);
}

.guide-card__title a:hover {
  color: var(--color-primary-light);
}

.guide-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
  flex: 1;
}

.guide-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .guide-card {
    flex-direction: column;
  }
  .guide-card__image {
    width: 100%;
    height: 200px;
  }
}

/* --- Pros / Cons --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.pros-cons__list {
  list-style: none;
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.pros-cons__list--pros {
  border-top: 3px solid var(--color-success);
}

.pros-cons__list--cons {
  border-top: 3px solid var(--color-danger);
}

.pros-cons__heading {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.pros-cons__list--pros .pros-cons__heading {
  color: var(--color-success);
}

.pros-cons__list--cons .pros-cons__heading {
  color: var(--color-danger);
}

.pros-cons__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.pros-cons__item::before {
  flex-shrink: 0;
  font-size: var(--text-sm);
  margin-top: 1px;
}

.pros-cons__list--pros .pros-cons__item::before {
  content: '+';
  color: var(--color-success);
  font-weight: bold;
}

.pros-cons__list--cons .pros-cons__item::before {
  content: '-';
  color: var(--color-danger);
  font-weight: bold;
}

@media (max-width: 768px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

/* --- Score Circle --- */
.score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  position: relative;
}

.score-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.score-circle__value {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- FAQ Accordion --- */
.faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq__question {
  width: 100%;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
  font-family: var(--font-sans);
}

.faq__question:hover {
  color: var(--color-primary-light);
}

.faq__icon {
  font-size: var(--text-xl);
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: var(--space-md);
  color: var(--color-text-muted);
}

.faq__item--open .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq__answer-inner {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* --- Stats Row --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
}

.stat {
  text-align: center;
}

.stat__value {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* --- Category Pills (for filters) --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
}

.filter-pill {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.filter-pill--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

/* --- Amazon CTA Box --- */
.amazon-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  gap: var(--space-lg);
}

.amazon-cta__info {
  flex: 1;
}

.amazon-cta__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

.amazon-cta__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

@media (max-width: 480px) {
  .amazon-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Notification / Disclaimer Bar --- */
.disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  line-height: var(--line-height-relaxed);
  border-left: 3px solid var(--color-border);
}

/* --- Table of Contents --- */
.toc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.toc__title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.toc__list {
  list-style: none;
  counter-reset: toc;
}

.toc__list li {
  counter-increment: toc;
}

.toc__list a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.toc__list li:last-child a {
  border-bottom: none;
}

.toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: var(--text-xs);
  color: var(--color-primary-light);
  font-weight: var(--font-weight-semibold);
  min-width: 24px;
}

.toc__list a:hover {
  color: var(--color-text);
}
