/**
 * KB Marketplace Product Label - Frontend CSS
 */

/* Labels Container */
.kbmpl-labels-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

/* Individual Label */
.kbmpl-label {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Position Classes - 3x3 Grid */
.kbmpl-position-1 { top: 5px; left: 5px; }
.kbmpl-position-2 { top: 5px; left: 50%; transform: translateX(-50%); }
.kbmpl-position-3 { top: 5px; right: 5px; }
.kbmpl-position-4 { top: 50%; left: 5px; transform: translateY(-50%); }
.kbmpl-position-5 { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.kbmpl-position-6 { top: 50%; right: 5px; transform: translateY(-50%); }
.kbmpl-position-7 { bottom: 5px; left: 5px; }
.kbmpl-position-8 { bottom: 5px; left: 50%; transform: translateX(-50%); }
.kbmpl-position-9 { bottom: 5px; right: 5px; }

/* Text Badge */
.kbmpl-text-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

/* Material Icon Badge */
.kbmpl-material-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 3px;
}

/* Content Banner */
.kbmpl-content-banner {
    border-radius: 3px;
}

/* Make product images position relative for label positioning */
.product-miniature .thumbnail-container,
.product-cover-thumbnails .images-container,
.product-images > .product-cover,
.js-qv-product-images {
    position: relative;
}

/* Category/Brand/Supplier pages - product card */
.product-miniature {
    position: relative;
}

.product-miniature .thumbnail-container {
    position: relative;
    overflow: visible;
}

/* Product page - main image */
.images-container {
    position: relative;
}

/* Ensure labels are above images but below modals */
.kbmpl-labels-container {
    z-index: 10;
}

/* Hover effect for labels */
.kbmpl-label:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Fix for position transforms on hover */
.kbmpl-position-2:hover,
.kbmpl-position-8:hover {
    transform: translateX(-50%) scale(1.05);
}

.kbmpl-position-4:hover,
.kbmpl-position-6:hover {
    transform: translateY(-50%) scale(1.05);
}

.kbmpl-position-5:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kbmpl-label {
        max-width: 40px;
        max-height: 40px;
    }

    .kbmpl-text-badge {
        font-size: 10px !important;
        padding: 2px 6px;
    }

    .kbmpl-material-badge {
        font-size: 16px !important;
        padding: 3px;
    }
}

/* Seller CSS */
.kbmpl-container {
    padding: 20px;
}

.kbmpl-container .page-heading {
    margin-bottom: 20px;
    font-weight: bold;
}

.kbmpl-container .header-actions {
    display: flex;
    gap: 10px;
}

.kbmpl-container .table th {
    background-color: #f8f9fa;
}

.kbmpl-text-label {
    display: inline-block;
    border-radius: 3px;
}
