/**
 * RSM Product Display - Sticker & Icons
 * Styling für Produkt-Sticker und Eigenschafts-Icons
 */

/* ==============================================
   PRODUKT-STICKER
   ============================================== */

.rsm-product-stickers-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.rsm-product-sticker {
    position: absolute;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.rsm-product-sticker:hover {
    transform: scale(1.05);
}

/* Positionen */
.rsm-product-sticker.rsm-sticker-top-left {
    top: 10px;
    left: 10px;
}

.rsm-product-sticker.rsm-sticker-top-right {
    top: 10px;
    right: 10px;
}

.rsm-product-sticker.rsm-sticker-bottom-left {
    bottom: 10px;
    left: 10px;
}

.rsm-product-sticker.rsm-sticker-bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Formen */
.rsm-product-sticker.rsm-sticker-rounded {
    border-radius: 4px;
}

.rsm-product-sticker.rsm-sticker-circle {
    border-radius: 50%;
    padding: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 10px;
}

.rsm-product-sticker.rsm-sticker-square {
    border-radius: 0;
}

/* Mehrere Sticker übereinander */
.rsm-product-stickers-container .rsm-product-sticker:nth-child(2) {
    margin-top: 50px;
}

.rsm-product-stickers-container .rsm-product-sticker:nth-child(3) {
    margin-top: 100px;
}

/* WooCommerce Loop Integration */
.woocommerce ul.products li.product .rsm-product-stickers-container,
.woocommerce-page ul.products li.product .rsm-product-stickers-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product a,
.woocommerce-page ul.products li.product a {
    position: relative;
    display: block;
}

/* Einzelprodukt-Seite */
.single-product .rsm-product-stickers-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.single-product div.product div.images {
    position: relative;
}

/* ==============================================
   PRODUKT-ICONS (Eigenschaften)
   ============================================== */

.rsm-product-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    align-items: center;
}

.rsm-product-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 50%;
    padding: 6px;
    transition: all 0.2s ease;
    cursor: help;
    position: relative;
}

.rsm-product-icon:hover {
    background: #5C462B;
    color: #fff;
    transform: scale(1.1);
}

.rsm-product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rsm-product-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltip */
.rsm-product-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 5px;
    z-index: 100;
}

.rsm-product-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.rsm-product-icon:hover::after,
.rsm-product-icon:hover::before {
    opacity: 1;
}

/* Icons auf Produktlisten */
.woocommerce ul.products li.product .rsm-product-icons {
    padding: 10px;
    justify-content: center;
}

/* Icons auf Einzelprodukt */
.single-product .rsm-product-icons {
    margin: 15px 0 20px 0;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media screen and (max-width: 768px) {
    .rsm-product-sticker {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .rsm-product-sticker.rsm-sticker-circle {
        width: 40px;
        height: 40px;
        padding: 8px;
        font-size: 8px;
    }
    
    .rsm-product-icon {
        width: 28px;
        height: 28px;
        padding: 5px;
    }
}

@media screen and (max-width: 480px) {
    .rsm-product-sticker {
        padding: 4px 10px;
        font-size: 9px;
    }
    
    .rsm-product-icon {
        width: 24px;
        height: 24px;
        padding: 4px;
    }
}

/* ==============================================
   THEME COMPATIBILITY
   ============================================== */

/* Verhindere Theme-Überschreibungen */
.rsm-product-stickers-container * {
    box-sizing: border-box;
}

.rsm-product-icons * {
    box-sizing: border-box;
}

/* Stelle sicher dass Sticker über Produktbildern liegen */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
    position: relative;
    z-index: 1;
}

.single-product div.product div.images img {
    position: relative;
    z-index: 1;
}

/* ==============================================
   PRINT
   ============================================== */

@media print {
    .rsm-product-stickers-container {
        display: none;
    }
}

