/* Badge Management Frontend Styles */

.product-badges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Kategória lista badge-ek a teljes termék kártyára vonatkoznak */
.product-card .product-badges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Termék oldal badge-ek a teljes termék területre vonatkoznak */
.belteri-single-product .main-image .product-badges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.product-badge {
    /* Alapértelmezett stílusok - ezeket felülírja az inline CSS */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    line-height: 1.2;
}

/* Több badge kezelése - egymás mellett vagy alatt */
.product-badges .product-badge:not(:first-child) {
    margin-top: 5px; /* Badge-ek közötti távolság */
}

/* Több badge elrendezés - vertikális stack */
.product-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

/* Alternatív: horizontális elrendezés ha van hely */
.product-badges.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

/* Badge-ek közötti minimális távolság */
.product-badges .product-badge + .product-badge {
    margin-top: 5px;
}

.product-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Badge pozíciók alapértelmezett beállítása */
.badge-position-top-left {
    top: 10px;
    left: 10px;
}

.badge-position-top-right {
    top: 10px;
    right: 10px;
}

.badge-position-bottom-left {
    bottom: 10px;
    left: 10px;
}

.badge-position-bottom-right {
    bottom: 10px;
    right: 10px;
}

.badge-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Alapvető badge stílusok - csak a szükséges alapok */
.product-badge {
    /* Csak alapvető layout tulajdonságok, semmi más */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Kategória lista badge-ek - nincs külön stílus */

/* Responsive badge méretezés eltávolítva - minden a badge beállításokból jön */

/* Kategória oldal badge-ek */
.products-grid .product-card {
    position: relative;
}

.products-grid .product-card .product-badges {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.products-grid .product-card .product-badge {
    /* Nincs felülírás - minden az admin beállításokból jön */
    z-index: 11 !important;
}

/* Kategória oldal specifikus badge pozicionálás */
.category-page .product-badges {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Kategória oldal badge-ek - automatikus kicsinyítés kikapcsolva */
/* .category-page .product-badge - automatikus kicsinyítés kikapcsolva, adatbázisból jön a méret */

/* Badge animációk */
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.badge-animated {
    animation: badgePulse 2s infinite;
}

/* Badge típusok */
.badge-type-image {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.badge-type-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Badge hover effektek */
.product-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

.product-badge:hover::before {
    opacity: 0.1;
}

/* Badge árnyékok */
.product-badge {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

/* Badge accessibility */
.product-badge:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Badge loading state */
.badge-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Badge error state */
.badge-error {
    background: #dc3232 !important;
    color: white !important;
    border: 1px solid #a00 !important;
}

/* Badge success state */
.badge-success {
    background: #46b450 !important;
    color: white !important;
    border: 1px solid #2e7d32 !important;
}

/* Badge warning state */
.badge-warning {
    background: #ffb900 !important;
    color: #000 !important;
    border: 1px solid #cc9600 !important;
}

/* Badge info state */
.badge-info {
    background: #00a0d2 !important;
    color: white !important;
    border: 1px solid #0073aa !important;
}
