:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --accent-primary: #e94f70;
  --accent-primary-rgb: 233, 79, 112;
  --accent-primary-hover: #d63361;
  --accent-success: #10b981;
  --accent-success-rgb: 16, 185, 129;
  --accent-warning: #f43f5e;
  --accent-warning-rgb: 244, 63, 94;
  --accent-hot: #f97316;
  --accent-hot-rgb: 249, 115, 22;

  --border-color: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);

  --card-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.12), 0 2px 8px -1px rgba(148, 163, 184, 0.08);
  --card-shadow-hover: 0 20px 25px -5px rgba(233, 79, 112, 0.18), 0 10px 10px -5px rgba(233, 79, 112, 0.1);
  --modal-bg: rgba(15, 23, 42, 0.6);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}


.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.nav-search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
  background: var(--bg-secondary);
}

.nav-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* App Container */
.main-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1;
}

/* View Container animation */
.view-container {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Home Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #d78f9f 100%);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  color: #ffffff;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px -5px rgba(var(--accent-primary-rgb), 0.4);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(var(--accent-primary-rgb), 0.6);
}

.hero-preview {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Live Countdown Box */
.deal-countdown {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.countdown-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-weight: 600;
}

.countdown-timer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.timer-unit {
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--border-radius-sm);
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-number {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.timer-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Category Grid / Slider */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.section-link:hover {
  gap: 8px;
}

.categories-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 40px;
  scrollbar-width: thin;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.category-chip:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.category-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.3);
}

.category-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Hot and Expiring Sections */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* Expiring Section Horizontal Scroller */
.carousel-wrapper {
  position: relative;
  margin-bottom: 48px;
}

.carousel-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 8px 4px 20px 4px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.carousel-container::-webkit-scrollbar {
  height: 6px;
}

.carousel-container::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}

.carousel-container .coupon-card {
  flex: 0 0 350px;
}

/* Popular Stores Circle Badges */
.stores-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px 32px;
  margin-bottom: 48px;
  box-shadow: var(--card-shadow);
}

.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 16px 20px;
  justify-items: center;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .stores-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.store-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.store-logo-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #ffffff;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-badge:hover .store-logo-wrapper {
  transform: scale(1.1) translateY(-4px);
  outline-color: var(--accent-primary);
  box-shadow: 0 12px 20px -4px rgba(var(--accent-primary-rgb), 0.3);
}

.store-badge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.store-badge:hover .store-badge-name {
  color: var(--accent-primary);
}

/* Coupon Card - Ticket Style */
.coupon-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

/* Ticket Side Indentations */
.coupon-card::before,
.coupon-card::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--bg-primary);
  border-radius: 50%;
  z-index: 5;
  transition: background-color 0.3s ease;
}

/* Left & Right indents matching the separation line */
.coupon-card::before {
  left: -8px;
  bottom: 80px;
  border-right: 1px solid var(--border-color);
}

.coupon-card::after {
  right: -8px;
  bottom: 80px;
  border-left: 1px solid var(--border-color);
}

