/* ============================================================
   Amazon Affiliate Products – Frontend Styles
   Passend zum Kreuzfahrt-Plugin: #31AE86, border-radius 5px 0 20px 0
   ============================================================ */

/* ── Variablen ──────────────────────────────────────────────── */
:root {
  --aff-green:        #31AE86;
  --aff-green-dark:   #269970;
  --aff-green-light:  #e8f8f3;
  --aff-text:         #1a2332;
  --aff-text-muted:   #6b7a8d;
  --aff-border:       #e4eaf1;
  --aff-card-bg:      #ffffff;
  --aff-shadow:       0 4px 24px rgba(26,35,50,.08);
  --aff-shadow-hover: 0 12px 40px rgba(49,174,134,.18);
  --aff-radius:       14px;
  --aff-btn-radius:   5px 0 20px 0;
  --aff-star-full:    #f5a623;
  --aff-star-empty:   #dde3ec;
}

/* ── Filter-Bar ─────────────────────────────────────────────── */
.aff-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.aff-filter-btn {
  background: #fff;
  border: 1.5px solid var(--aff-border);
  color: var(--aff-text-muted);
  border-radius: 30px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
  letter-spacing: .02em;
}

.aff-filter-btn:hover {
  border-color: var(--aff-green);
  color: var(--aff-green);
  background: var(--aff-green-light);
}

.aff-filter-btn.is-active {
  background: var(--aff-green);
  border-color: var(--aff-green);
  color: #fff;
}

/* ── Grid ───────────────────────────────────────────────────── */
.aff-grid {
  display: grid;
  gap: 24px;
}

.aff-cols-1 { grid-template-columns: 1fr; }
.aff-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aff-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aff-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .aff-cols-3,
  .aff-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .aff-cols-2,
  .aff-cols-3,
  .aff-cols-4 { grid-template-columns: 1fr; }
}

/* ── Karte ──────────────────────────────────────────────────── */
.aff-product-card {
  background: var(--aff-card-bg);
  border: 1px solid var(--aff-border);
  border-radius: var(--aff-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--aff-shadow);
  transition: box-shadow .3s ease, transform .3s ease;
  opacity: 1;
  transform: translateY(0);
}

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

.aff-product-card.aff-hidden {
  display: none;
}

/* ── Badge ──────────────────────────────────────────────────── */
.aff-product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--aff-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 5px 0 14px 0;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(49,174,134,.35);
}

/* ── Bild ───────────────────────────────────────────────────── */
.aff-product-card__img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aff-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.aff-product-card:hover .aff-product-card__img {
  transform: scale(1.04);
}

.aff-product-card__no-img {
  font-size: 56px;
  opacity: .3;
}

/* ── Body ───────────────────────────────────────────────────── */
.aff-product-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.aff-product-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--aff-green);
}

.aff-product-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--aff-text);
  line-height: 1.35;
  margin: 0;
}

/* ── Bewertung ──────────────────────────────────────────────── */
.aff-product-card__rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.aff-star {
  font-size: 14px;
  line-height: 1;
}

.aff-star.full  { color: var(--aff-star-full); }
.aff-star.half  { color: var(--aff-star-full); opacity: .6; }
.aff-star.empty { color: var(--aff-star-empty); }

.aff-rating-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--aff-text);
}

.aff-review-count {
  font-size: 12px;
  color: var(--aff-text-muted);
}

/* ── Beschreibung ───────────────────────────────────────────── */
.aff-product-card__desc {
  font-size: 13px;
  color: var(--aff-text-muted);
  line-height: 1.55;
  margin: 0;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

/* ── Highlights ─────────────────────────────────────────────── */
.aff-product-card__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aff-product-card__highlights li {
  font-size: 12px;
  color: var(--aff-text);
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
}

.aff-product-card__highlights li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--aff-green);
  font-weight: 700;
  font-size: 11px;
}

/* ── Footer: Preis + Button ─────────────────────────────────── */
.aff-product-card__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--aff-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.aff-product-card__price-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aff-product-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--aff-text);
  letter-spacing: -.02em;
}

.aff-product-card__price-note {
  font-size: 10px;
  color: var(--aff-text-muted);
  line-height: 1.3;
}

/* ── Button (gleicher Stil wie Kreuzfahrt-Plugin) ───────────── */
.aff-product-card__btn {
  display: inline-block;
  background: var(--aff-green);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: var(--aff-btn-radius);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(49,174,134,.3);
}

.aff-product-card__btn:hover {
  background: var(--aff-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(49,174,134,.4);
}

/* ── Disclosure ─────────────────────────────────────────────── */
.aff-disclosure {
  font-size: 11px;
  color: #aab;
  margin-top: 20px;
  text-align: center;
  font-style: italic;
}

/* ── Kein Produkt ───────────────────────────────────────────── */
.aff-no-products {
  text-align: center;
  color: var(--aff-text-muted);
  padding: 40px;
  font-size: 15px;
}

/* ── Scroll-Animation ───────────────────────────────────────── */
.aff-product-card.aff-animate-in {
  animation: affFadeUp .45s ease both;
}

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