/* Amazon Affiliate Importer – Frontend Styles
 * Include this via functions.php or a child theme if desired.
 * The plugin does NOT auto-enqueue this – add it yourself to keep things flexible.
 */

/* ── Affiliate CTA (Titel-Link) ─────────────────────────────────── */
.aai-affiliate-cta {
    font-size: 1.1em;
    font-weight: 700;
}

.aai-affiliate-cta a,
.aai-price a {
    color: #067D62;
}

.aai-affiliate-cta a:hover,
.aai-price a:hover {
    color: #FF9900;
}

/* ── "Besuche den [Markenname]"-Link ────────────────────────────── */
.aai-visit-brand {
    font-size: 1em;
}

.aai-visit-brand a {
    color: #067D62;
    font-weight: 600;
}

.aai-visit-brand a:hover {
    color: #FF9900;
    text-decoration: underline;
}

/* ── Sterne-Bewertung ───────────────────────────────────────────── */
.aai-rating {
    line-height: 1.6;
}

.aai-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    vertical-align: middle;
    margin-right: 4px;
}

.aai-stars svg {
    flex-shrink: 0;
}

/* ── Amazon-Button (Warenkorb-Farben) ──────────────────────────── */
/*
 * Amazon-Warenkorb-Farbe: Hintergrund #FFD814, Text #0F1111
 * Hover: #FFA41C
 * Zusätzlich zu Inline-Styles gesetzt für Hover-Effekt (Inline kann kein :hover).
 */
.wp-block-buttons.is-content-justification-center {
    justify-content: center !important;
}

.aai-cta-button .wp-block-button__link,
.wp-block-button.aai-cta-button .wp-block-button__link,
a.wp-block-button__link.has-background.has-text-color {
    background-color: #FFD814 !important;
    color: #0F1111 !important;
    border: 1px solid #FCD200 !important;
    border-radius: 8px !important;
    padding: 10px 28px !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(213,166,0,.5) !important;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.aai-cta-button .wp-block-button__link:hover,
.wp-block-button.aai-cta-button .wp-block-button__link:hover {
    background-color: #FFA41C !important;
    border-color: #FF8F00 !important;
    color: #0F1111 !important;
    box-shadow: 0 2px 8px rgba(200,120,0,.5) !important;
}

/* ── Technische-Daten-Tabelle ───────────────────────────────────── */
.aai-specs,
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
}

.aai-specs th,
.aai-specs td,
.wp-block-table table td,
.wp-block-table table th {
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.aai-specs th,
.wp-block-table table th {
    background: #f5f5f5;
    font-weight: 600;
    width: 35%;
}

/* Affiliate-Link in Tabelle */
.wp-block-table table a {
    color: #067D62;
}

.wp-block-table table a:hover {
    color: #FF9900;
}

/* ── Disclaimer ─────────────────────────────────────────────────── */
.aai-disclaimer {
    margin-top: 3em;
    padding: 12px 16px;
    border-top: 2px solid #e0e0e0;
    font-size: .8em;
    color: #666;
    line-height: 1.6;
}

/* ── Kategorie-Baum: Filterleiste & Kategorie-Text (v3.0) ─────────────── */
.aai-cat-description { margin: 0 0 1.5em; }
.aai-filters { margin: 0 0 1.8em; padding: 14px 16px; border: 1px solid #e2e4e7; border-radius: 6px; background: #fafafa; }
.aai-filter-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 22px; }
.aai-filter-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.aai-filter-group legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.aai-filter-group label { display: block; margin: 3px 0; font-size: .92em; line-height: 1.35; cursor: pointer; }
.aai-filter-group input { margin-right: 6px; }
.aai-filter-group .aai-count { color: #777; font-size: .9em; }
.aai-filter-group .aai-stars { color: #d98a00; }
.aai-filter-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.aai-filter-submit { cursor: pointer; }
.aai-filter-reset { font-size: .9em; }

/* Seitenleisten-Layout & „Mehr anzeigen“ (v3.2) */
.aai-filters-wrap.aai-side .aai-filter-groups { display: block; }
.aai-filters-wrap.aai-side .aai-filter-group { margin-bottom: 16px; }
.aai-filters-wrap.aai-float-left { float: left; width: 250px; max-width: 100%; margin: 0 28px 24px 0; }
.aai-more summary { cursor: pointer; font-size: .88em; color: #2271b1; margin: 4px 0; }
@media (max-width: 782px) { .aai-filters-wrap.aai-float-left { float: none; width: auto; margin: 0 0 20px; } }


/* ── Sortierung (v3.12) ─────────────────────────────────────────── */
.aai-sortbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: .95em;
}

.aai-sortbar select {
    padding: 6px 28px 6px 10px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
    max-width: 100%;
}


/* ── Landingpages (v3.17) – Karten wie die Produktliste ───────────── */
.aai-lp-main { width: 100%; max-width: 1500px; margin: 0 auto; padding: 24px 20px 40px; box-sizing: border-box; }
.aai-lp-main .aai-lp-title-h1 { margin: 0 0 16px; }
.aai-lp-text {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    padding: 22px 26px;
    margin: 0 0 22px;
}
.aai-lp-text > *:first-child { margin-top: 0; }
.aai-lp-text > *:last-child { margin-bottom: 0; }
.aai-lp-text p { max-width: 120ch; }
.aai-lp-count { margin: 0 0 12px; color: #5b6573; font-size: .95em; }
.aai-lp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 16px;
    margin: 0 0 26px;
}
.aai-lp-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 14px 14px;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 8px;
}
.aai-lp-card .aai-lp-title {
    margin: 0;
    font-size: 1.02em;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.aai-lp-card .aai-lp-title a { color: #14181f; text-decoration: none; }
.aai-lp-card .aai-lp-title a:hover { text-decoration: underline; }
.aai-lp-card .aai-lp-rating { margin: 0; font-size: .85em; color: #6b7280; line-height: 1; }
.aai-lp-stars {
    font-size: 1.25em;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #f59e0b var(--aai-p, 0%), #d1d5db var(--aai-p, 0%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.aai-lp-card .aai-lp-price { margin: 0; font-size: 1.3em; font-weight: 800; color: #14181f; line-height: 1.2; }
.aai-lp-card .aai-lp-ast { color: #990000; }
.aai-lp-card .aai-lp-thumb img { max-width: 100%; height: auto; display: block; }
.aai-lp-btn {
    display: block;
    margin-top: auto;
    padding: 11px 14px;
    border-radius: 6px;
    background: #990000;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}
.aai-lp-btn:hover, .aai-lp-btn:focus { background: #7a0000; color: #fff; }
.aai-lp-pagination { margin: 10px 0 30px; text-align: center; }
.aai-lp-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #d9dde3; border-radius: 6px; background: #fff; color: #14181f; text-decoration: none; }
.aai-lp-pagination .page-numbers.current { background: #990000; border-color: #990000; color: #fff; }
.aai-lp-links { list-style: none; margin: 0; padding: 0; }
.aai-lp-links li { margin: 0 0 6px; }
@media (max-width: 520px) { .aai-lp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .aai-lp-main { padding: 16px 12px 30px; } .aai-lp-text { padding: 16px; } }
