/* ============================================
   BILLIGER-KAUFEN AFFILIATE THEME
   Conversion-optimiert & SEO-ready
   ============================================ */

:root {
  --primary: #e8281e;
  --primary-dark: #c41f16;
  --secondary: #ff9100;
  --accent: #1a1a2e;
  --success: #16a34a;
  --bg: #f8f8f8;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #e5e5e5;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75em;
  color: var(--accent);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin-bottom: 1em; }

/* ============================================
   LAYOUT
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

.content-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
}

/* ============================================
   HEADER
   ============================================ */
#header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  gap: 20px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.site-logo span { color: var(--primary); }
.site-logo .logo-icon { font-size: 1.8rem; }

/* Search */
.header-search {
  flex: 1;
  max-width: 500px;
}

.header-search form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.header-search form:focus-within { border-color: var(--primary); }

.header-search input {
  flex: 1;
  padding: 10px 20px;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
}

.header-search button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.header-search button:hover { background: var(--primary-dark); }

/* Navigation */
nav ul { list-style: none; display: flex; gap: 5px; flex-wrap: wrap; }
nav ul li a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
}
nav ul li a:hover, nav ul li.current-menu-item a {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* Category bar */
.category-bar {
  background: var(--accent);
  padding: 8px 0;
}

.category-bar ul { list-style: none; display: flex; gap: 0; overflow-x: auto; }
.category-bar ul li a {
  color: rgba(255,255,255,0.8);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: block;
  transition: color 0.2s;
}
.category-bar ul li a:hover { color: white; text-decoration: none; }

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--accent) 0%, #16213e 100%);
  padding: 60px 0;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-banner h1 {
  color: white;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 15px;
  position: relative;
}

.hero-banner h1 em {
  color: var(--secondary);
  font-style: normal;
}

.hero-banner p {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 30px;
  position: relative;
}

.hero-search {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  position: relative;
}

.hero-search input {
  flex: 1;
  padding: 18px 25px;
  font-size: 16px;
  border: none;
  outline: none;
}

.hero-search button {
  background: var(--secondary);
  color: var(--accent);
  border: none;
  padding: 18px 30px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.hero-search button:hover { background: #e68200; }

/* ============================================
   PRODUCT CARDS
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.product-card-image {
  position: relative;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  overflow: hidden;
}

.product-card-image img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  padding: 15px;
  transition: transform 0.3s;
}

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

.product-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-title a { color: var(--text); }
.product-card-title a:hover { color: var(--primary); text-decoration: none; }

.product-price-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.price-old {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border);
}

.product-card-footer .affiliate-btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* ============================================
   AFFILIATE BUTTON (Das wichtigste Element!)
   ============================================ */
.affiliate-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff9900 0%, #ff6600 100%);
  color: var(--accent) !important;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(255,153,0,0.4);
  position: relative;
  overflow: hidden;
}

.affiliate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.affiliate-btn:hover::before { left: 100%; }

.affiliate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,153,0,0.5);
}

.affiliate-btn .btn-price {
  font-size: 1.1rem;
  font-weight: 900;
}

.affiliate-btn .affiliate-disclaimer {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 400;
}

