/* ============================================================
   Base Styles - Design System, Reset, Typography, Shared Components
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-cta: #C41E2A;
  --color-cta-hover: #A01520;
  --color-cta-v2: #2E7D32;
  --color-cta-v2-hover: #1B5E20;
  --color-rating-excellent: #00B572;
  --color-rating-very-good: #4CAF50;
  --color-rating-good: #FF9800;
  --color-rating-fair: #F57C00;
  --color-discount: #E65100;
  --color-bg: #F5F5F5;
  --color-bg-white: #FFFFFF;
  --color-card: #FFFFFF;
  --color-text: #212121;
  --color-text-secondary: #616161;
  --color-text-light: #9E9E9E;
  --color-border: #E0E0E0;
  --color-border-light: #EEEEEE;
  --color-badge-gold: #FFB300;
  --color-badge-silver: #90A4AE;
  --color-badge-bronze: #A1887F;
  --color-trust-bg: #F0F4F8;
  --color-footer-bg: #1A1A2E;
  --color-footer-text: #B0B0C0;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --max-width: 1080px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* --- Typography --- */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

/* --- Header --- */
.site-header {
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-cta);
}

.site-logo span {
  color: var(--color-text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

.lang-switcher {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-left: 8px;
}

.lang-switcher a {
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.lang-switcher a.active {
  background: var(--color-cta);
  color: white;
}

.lang-switcher a:hover:not(.active) {
  background: var(--color-bg);
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 56px 0 40px;
  background: var(--color-bg-white);
}

.hero h1 {
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.hero-updated {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--color-text-light);
  background: var(--color-bg);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero-intro {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Product Section --- */
.products-section {
  padding: 32px 0 48px;
}

/* --- Shared Product Card Elements --- */
.product-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 800;
  color: white;
}

.product-rank.rank-1 { background: var(--color-badge-gold); }
.product-rank.rank-2 { background: var(--color-badge-silver); }
.product-rank.rank-3 { background: var(--color-badge-bronze); }
.product-rank.rank-4 { background: var(--color-text-light); }

.product-logo-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.comparison-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 50%;
}

.rating-badge.rating-excellent { border-color: var(--color-rating-excellent); color: var(--color-rating-excellent); }
.rating-badge.rating-very-good { border-color: var(--color-rating-very-good); color: var(--color-rating-very-good); }
.rating-badge.rating-good { border-color: var(--color-rating-good); color: var(--color-rating-good); }
.rating-badge.rating-fair { border-color: var(--color-rating-fair); color: var(--color-rating-fair); }

.rating-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-list li {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--color-rating-very-good);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
}

.price-original {
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

.price-current {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
}

.price-period {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 400;
}

.discount-badge {
  display: inline-block;
  background: var(--color-discount);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.money-back-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.money-back-badge::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--color-rating-very-good);
  border-radius: 50%;
  flex-shrink: 0;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  border-radius: var(--radius);
  transition: all 0.2s;
  text-align: center;
  gap: 8px;
}

.cta-button::after {
  content: "→";
  font-size: 1.1em;
}

.cta-button-red {
  background: var(--color-cta);
}
.cta-button-red:hover { background: var(--color-cta-hover); }

.cta-button-green {
  background: var(--color-cta-v2);
}
.cta-button-green:hover { background: var(--color-cta-v2-hover); }

.platform-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.platform-badge {
  font-size: 0.7rem;
  color: var(--color-text-light);
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* --- Star Rating --- */
.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  width: 16px;
  height: 16px;
  background: var(--color-badge-gold);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
}

.star.half {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='h'%3E%3Cstop offset='50%25' stop-color='currentColor'/%3E%3Cstop offset='50%25' stop-color='%23E0E0E0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23h)' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='h'%3E%3Cstop offset='50%25' stop-color='currentColor'/%3E%3Cstop offset='50%25' stop-color='%23E0E0E0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23h)' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
}

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

/* --- Editors Picks --- */
.editors-picks-section {
  padding: 64px 0;
  position: relative;
  background: #F2F2F2;
}

.editors-picks-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.editors-picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.ep-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ep-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-rank {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text);
}

.ep-deal-badge {
  display: inline-block;
  background: #FEE55E;
  color: #111;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ep-rating-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ep-logo {
  width: 80px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.ep-separator-v {
  width: 1px;
  height: 48px;
  background: #E0E0E0;
  flex-shrink: 0;
}

.ep-rating {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-rating-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111;
  line-height: 1;
}

.ep-stars {
  display: flex;
  gap: 1px;
}

.ep-star {
  font-size: 0.85rem;
  color: #FFB300;
}

.ep-star.empty {
  color: #D8D8D8;
}

.ep-rating-text {
  font-size: 0.7rem;
  font-weight: 500;
  color: #777;
}

.ep-separator-h {
  height: 1px;
  background: #E8E8E8;
}

.ep-description {
  font-size: 0.825rem;
  line-height: 1.6;
  color: #353535;
}

.ep-description strong {
  color: #111;
}

.ep-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ep-detail-row dt {
  font-size: 0.8rem;
  color: #777;
}

.ep-detail-row dd {
  font-size: 0.8rem;
  font-weight: 600;
  color: #111;
  text-align: right;
}

.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  margin-top: auto;
}

.ep-btn svg {
  width: 18px;
  height: 18px;
}

.ep-btn-black {
  background: #111;
  color: #fff;
}

.ep-btn-black:hover {
  background: #353535;
}

.ep-btn-white {
  background: #fff;
  color: #111;
  border: 1px solid #D8D8D8;
}

.ep-btn-white:hover {
  background: #F5F5F5;
}

/* --- Trust Signals --- */
.trust-section {
  background: var(--color-trust-bg);
  padding: 32px 0;
}

.trust-inner {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.trust-icon {
  width: 36px;
  height: 36px;
  background: var(--color-rating-very-good);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- FAQ Section --- */
.faq-section {
  padding: 48px 0;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 32px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  gap: 16px;
  background: none;
  border: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-text-light);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 40px 0 24px;
}

.footer-disclosure {
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--color-footer-text);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Cookie Consent --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-white);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  z-index: 9999;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  min-width: 280px;
}

