/* Ganjeh Kala — central product labels system. */
.gk-product-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.gk-product-label {
    --gk-label-bg: var(--gk-primary, #ed1944);
    --gk-label-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 7px;
    background: var(--gk-label-bg);
    color: var(--gk-label-color);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Single product heading meta: brand + labels should read as one inline row. */
.gk-product-heading-meta,
.gk-product-meta-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}

.gk-product-labels--single {
    margin: 0;
}

.gk-product-labels--single .gk-product-label {
    min-height: 27px;
    padding: 5px 10px;
    font-size: 12px;
}


.gk-product-heading-meta .gk-product-labels--single,
.gk-product-meta-inline .gk-product-labels--single {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.gk-product-heading-meta .gk-native-brand,
.gk-product-meta-inline .gk-product-brand {
    margin: 0;
    flex: 0 0 auto;
}

.gk-product-meta-inline .gk-product-brand + .gk-product-labels--single {
    flex: 1 1 auto;
    min-width: 0;
}

/* Custom theme/Elementor product-image wrappers also participate in the
 * central label system. Keeping the positioning context here avoids each
 * widget having to reinvent label placement. */
.gk-product-grid__image-wrapper,
.gk-grid-thumb,
.gk-pro-thumb,
.gk-yoga-img-wrapper,
.gk-deal-image,
.gk-amazing-thumb {
    position: relative;
}

/* Product cards: labels sit on the image in a compact vertical stack. */
.gk-product-card__thumb > .gk-product-labels--card,
.product-card__image-container > .gk-product-labels--card,
.gk-product-grid__image-wrapper > .gk-product-labels--card,
.gk-grid-thumb > .gk-product-labels--card,
.gk-pro-thumb > .gk-product-labels--card,
.gk-yoga-img-wrapper > .gk-product-labels--card,
.gk-deal-image > .gk-product-labels--card,
.gk-amazing-thumb > .gk-product-labels--card {
    position: absolute;
    z-index: 6;
    top: 10px;
    left: 10px;
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    max-width: calc(100% - 20px);
    margin: 0;
    pointer-events: none;
}

.gk-product-labels--card .gk-product-label {
    min-height: 22px;
    max-width: 150px;
    padding: 3px 7px;
    border-radius: 6px;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
}

/* Generic output for shortcode/custom template usage. */
.gk-product-labels--inline {
    margin-block: 6px;
}

@media (max-width: 767px) {
    .gk-product-heading-meta,
    .gk-product-meta-inline {
        gap: 6px;
        margin-bottom: 8px;
    }
    .gk-product-labels--single {
        gap: 5px;
        margin-bottom: 0;
    }
    .gk-product-labels--single .gk-product-label {
        min-height: 24px;
        padding: 4px 8px;
        font-size: 11px;
    }
    .gk-product-card__thumb > .gk-product-labels--card,
    .product-card__image-container > .gk-product-labels--card,
    .gk-product-grid__image-wrapper > .gk-product-labels--card,
    .gk-grid-thumb > .gk-product-labels--card,
    .gk-pro-thumb > .gk-product-labels--card,
    .gk-yoga-img-wrapper > .gk-product-labels--card,
    .gk-deal-image > .gk-product-labels--card,
    .gk-amazing-thumb > .gk-product-labels--card {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 16px);
        gap: 4px;
    }
    .gk-product-labels--card .gk-product-label {
        max-width: 120px;
        min-height: 20px;
        padding: 3px 6px;
        font-size: 9px;
    }
}
