/* ===================================================================
   S360 – ARCHIVE OVERRIDES (hero, grid, cards, gallery)
   * Utolsóként betöltve – szándékosan tartalmaz !important-okat, hogy a
     régi sablon CSS-eket felülírja.
   =================================================================== */

/* 1) HERO – kényszerített „stack” (kép felül, alatta H1, alatta intro) */
.tc-hero.tc-hero--stack {
    display: block !important;
    clear: both !important;
}

.tc-hero.tc-hero--stack .tc-hero-image-wrapper {
    display: block !important;
    margin: 0 0 1rem 0 !important;
    float: none !important;
}

.tc-hero.tc-hero--stack .tc-title {
    display: block !important;
    margin: .5rem 0 1rem !important;
    float: none !important;
    clear: both !important;
}

.tc-hero.tc-hero--stack .tc-hero-intro {
    clear: both !important;
}

/* 2) GRID – biztonságos rács a kártyalistákhoz */
.tc-grid.tc-grid--cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 1.25rem !important;
    align-items: stretch !important;
}

/* 3) PRODUCT CARD – alap szerkezet stabilizálása */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card__image {
    position: relative;
    overflow: hidden;
}

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

.product-card__badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    background: #e53935;
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    padding: .15rem .4rem;
    border-radius: .25rem;
}

.product-card__body {
    padding: .5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.product-card__title {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
}

.product-card__price {
    font-size: .95rem;
}

/* 4) POST CARD – egységes képarány és tördelés */
.post-card {
    display: flex;
    gap: .75rem;
}

.post-card__image img {
    display: block;
    width: 100%;
    height: auto;
}

.post-card__title {
    margin: .15rem 0 .25rem;
    font-size: 1rem;
    line-height: 1.25;
}

/* 5) GALÉRIA – biztonságos rács, ha a régi masonry nem lépne életbe */
.tc-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.tc-gallery .tc-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* 6) Tipikus „régi” lebegtetés/floats semlegesítése HERO környezetben */
.tc-hero .alignleft,
.tc-hero .alignright,
.tc-hero img.alignleft,
.tc-hero img.alignright {
    float: none !important;
    margin: 0 !important;
}

/* 7) Kisebb képernyők: finomabb oszlopszám */
@media (max-width: 768px) {
    .tc-grid.tc-grid--cards {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    }
}