/*
Theme Name:   WTM Child
Template:     hello-elementor
Description:  Child Theme für whats-the-matter.de
Version:      1.0.0
*/

/* ================================================
   HELLO ELEMENTOR – Basis-Layout
   ================================================ */

/* Content-Breite analog zu Elementor-Containerbreite */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (max-width: 768px) {
    .page-content {
        padding: 1.5rem 1rem;
    }
}

/* ================================================
   GERÄTE-ARCHIV – Kategorie-Seite
   ================================================ */

.wtm-archive-header {
    margin-bottom: 2rem;
}

.wtm-archive-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.wtm-archive-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ─── Geräte-Zeilen-Liste ─── */
.wtm-geraete-liste {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2.5rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.wtm-geraet-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.wtm-geraet-row:last-child {
    border-bottom: none;
}

.wtm-geraet-row:hover {
    background: #fafafa;
}

/* Thumbnail-Spalte */
.wtm-row-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wtm-row-thumb a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.wtm-row-thumb img,
.wtm-row-thumb .aawp-product__thumb,
.wtm-row-thumb .wtm-row-img {
    max-width: 72px;
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* AAWP-Bild in Zeile: alle Wrapper-Divs flachdrücken */
.wtm-row-thumb .aawp,
.wtm-row-thumb .aawp-product,
.wtm-row-thumb .aawp-product__image {
    display: contents;
}

.wtm-row-img-placeholder {
    width: 72px;
    height: 72px;
    background: #f5f5f5;
    border-radius: 6px;
}

/* Info-Spalte (wächst) */
.wtm-row-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wtm-row-hersteller {
    font-size: 0.72rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.wtm-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    text-decoration: none;
    /* Lange Titel nach 2 Zeilen abschneiden */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wtm-row-title:hover {
    color: #e08800;
}

/* Button-Spalte */
.wtm-row-action {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Globaler Amazon-Button */
.wtm-amazon-btn {
    display: inline-block;
    background: #f90;
    color: #111 !important;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.15s;
    white-space: nowrap;
}

.wtm-amazon-btn:hover {
    background: #e08800;
    color: #111 !important;
}

/* Badge: kein ASIN */
.wtm-badge-no-asin {
    display: inline-block;
    background: #f0f0f0;
    color: #999;
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Trennbereich zwischen Geräten und Blog */
.wtm-section-divider {
    border: none;
    border-top: 2px solid #f0f0f0;
    margin: 2.5rem 0;
}

.wtm-blog-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* Blog-Posts unter der Geräteliste */
.wtm-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.wtm-blog-card {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.wtm-blog-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

.wtm-blog-card a.wtm-blog-thumb {
    display: block;
    overflow: hidden;
}

.wtm-blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.wtm-blog-card:hover img {
    transform: scale(1.03);
}

.wtm-blog-card-body {
    padding: 1rem;
}

.wtm-blog-card-body h3 {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.wtm-blog-card-body h3 a {
    color: #1a1a1a;
    text-decoration: none;
}

.wtm-blog-card-body h3 a:hover {
    color: #f90;
}

.wtm-blog-card-body .wtm-read-more {
    font-size: 0.82rem;
    color: #f90;
    font-weight: 600;
    text-decoration: none;
}

/* ================================================
   EINZELSEITE GERÄT
   ================================================ */

.wtm-single-geraet {
    max-width: 800px;
}

.wtm-single-meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wtm-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.wtm-pill-category {
    background: #e8f4fd;
    color: #1a6fa8;
    text-decoration: none;
}

.wtm-pill-status-bereit    { background: #e8f7ee; color: #1a7a3c; }
.wtm-pill-status-beta      { background: #fff8e0; color: #8a6000; }
.wtm-pill-status-announced { background: #f0f0f0; color: #666; }

.wtm-aawp-box {
    margin: 1.5rem 0;
}

.wtm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.88rem;
    text-decoration: none;
    margin-bottom: 1.2rem;
}

.wtm-back-link:hover { color: #f90; }

.wtm-affiliate-notice {
    font-size: 0.78rem;
    color: #999;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 600px) {
    .wtm-row-thumb {
        flex: 0 0 52px;
        width: 52px;
        height: 52px;
    }
    .wtm-row-thumb img,
    .wtm-row-thumb .wtm-row-img {
        max-width: 52px;
        max-height: 52px;
    }
    .wtm-row-title {
        font-size: 0.82rem;
    }
    .wtm-amazon-btn {
        font-size: 0.76rem;
        padding: 0.4rem 0.7rem;
    }
    .wtm-blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================== GERÄTE-TABELLE (Sammelseite) ====================== */
.wtm-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
    align-items: center;
}

.wtm-category-filters strong {
    margin-right: 0.5rem;
    white-space: nowrap;
}

.wtm-geraete-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wtm-geraete-table th,
.wtm-geraete-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.wtm-geraete-table th {
    background: #f8f8f8;
    font-weight: 600;
    font-size: 0.9rem;
}

.wtm-table-thumb {
    width: 100px;
    text-align: center;
}

.wtm-table-thumb img,
.wtm-table-thumb .aawp-product__thumb {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 768px) {
    .wtm-geraete-table th:nth-child(4),
    .wtm-geraete-table td:nth-child(4) { display: none; } /* Kategorie auf Handy ausblenden */
}

.wtm-category-intro {
    margin: 1.5rem 0 2.5rem;
    line-height: 1.6;
    color: #444;
}