/* Top Card Body */
.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-store {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.card-store:hover {
  color: var(--accent-primary);
}

.card-store-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.card-labels {
  display: flex;
  gap: 6px;
}

.badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-hot {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.badge-expiring {
  background: rgba(244, 63, 94, 0.12);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.card-discount-val {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-expiry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.card-expiry svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Separation Line */
.card-divider {
  border-top: 1px dashed var(--border-color);
  margin: 0 16px;
  position: relative;
}

/* Bottom Card Action */
.card-action {
  padding: 16px 24px 20px 24px;
  height: 80px;
  display: flex;
  align-items: center;
}

.coupon-btn {
  width: 100%;
  height: 44px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Coupon Button - Code Type (Masked code look) */
.coupon-btn-code {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border: 2px dashed rgba(var(--accent-primary-rgb), 0.3);
  position: relative;
  overflow: hidden;
}

.coupon-btn-code:hover {
  background: rgba(var(--accent-primary-rgb), 0.06);
  border-color: var(--accent-primary);
}

/* Scissors cutout for Get Code */
.coupon-btn-code svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Coupon Button - Sale Type (Full Gradient) */
.coupon-btn-deal {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(var(--accent-primary-rgb), 0.2);
}

.coupon-btn-deal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(var(--accent-primary-rgb), 0.35);
}

/* Single Store Page View */
.store-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.store-profile {
  display: flex;
  align-items: center;
  gap: 24px;
}

.store-large-logo {
  width: 100px;
  height: 100px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 32px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.store-details h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.store-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-category {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
  padding: 4px 12px;
  border-radius: 50px;
}

.store-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #eab308;
}

.store-rating svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.store-desc {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.store-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.store-link-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.store-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.store-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.sidebar-title {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.stat-label {
  color: var(--text-muted);
}

.stat-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* Coupon Dialog (Modal Popup) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-store-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.modal-store-name {
  font-size: 18px;
  font-weight: 700;
}

.modal-discount {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Coupon Code Box inside Modal */
.code-box {
  background: var(--bg-tertiary);
  border: 2px dashed var(--accent-primary);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.code-text {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.copy-btn {
  background: var(--accent-primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(var(--accent-primary-rgb), 0.2);
}

.copy-btn:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 6px 14px rgba(var(--accent-primary-rgb), 0.3);
}

.modal-terms {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  line-height: 1.5;
}

/* Global Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1100;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  width: 18px;
  height: 18px;
  fill: var(--accent-success);
}

/* Empty search state */
.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  fill: currentColor;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Breadcrumb navigation for single store view */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb-item {
  cursor: pointer;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  color: var(--border-color);
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer Section */
footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-text {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .store-layout,
  .blog-post-layout {
    grid-template-columns: 1fr;
  }
  .store-sidebar {
    order: 2;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }
  .nav-search {
    order: 3;
    max-width: 100%;
  }
  .hero-banner {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .hero-preview {
    justify-content: flex-start;
  }
  .store-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 24px;
  }
  .store-profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .store-link-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }
  .coupons-grid {
    grid-template-columns: 1fr;
  }
  .carousel-container .coupon-card {
    flex: 0 0 100%;
  }
  .coupon-card::before {
    bottom: 74px;
  }
  .coupon-card::after {
    bottom: 74px;
  }
  .card-action {
    height: 74px;
    padding: 12px 16px 16px 16px;
  }
}

/* ==========================================================================
   EXPANDED STYLES: Ad Banners, Lists Grids, and Blog Layouts
   ========================================================================== */

/* Ad Banner Spot A (Horizontal Homepage Banner) */
.ad-banner-a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px 24px;
  margin-top: 16px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  gap: 20px;
  transition: border-color 0.3s ease;
}

.ad-banner-a:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.ad-banner-a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent-primary), #a855f7);
}

.ad-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  align-self: center;
  white-space: nowrap;
  border: 1px solid var(--border-color);
}

.ad-a-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-a-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.ad-a-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ad-a-btn {
  background: var(--accent-primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(var(--accent-primary-rgb), 0.15);
}

.ad-a-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(var(--accent-primary-rgb), 0.25);
}

/* Ad Banner Spot B (Vertical Sidebar Banner) */
.ad-banner-b {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.ad-banner-b:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.ad-banner-b::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(to right, var(--accent-primary), #a855f7);
}

.ad-banner-b-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ad-banner-b-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.ad-banner-b-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ad-banner-b-promo {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
  font-family: monospace;
  margin-top: 4px;
  border: 1px dashed rgba(var(--accent-primary-rgb), 0.3);
}

.ad-btn-b {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(var(--accent-primary-rgb), 0.15);
}

.ad-btn-b:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(var(--accent-primary-rgb), 0.25);
}

/* Stores List Page Grid */
.stores-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.store-list-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-list-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.store-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
}

.store-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.store-card-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.store-card-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 6px;
  margin-bottom: 12px;
}

.store-card-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-success);
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Categories List Page Grid */
.categories-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.category-list-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-list-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.category-card-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(var(--accent-primary-rgb), 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.category-list-card:hover .category-card-icon-wrapper {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 8px 16px -4px rgba(var(--accent-primary-rgb), 0.3);
}

.category-card-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.category-card-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.category-card-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Blog Layouts */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.blog-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.blog-card-cover {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-readtime {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.blog-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.blog-card-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  transition: all 0.2s ease;
}

.blog-card:hover .blog-card-link {
  gap: 10px;
}

/* Single Blog Post Layout */
.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}

.blog-post-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.blog-post-cover {
  height: 320px;
  position: relative;
  overflow: hidden;
}

.blog-post-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.blog-post-cover-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 40px;
  z-index: 2;
}

.blog-post-tag {
  align-self: flex-start;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.blog-post-main-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.meta-dot {
  color: #64748b;
}

.blog-post-body-text {
  padding: 40px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.blog-post-body-text p {
  margin-bottom: 24px;
}

.blog-post-body-text h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 16px;
}

.sidebar-store-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  cursor: pointer;
}

.sidebar-store-promo:hover .store-logo-wrapper {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 20px -4px rgba(var(--accent-primary-rgb), 0.3);
}

.category-large-icon {
  width: 48px;
  height: 48px;
  fill: #ffffff;
}

/* Responsiveness for new sections */
@media (max-width: 768px) {
  .ad-banner-a {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .ad-badge {
    align-self: flex-start;
  }
  .ad-a-btn {
    width: 100%;
    text-align: center;
  }
  .blog-post-cover {
    height: 240px;
  }
  .blog-post-cover-overlay {
    padding: 20px 24px;
  }
  .blog-post-main-title {
    font-size: 24px;
  }
  .blog-post-body-text {
    padding: 24px;
  }
}

/* ==========================================================================
   SPARGUTSCHWEIN – Hugo-spezifische Erweiterungen
   ========================================================================== */

/* Neukunden-Badge */
.badge-new {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.2);
}

/* MBW (Mindestbestellwert) Anzeige auf Karte */
.card-mbw {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 8px;
}
.card-mbw svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Modal Badges (Neukunden, Newsletter etc.) */
.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.modal-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-badge-info {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.modal-badge-warn {
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Blog-Kategorie-Bar */
.blog-categories-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.blog-card-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  margin-bottom: 4px;
  display: block;
}

/* Blog Card Link-Wrap (ganze Karte klickbar) */
.blog-card-link-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Blog Teaser Section auf Homepage */
.blog-teaser-section {
  margin-top: 48px;
}

/* Blog-Post Related Posts */
.related-posts {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.related-post-card {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}
.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.related-post-cover {
  height: 80px;
}
.related-post-info {
  padding: 12px;
}
.related-post-info h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* Prose / Content Styles */
.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.prose h2 { font-size: 24px; margin-top: 40px; margin-bottom: 16px; }
.prose h3 { font-size: 20px; margin-top: 32px; margin-bottom: 12px; }
.prose p { margin-bottom: 20px; }
.prose ul, .prose ol { margin-bottom: 20px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent-primary); text-decoration: underline; }
.prose strong { color: var(--text-primary); }
.prose blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(var(--accent-primary-rgb), 0.04);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-style: italic;
}
.prose code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 14px;
}

/* Page Content Section (SEO-Text unter Stores/Kategorien) */
.page-content-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--card-shadow);
  z-index: 200;
  max-height: 360px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: var(--text-primary);
}
.search-result-item:hover {
  background: var(--bg-tertiary);
}
.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content:center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.search-result-title { font-size: 14px; font-weight: 600; }
.search-result-sub { font-size: 12px; color: var(--text-muted); }