/* Großer CTA Button */
.affiliate-btn-large {
  padding: 20px 40px;
  font-size: 1.2rem;
  border-radius: var(--radius);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-bestseller { background: #ff9100; color: white; }
.badge-neu { background: var(--success); color: white; }
.badge-angebot { background: var(--primary); color: white; }
.badge-testsieger { background: #7c3aed; color: white; }

.discount-badge {
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
}

/* Absolute positioned badges */
.badge-absolute {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.discount-absolute {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* ============================================
   STAR RATINGS
   ============================================ */
.star-rating { font-size: 1.1rem; line-height: 1; }
.star-rating .star.full, .star-rating .star.half { color: #ff9100; }
.star-rating .star.empty { color: #ddd; }

.rating-block {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.rating-number { font-weight: 700; }
.rating-count { color: var(--text-muted); }

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

@media (max-width: 700px) {
  .product-detail-header { grid-template-columns: 1fr; }
}

.product-detail-image {
  background: #f5f5f5;
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}

.product-detail-image img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
}

.product-detail-info { display: flex; flex-direction: column; gap: 20px; }

.product-price-big {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
}

.product-price-big .old { font-size: 1.2rem; color: var(--text-muted); text-decoration: line-through; margin-left: 10px; }

.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.pros-list, .cons-list {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
}

.pros-list h4 { color: var(--success); margin-bottom: 10px; }
.cons-list h4 { color: var(--primary); margin-bottom: 10px; }

.pros-list ul, .cons-list ul { list-style: none; }
.pros-list ul li { padding: 4px 0; padding-left: 20px; position: relative; }
.pros-list ul li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.cons-list ul li { padding: 4px 0; padding-left: 20px; position: relative; }
.cons-list ul li::before { content: '✗'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table-wrapper { overflow-x: auto; margin: 30px 0; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comparison-table th {
  background: var(--accent);
  color: white;
  padding: 15px 20px;
  text-align: center;
  font-weight: 600;
}

.comparison-table th:first-child { text-align: left; }

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.comparison-table td:first-child { text-align: left; font-weight: 600; }

.comparison-table tr:hover td { background: #f9f9f9; }
.comparison-table .best-value td { background: #fffbeb; }
.comparison-table .check { color: var(--success); font-size: 1.2rem; }
.comparison-table .cross { color: var(--primary); font-size: 1.2rem; }

/* ============================================
   TOP LISTE (Amazon-Style)
   ============================================ */
.top-list { margin: 30px 0; }

.top-list-item {
  display: grid;
  grid-template-columns: 50px 200px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.top-list-item:hover { box-shadow: var(--shadow-hover); }

.top-list-item.rank-1 { border-left: 4px solid #FFD700; }
.top-list-item.rank-2 { border-left: 4px solid #C0C0C0; }
.top-list-item.rank-3 { border-left: 4px solid #CD7F32; }

.rank-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  text-align: center;
}

.rank-1 .rank-number { color: #FFD700; }
.rank-2 .rank-number { color: #C0C0C0; }
.rank-3 .rank-number { color: #CD7F32; }

@media (max-width: 700px) {
  .top-list-item { grid-template-columns: 40px 120px 1fr; }
  .top-list-item .affiliate-btn { grid-column: 1/-1; }
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { display: flex; flex-direction: column; gap: 30px; }

.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  color: var(--accent);
}

/* Preis-Alarm Widget */
.price-alert-widget input {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 14px;
}

.price-alert-widget button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 15px 0;
  flex-wrap: wrap;
}

.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); text-decoration: none; }
.breadcrumbs .separator { color: var(--border); }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* ============================================
   PRICE UPDATE NOTICE (Amazon-Pflicht!)
   ============================================ */
.price-update-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-size: 12px;
  color: #92400e;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  background: var(--accent);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col ul li a:hover { color: white; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
}

.footer-affiliate-notice {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  font-size: 12px;
  margin-bottom: 30px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 50px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 10px auto 0; }

/* Deal of the Day Banner */
.deal-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
  color: white;
  border-radius: var(--radius);
  padding: 30px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.deal-banner .deal-text h3 { color: white; margin-bottom: 5px; }
.deal-banner .deal-text p { opacity: 0.85; margin: 0; }

.deal-countdown {
  display: flex;
  gap: 10px;
  align-items: center;
}

.countdown-block {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  text-align: center;
  min-width: 50px;
}

.countdown-block .num { font-size: 1.5rem; font-weight: 900; display: block; }
.countdown-block .label { font-size: 10px; opacity: 0.75; text-transform: uppercase; }

/* ============================================
   MOBILE NAV
   ============================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 2px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav { display: none; }
  .main-nav.active { display: block; width: 100%; }
  .main-nav ul { flex-direction: column; }
  .header-search { display: none; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-30 { margin-top: 30px; }
.hidden { display: none; }

.loading { opacity: 0.5; pointer-events: none; }

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   PRINT (wichtig für Amazon-Compliance)
   ============================================ */
@media print {
  .affiliate-btn { display: none; }
  #header, #footer { display: none; }
}

/* Google Fonts laden */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800;900&display=swap');
