/*
 * Product lists / category cards
 * ==============================
 * The PHP list files now output an explicit .cs-product-grid wrapper.
 * Do not use :has() or old <center> based layout tricks here.
 */

.cs-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 18px 0 28px;
    clear: both;
    align-items: stretch;
}

.cs-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cs-product-card:hover {
    transform: translateY(-2px);
    border-color: #c8d2da;
    box-shadow: 0 12px 30px rgba(20, 34, 45, 0.09);
}

.cs-product-card__image-link {
    display: block;
    color: inherit;
}

.cs-product-card__image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
    padding: 14px;
    overflow: hidden;
    background: var(--white);
}

.cs-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.cs-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 8px;
    background: var(--red);
    border-radius: 999px;
    color: var(--white);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.cs-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px 16px 17px;
}

.cs-product-card__brand {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-product-card__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.cs-product-card__title a:hover {
    color: var(--red);
}

.cs-product-card__meta {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.cs-product-card__colors {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    margin-top: 10px;
}

.cs-product-card__colors img {
    width: 20px;
    height: 20px;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
}

.cs-product-card__more-colors {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.cs-product-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.cs-product-card__pricing {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cs-product-card__price {
    color: var(--ink);
    font-size: 18px;
}

.cs-product-card__rrp {
    color: var(--muted);
    font-size: 11px;
    text-decoration: line-through;
}

.cs-product-card__cta {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.cs-product-card__cta:hover {
    text-decoration: underline;
}

/* Compatibility: old class may still appear on a few legacy pages. */
.floating-box-angebote {
    min-width: 0;
}

/* ==========================================================================
   HOMEPAGE FEATURED PRODUCTS / STARTSEITE
   --------------------------------------------------------------------------
   content/main.php outputs the featured products as consecutive
   .floating-box-angebote_main elements inside ordinary page content.

   Important:
   We deliberately DO NOT turn the surrounding .boxinhalteabstand into a
   flex/grid container. That wrapper also contains the introductory homepage
   text. Instead each product card behaves as an inline-block.
   ========================================================================== */

.floating-box-angebote_main {
    display: inline-block;
    width: calc(25% - 18px);
    min-width: 0;
    margin: 0 18px 22px 0;
    padding: 14px;
    vertical-align: top;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.floating-box-angebote_main:hover {
    transform: translateY(-2px);
    border-color: #c8d2da;
    box-shadow: 0 12px 30px rgba(20, 34, 45, 0.09);
}

/* Image area */
.floating-box-angebote_main > div:first-child {
    display: block;
    width: 100%;
    height: 300px;
    margin: 0 0 12px;
    overflow: hidden;
    background: var(--white);
    text-align: center;
}

.floating-box-angebote_main > div:first-child center {
    display: block;
    width: 100%;
    height: 100%;
}

.floating-box-angebote_main > div:first-child a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.floating-box-angebote_main img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
    margin: auto;
    object-fit: contain;
}

.floating-box-angebote_main .artikelsub {
    display: block;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
}

.floating-box-angebote_main .artikelsub strong {
    display: block;
    margin-bottom: 3px;
    font-size: 16px;
    line-height: 1.3;
}

.floating-box-angebote_main .productspotprice {
    display: inline-block;
    margin-top: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
}

.floating-box-angebote_main strike {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1100px) {
    .floating-box-angebote_main {
        width: calc(33.333% - 16px);
    }
}

@media (max-width: 760px) {
    .floating-box-angebote_main {
        width: calc(50% - 12px);
    }

    .floating-box-angebote_main > div:first-child {
        height: 260px;
    }

    .floating-box-angebote_main img {
        max-height: 260px !important;
    }
}

@media (max-width: 480px) {
    .floating-box-angebote_main {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}