/* Pagefind Component UI Integration */
#search-ui {
  --pf-text: var(--text-primary);
  --pf-text-secondary: var(--text-secondary);
  --pf-text-muted: var(--text-muted);
  --pf-background: var(--bg-secondary);
  --pf-border: var(--border-color);
  --pf-border-focus: var(--accent-primary);
  --pf-skeleton: var(--bg-tertiary);
  --pf-skeleton-shine: var(--bg-secondary);
  --pf-hover: var(--bg-tertiary);
  --pf-outline-focus: var(--accent-primary);
  --pf-font: 'Inter', sans-serif;
}

/* Inline Coupon Box (Shortcode) */
.inline-coupon-box .coupon-card {
  max-width: 400px;
}

/* ==========================================================================
   FIX-BATCH: Logos, Icon-Badges, Carousel-Höhe, Seitenübergänge
   ========================================================================== */

/* --- 1. Store-Logo mit echtem Bild --------------------------------------- */

/* Alle Logo-Wrapper brauchen position:relative damit das absolute img greift */
.store-logo-wrapper,
.store-large-logo,
.store-card-logo,
.card-store-logo,
.modal-store-logo,
.glossary-store-logo,
.inline-coupon-logo,
.inline-store-logo {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Weißer/neutraler Hintergrund wenn ein Logo-Bild vorhanden ist */
.logo-has-image {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color);
}

