/* =========================================
   Gebrauchtmaschinen – Grundtypografie
   ========================================= */

/* Gesamte Sektion: Schrift & Grundfarbe aus dem Theme holen */
.gm-list-wrapper,
.gm-single-wrapper {
    font-family: var(--wp--preset--font-family--barlow), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--wp--preset--color--palette-color-3);
}


/* =========================================
   Gebrauchtmaschinen – Listenansicht
   ========================================= */

/* Wrapper der gesamten Liste */
.gm-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 60px;
}

/* Ein Maschinen-Eintrag: zwei Spalten, Bild links, Text rechts */
.gm-list-item {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* engerer Abstand zwischen Bild- und Textspalte */
    align-items: flex-start;
}

/* Bildspalte */
.gm-list-image-wrapper {
    flex: 1 1 50%;
}

/* Hauptbild in der Liste (fester Rahmen, kein Verzerren) */
.gm-list-main-image {
    width: 100%;
    max-width: 800px;
    height: 800px;
    display: block;
    border-radius: 4px;
    background: #f5f5f5;
    object-fit: contain;
}

/* Kleine Galerie-Thumbnails */
.gm-list-thumbs {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Grundstil fuer alle Thumbnails (Liste + Single) */
.gm-list-thumb,
.gm-single-thumb {
    width: 70px;
    height: auto;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.8;
}

/* Aktives Thumbnail (Liste + Single) */
.gm-thumb--active {
    outline: 2px solid #333;
    outline-offset: 2px;
    opacity: 1;
}

/* Textspalte */
.gm-list-info {
    flex: 1 1 40%;
}

/* Label ueber dem Titel */
.gm-list-label {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: var(--wp--preset--color--palette-color-5);
    margin-bottom: 6px;
}

/* Titel in der Liste (nicht verlinkt) */
.gm-list-title {
    font-family: var(--wp--preset--font-family--barlow-condensed), var(--wp--preset--font-family--barlow), sans-serif;
    font-size: 44px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

/* Feature-Liste */
.gm-list-features {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 16px;
}

.gm-list-features li {
    margin-bottom: 4px;
}

.gm-list-features li::before {
    content: "✓ ";
    color: #27ae60;
}

/* Kurzbeschreibung in der Uebersicht */
.gm-list-excerpt {
    margin: 4px 0 18px 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--wp--preset--color--palette-color-2);
}


/* =========================================
   Preis – Listenansicht (EUR klein, Zahl gross, Dezimal auf gleicher Linie)
   ========================================= */

.gm-list-price {
    margin: 10px 0 20px 0;
    display: flex;
    align-items: baseline; /* Baseline-Alignment fuer EUR, Zahl und Dezimal */
    gap: 4px;
    line-height: 1;
}

/* grosse Hauptzahl */
.gm-list-price-main {
    font-size: 48px;
    font-weight: 700;
}

/* kleine Waehrung */
.gm-list-price-currency {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 4px;

    /* EUR HOCHSETZEN */
    align-self: flex-start;
    margin-top: -1px;
}


/* kleine Nachkommastellen, optisch an Hauptzahl angelehnt */
.gm-list-price-decimals {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    margin-left: 2px;
}


/* =========================================
   Button – Listenansicht
   ========================================= */

.gm-list-button {
    display: inline-block;
    padding: 14px 32px; /* groesser */
    background: var(--wp--preset--color--palette-color-3);
    color: var(--wp--preset--color--palette-color-8);
    text-decoration: none;
    border-radius: 8px; /* weichere Rundung */
    font-size: 16px;
    font-weight: 600;
}

.gm-list-button:hover {
    background: var(--wp--preset--color--palette-color-2);
}


/* =========================================
   Responsive – Listenansicht
   ========================================= */

@media (max-width: 900px) {
    .gm-list-item {
        flex-direction: column;
    }

    .gm-list-image-wrapper,
    .gm-list-info {
        flex: 1 1 100%;
    }
}

/* Hauptbild-Hoehe auf sehr kleinen Screens etwas reduzieren */
@media (max-width: 600px) {
    .gm-list-main-image,
    .gm-single-main-image {
        height: 260px;
    }
}


/* =========================================
   Gebrauchtmaschinen – Einzelseite
   (wird aktuell nicht verlinkt, bleibt aber nutzbar)
   ========================================= */

.gm-single-wrapper {
    padding: 60px 20px;
}

.gm-single-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

/* Galerie links auf der Einzelseite */
.gm-single-gallery {
    flex: 1 1 55%;
}

/* Hauptbild auf der Einzelseite (eigener Rahmen, etwas flacher) */
.gm-single-main-image {
    width: 100%;
    max-width: 600px;
    height: 380px;
    display: block;
    border-radius: 4px;
    background: #f5f5f5;
    object-fit: contain;
    margin-bottom: 16px;
}

/* Infos rechts auf der Einzelseite */
.gm-single-info {
    flex: 1 1 40%;
}

.gm-single-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--wp--preset--color--palette-color-5);
    margin-bottom: 8px;
}

.gm-single-title {
    font-family: var(--wp--preset--font-family--barlow-condensed), var(--wp--preset--font-family--barlow), sans-serif;
    font-size: 32px;
    margin: 0 0 20px 0;
    font-weight: 600;
}

/* Feature-Liste mit Haekchen */
.gm-single-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.gm-single-features li {
    margin-bottom: 4px;
}

.gm-single-features li::before {
    content: "✓ ";
    color: #27ae60;
}

/* Beschreibungstext */
.gm-single-description {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--wp--preset--color--palette-color-2);
}

/* Divider als kurze Linie */
.gm-single-divider {
    width: 15%;
    height: 2px;
    background: #ddd;
    margin: 0 0 24px 0;
}


/* =========================================
   Preis – Einzelseite (EUR klein, Zahl gross, Dezimal auf gleicher Linie)
   ========================================= */

.gm-single-price-block {
    display: flex;
    align-items: baseline; /* Baseline-Alignment wie in der Vorlage */ 
    gap: 4px;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--wp--preset--color--palette-color-3);
}

/* grosse Hauptzahl */
.gm-single-price-main {
    font-size: 48px;
    font-weight: 700;
}

/* kleine Waehrung */
.gm-single-price-currency {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 4px;

    /* EUR HOCHSETZEN */
    align-self: flex-start;
    margin-top: -1px;
}

/* kleine Nachkommastellen, gleiche Grundlinie */
.gm-single-price-decimals {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    margin-left: 2px;
}


/* =========================================
   Button – Einzelseite
   ========================================= */

.gm-single-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--wp--preset--color--palette-color-3);
    color: var(--wp--preset--color--palette-color-8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.gm-single-button:hover {
    background: var(--wp--preset--color--palette-color-2);
}


/* =========================================
   Responsive – Einzelseite
   ========================================= */

@media (max-width: 900px) {
    .gm-single-container {
        flex-direction: column;
    }

    .gm-single-gallery,
    .gm-single-info {
        flex: 1 1 100%;
    }
}