.cookie-text a {
  color: var(--color-cta);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: var(--color-cta);
  color: white;
}

.cookie-btn-accept:hover {
  background: var(--color-cta-hover);
}

.cookie-btn-necessary {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.cookie-btn-necessary:hover {
  background: var(--color-border);
}

/* --- Sticky Footer --- */
.sticky-footer {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 960px;
  z-index: 200;
  transition: bottom 0.3s ease-in-out;
}

.sticky-footer.visible {
  bottom: 20px;
}

.sticky-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 2px solid #111111;
  border-radius: var(--radius);
  padding: 10px 16px;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
  gap: 16px;
}

.sticky-footer-link:hover .sticky-footer-btn {
  background: #353535;
}

.sticky-footer-left {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.sticky-footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.sticky-footer-divider {
  width: 1px;
  height: 40px;
  background: #E0E0E0;
  margin: 0 12px;
  flex-shrink: 0;
}

.sticky-footer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sticky-footer-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sticky-footer-badge-black {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: #111111;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
}

.sticky-footer-rating {
  font-size: 0.8rem;
  font-weight: 700;
  color: #111111;
}

.sticky-footer-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: #111111;
}

.sticky-footer-title b {
  font-weight: 700;
}

.sticky-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  background: #111111;
  color: #FFFFFF;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sticky-footer-btn svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .sticky-footer-btn {
    display: none;
  }

  .sticky-footer-logo {
    width: 40px;
    height: 40px;
  }

  .sticky-footer-link {
    padding: 8px 12px;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  .section { padding: 32px 0; }
  .hero { padding: 40px 0 32px; }

  .header-nav a:not(.lang-switcher a) {
    display: none;
  }

  .trust-inner {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  /* Editors picks: horizontal scroll on tablet */
  .editors-picks-grid {
    grid-template-columns: repeat(3, 280px);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .editors-picks-grid::-webkit-scrollbar {
    display: none;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .container { padding: 0 16px; }
  .hero { padding: 32px 0 24px; }
  .hero-intro { font-size: 0.875rem; }
}