/* Initial-Buchstabe als Fallback (sichtbar bevor Bild lädt oder wenn Bild fehlt) */
.logo-has-image .logo-initial {
  color: var(--text-muted);
  font-size: 0.65em;
}

/* Initial-Buchstabe bleibt als Fallback sichtbar */
.logo-initial {
  position: relative;
  z-index: 0;
}

/* Logo-Bild legt sich über den Buchstaben */
.logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  z-index: 1;
  background: transparent;
}

/* --- 2. Icon-only Badges mit CSS-Tooltip --------------------------------- */

.badge {
  /* Überschreibt bestehende Padding/Text-Styles */
  padding: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  display: block;
}

/* CSS-Tooltip */
.badge[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 200;
}
.badge[data-tooltip]:hover::after {
  opacity: 1;
}

/* Newsletter-Badge (neues Badge-Typ) */
.badge-newsletter {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* --- 3. Shop-Name kürzen in Coupon-Card ---------------------------------- */

.card-store-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* --- 4. Karussell-Karten gleiche Höhe ------------------------------------ */

.carousel-container {
  align-items: stretch;   /* explizit – alle Items auf maximale Zeilenhöhe dehnen */
}

/* height:100% kann in flex-Zeile mit overflow:auto zu Höhen-Konflikten führen */
.carousel-container .coupon-card {
  flex: 0 0 340px;
  height: auto;           /* statt height:100% – stretch-Alignment übernimmt */
}

/* Sicherstellen dass card-body auch im Carousel wächst */
.carousel-container .card-body {
  flex: 1;
}

/* --- 5. View Transitions API (Chrome 126+, Safari 18+, Firefox 130+) ----- */
/* Repliziert exakt die fadeIn-Animation des Original-Templates             */

@view-transition {
  navigation: auto;
}

@keyframes sg-page-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes sg-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

::view-transition-old(root) {
  animation: 250ms cubic-bezier(0.16, 1, 0.3, 1) both sg-page-out;
}

::view-transition-new(root) {
  animation: 350ms cubic-bezier(0.16, 1, 0.3, 1) both sg-page-in;
}

/* ==========================================================================
   FIX-BATCH 2: Logo-Farbe, Scrollbar Dark, Sidebar, Related Posts Padding
   ========================================================================== */

/* --- 1. Logo: Gradient nur auf den Text-Span ---------------------------- */

.nav-logo span,
.footer-logo.nav-logo span {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- 2. Firefox scrollbar ------------------------------------------------ */
* {
  scrollbar-color: var(--border-color) var(--bg-primary);
}

/* --- 3. Sidebar Store-Promo: sauberes Layout wie im Original ------------ */

.sidebar-store-promo {
  padding: 8px 0;
}

.sidebar-store-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  gap: 16px;
}

.sidebar-store-link:hover .store-logo-wrapper {
  transform: scale(1.05) translateY(-2px);
}

.sidebar-store-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.sidebar-store-desc {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 14px;
  max-width: 220px;
}

.store-link-btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.store-link-btn-affiliate::after {
  content: "Affiliate";
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  opacity: 0.7;
}

/* --- 4. Weitere Ratgeber: Padding + Karten ------------------------------ */

.related-posts {
  padding: 40px;          /* gleich wie blog-post-body-text */
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  margin-top: 0;
}

.related-posts-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.related-post-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--accent-primary-rgb), 0.3);
}

.related-post-cover {
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
}

.related-post-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-post-info h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Mobile: Blog-Post Sidebar ausblenden */
@media (max-width: 1024px) {
  .related-posts {
    padding: 24px;
    padding-top: 24px;
  }
  .blog-post-body-text {
    padding: 24px;
  }
  .blog-post-layout {
    grid-template-columns: 1fr;
  }
  .blog-post-layout > .store-sidebar {
    display: none;
  }
}

/* ==========================================================================
   FIX-BATCH 3: JS-Tooltip + Pagefind-Suche
   ========================================================================== */

