/* ============================================================
   DLK Product Card (grid variant)
   ============================================================ */

.product-card-grid__item {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;

    font-family: var(--e-global-typography-primary-font-family), Sans-Serif !important;
}

/* ------------------------------------------------------------
   Body: image above content on desktop
   ------------------------------------------------------------ */
.product-card-grid__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-grid__image {
    position: relative;
    overflow: hidden;
}

.product-card-grid__image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-card-grid__icons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
}

/* ------------------------------------------------------------
   Content: title, model, description, variant count
   ------------------------------------------------------------ */
.product-card-grid__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    padding-top: 8px;
}

.product-card-grid__title {
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2;
    display: block;
    color: var(--e-global-color-primary, #024887);
    margin-bottom: 2px;
}

.product-card-grid__model-nr {
    font-size: 0.85em;
    color: #666;
    display: block;
}

.product-card-grid__content ul.short-list-description {
    margin: 6px 0;
    padding-left: 18px;
    max-height: 113px;
    overflow: hidden;

    li {
        font-weight: 500;
        line-height: 1;
        font-size: 16px;
    }
}

.product-card-grid__variant-count {
    color: var(--e-global-color-primary, #024887);
    font-weight: 700;
    font-size: 15px;
    margin-top: auto;
}

/* ------------------------------------------------------------
   Action row: price + button
   Desktop: stacked (price above full button)
   ------------------------------------------------------------ */
.product-card-grid__action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;

    /* Don't show the anfrage button */
    .anfrage-toggle {
        display: none;
    }
}

.product-card-grid__price {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;

    .price {
        font-size: 14px !important;

        &.regular {
            del,
            del span.amount {
                font-size: 14px !important;
            }
        }
    }
}

.product-card-grid__price p.price {
    margin: 0;
}

/* Desktop: full button visible, icon button hidden */
.product-card-grid__btn--mobile {
    display: none;
}

/* ------------------------------------------------------------
   Mobile / tablet — ≤ 768px (Elementor breakpoint)
   Layout: flags centered · 90px image + content · action row
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .product-card-grid__item {
        padding: 12px;
    }

    /* Center visible flag badges */
    .product-card-grid__item > .product-flags {
        justify-content: center;
        margin-bottom: 8px;
    }

    /* Image + content side by side */
    .product-card-grid__body {
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }

    .product-card-grid__image {
        width: 90px;
        flex-shrink: 0;
    }

    .product-card-grid__image img {
        max-height: 100px;
        object-fit: contain;
    }

    /* Icons are too cramped on a 90px image — hide on mobile */
    .product-card-grid__icons {
        display: none;
    }

    .product-card-grid__content {
        flex: 1;
        padding-top: 0;
        min-width: 0;
    }

    .product-card-grid__title {
        font-size: 17px;
    }

    .product-card-grid__model-nr {
        font-size: 13px;
    }

    .product-card-grid__content ul.short-list-description li {
        font-size: 14px;
        line-height: 1.2;
    }

    .product-card-grid__variant-count {
        font-size: 14px;
        margin-top: 6px;
    }

    /* Action row: divider + price left + icon button right */
    .product-card-grid__action {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        border-top: 1px solid #A3A3A3;
        padding-top: 10px;
        gap: 12px;
    }

    .product-card-grid__price {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    /* Swap button variants */
    .product-card-grid__btn--desktop {
        display: none;
    }

    .product-card-grid__btn--mobile {
        display: block;
        flex-shrink: 0;
    }
}
