/* =====================================================================
   catalog.css - Fáze 3: Moderní produktové karty + grid
   Barevné schéma klienta: zelená rgb(46,151,107) / #28a745
   ===================================================================== */

/* ---------- KARTA ---------- */
.eg-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: .65rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .eg-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    }

/* Obrázek */
.eg-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f2f4f2;
}

    .eg-card-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease;
    }

.eg-card:hover .eg-card-media img {
    transform: scale(1.05);
}

/* Slevový odznak */
.eg-badge-sale {
    position: absolute;
    top: .75rem;
    left: 0;
    background: #dc3545;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .05em;
    padding: .3rem .9rem .3rem .7rem;
    border-radius: 0 50rem 50rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    z-index: 3;
}

/* Akční odznak */
.eg-badge-action {
    position: absolute;
    top: .75rem;
    right: .75rem;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    padding: .3rem .8rem;
    border-radius: 50rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    z-index: 3;
}

/* Tělo karty */
.eg-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1rem 1.1rem 1.1rem;
}

.eg-card-category {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
    font-weight: 700;
    color: rgb(46, 151, 107);
    margin-bottom: .25rem;
}

.eg-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: .5rem;
}

    .eg-card-title a {
        color: #2e2e2e;
        text-decoration: none;
    }

        .eg-card-title a:hover {
            color: rgb(35, 116, 82);
        }

.eg-card-desc {
    font-size: .9rem;
    color: #555;
    margin-bottom: .85rem;
}

    /* Zkrácení na 5 řádků, dokud není rozbaleno */
    .eg-card-desc.is-clamped {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.eg-desc {
    margin-bottom: .85rem;
}

    .eg-desc .eg-card-desc {
        margin-bottom: .25rem;
    }

.eg-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: none;
    padding: 0;
    font-size: .82rem;
    font-weight: 700;
    color: rgb(46, 151, 107);
    cursor: pointer;
}

    .eg-desc-toggle:hover,
    .eg-desc-toggle:focus {
        color: rgb(35, 116, 82);
        text-decoration: none;
        outline: none;
    }

.eg-desc-caret {
    font-size: .7rem;
    transition: transform .2s ease;
}

    .eg-desc-caret.is-up {
        transform: rotate(180deg);
    }

/* ---------- IKONKOVÉ ODZNAKY ATRIBUTŮ ---------- */
.eg-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .55rem;
    margin-bottom: 1rem;
}

.eg-attr {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    background: #f1f5f2;
    border: 1px solid rgba(46, 151, 107, .18);
    border-radius: 1rem;
    padding: .25rem .65rem;
    font-size: .8rem;
    color: #3a4a41;
    line-height: 1.2;
}

    .eg-attr img {
        width: 16px;
        height: 16px;
        flex: 0 0 auto;
    }

    .eg-attr span {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

/* ---------- PATIČKA / CENA + CTA ---------- */
.eg-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.eg-price {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.eg-price-old {
    font-size: .82rem;
    color: #9e9e9e;
    text-decoration: line-through;
}

.eg-price-current {
    font-size: 1.35rem;
    font-weight: 800;
    color: rgb(46, 151, 107);
}

    .eg-price-current.is-sale {
        color: #dc3545;
    }

.eg-card-actions {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Game icon overlay (zachováno z původního designu) */
.eg-card .game-icon {
    position: absolute;
}

@media (max-width: 575.98px) {
    .eg-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .eg-card-actions {
        justify-content: stretch;
    }

        .eg-card-actions .btn {
            flex: 1 1 auto;
        }
}