/* --- Tooltip: CSS ::after deaktivieren, JS-Version übernimmt ------------ */
.badge[data-tooltip]::after {
  display: none !important;
}

/* JS-Tooltip (position:absolute auf body, escaped overflow:hidden) */
.sg-tooltip {
  position: absolute;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.93);
  color: #f8fafc;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Navbar-Suchdropdown ------------------------------------------------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px -5px rgba(0,0,0,0.15);
  z-index: 500;
  overflow: hidden;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.12s ease;
}
.search-result-item:hover {
  background: var(--bg-tertiary);
}
.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif;
}
.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.search-result-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.search-result-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
  border-radius: 3px;
  padding: 1px 5px;
}
.search-result-all {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  transition: background 0.12s ease;
}
.search-result-all:hover {
  background: var(--border-color);
}
.search-no-results {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.search-no-results code {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  display: block;
  margin-top: 8px;
}

/* ==========================================================================
   STORE GLOSSARY (Shop-Übersicht)
   ========================================================================== */

.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 40px;
}

.glossary-letter {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  transition: all 0.15s ease;
}

.glossary-letter.active {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
}

.glossary-letter.active:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.glossary-letter.disabled {
  color: var(--border-color);
  cursor: default;
}

.glossary-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.glossary-group-header {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-primary);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.glossary-store-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
}

.glossary-store-item {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.glossary-store-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.glossary-store-link:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

.glossary-store-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.glossary-store-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glossary-store-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .glossary-store-list {
    grid-template-columns: 1fr;
  }
}

/* --- Kategorie-Icons: Größen nach Kontext -------------------------------- */

/* Icon in der Kategorie-Detailseite (store-large-logo, 100x100 Kreis) */
.store-large-logo .category-icon,
.store-large-logo svg[class*="lucide"] {
  width: 64px;
  height: 64px;
  stroke: #ffffff;
  fill: none;
}

/* Icon in der Kategorie-Übersicht (category-card-icon-wrapper, 56x56 Kreis) */
.category-card-icon-wrapper .category-icon,
.category-card-icon-wrapper svg[class*="lucide"] {
  width: 28px;
  height: 28px;
}

/* --- Dedizierte Suchseite (/suche/) mit Pagefind Component UI ----------- */
.search-page {
  max-width: 720px;
}

#search-ui pagefind-input,
#search-ui pagefind-results,
#search-ui pagefind-summary {
  display: block;
}
#search-ui pagefind-summary {
  margin: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}
#search-ui .pf-input {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--border-radius-md) !important;
  font-family: 'Inter', sans-serif !important;
}
#search-ui .pf-input:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15) !important;
}
#search-ui .pf-result-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--border-radius-md) !important;
}
#search-ui .pf-result-card:hover {
  background: var(--bg-tertiary) !important;
}
#search-ui .pf-result-title,
#search-ui .pf-result-link {
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}
#search-ui .pf-result-excerpt,
#search-ui .pf-heading-excerpt {
  color: var(--text-muted) !important;
}
#search-ui mark {
  background: rgba(var(--accent-primary-rgb), 0.18) !important;
  color: var(--accent-primary) !important;
  border-radius: 2px;
}
#search-ui .pf-empty-text {
  color: var(--text-muted) !important;
}

/* Legal / Static single pages */
.page-content-single {
  max-width: 720px;
}
.page-content-single h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

/* Load-more button */
.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.load-more-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.04);
}

/* ==========================================================================
   INLINE SHORTCODES – Coupon & Store
   ========================================================================== */

/* Inline Coupon Banner */
.inline-coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  margin: 24px 0;
}

.inline-coupon-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.inline-coupon-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

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

.inline-coupon-store {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
}

.inline-coupon-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-coupon-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
}

.inline-coupon-btn {
  background: var(--accent-primary);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.inline-coupon-btn:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .inline-coupon {
    flex-direction: column;
    align-items: flex-start;
  }
  .inline-coupon-btn {
    width: 100%;
    text-align: center;
  }
  .inline-coupon-badge {
    display: none;
  }
}

/* Inline Store Badge */
.inline-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.inline-store-badge:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.inline-store-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.inline-store-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-store-arrow {
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.inline-store-badge:hover .inline-store-arrow {
  opacity: 1;
  transform: translateX(2px);
}
