/* 
 * HuePOS Modern Product Badges
 * Inspired by Mew Dien May & Modern E-commerce Trends
 */

/* Container */
.huepos-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    pointer-events: none;
    line-height: 1;
}

/* Base Badge */
.huepos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    background-color: #333;
    /* Fallback */
    transition: all 0.3s ease;
}

.huepos-badge i {
    margin-right: 4px;
    font-size: 10px;
}

/* ================== STYLES ================== */

/* 1. Rounded (Default) */
.style-rounded .huepos-badge {
    border-radius: 4px;
}

/* 2. Gradient (Mew Inspired) */
.style-gradient .huepos-badge {
    border-radius: 50px;
    /* Fully rounded pill */
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.style-gradient .sale-badge {
    background-image: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%);
}

.style-gradient .new-badge {
    background-image: linear-gradient(135deg, #26c485 0%, #20bf55 100%);
}

.style-gradient .hot-badge {
    background-image: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.style-gradient .bestseller-badge {
    background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

/* 3. Pastel (Mew Inspired) */
.style-pastel .huepos-badge {
    border-radius: 50px;
    font-weight: 800;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.style-pastel .sale-badge {
    background-color: #ffe5e5;
    color: #d32f2f;
}

.style-pastel .new-badge {
    background-color: #e6fffa;
    color: #00796b;
}

.style-pastel .hot-badge {
    background-color: #fff8e1;
    color: #ffa000;
}

.style-pastel .bestseller-badge {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* 4. Floating Icon (Icon Only) */
.style-floating .huepos-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    font-size: 14px;
}

.style-floating .huepos-badge span {
    display: none;
}

/* Hide text */
.style-floating .huepos-badge i {
    margin: 0;
    font-size: 14px;
}

/* 5. Ribbon */
.style-ribbon .huepos-badges {
    left: -5px;
    /* Pull out */
}

.style-ribbon.pos-top-right .huepos-badges {
    left: auto;
    right: -5px;
}

.style-ribbon .huepos-badge {
    border-radius: 0 3px 3px 0;
    position: relative;
    margin-bottom: 5px;
}

.style-ribbon.pos-top-right .huepos-badge {
    border-radius: 3px 0 0 3px;
}

/* Ribbon fold effect */
.style-ribbon .huepos-badge::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    border-top: 5px solid rgba(0, 0, 0, 0.3);
    border-left: 5px solid transparent;
}

.style-ribbon.pos-top-right .huepos-badge::before {
    left: auto;
    right: 0;
    border-right: 5px solid transparent;
    border-left: none;
}

/* 6. Glassmorphism */
.style-glass .huepos-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ================== POSITIONS ================== */
.pos-top-left {
    top: 10px;
    left: 10px;
}

.pos-top-right {
    top: 10px;
    right: 10px;
    left: auto;
    align-items: flex-end;
}

.pos-bottom-center {
    top: auto;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    width: 100%;
    justify-content: center;
    flex-direction: row;
}

.pos-floating {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
}

/* ================== ANIMATIONS ================== */

/* Pulse */
.anim-pulse .huepos-badge {
    animation: huepos-pulse 2s infinite;
}

@keyframes huepos-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Shine */
.anim-shine .huepos-badge {
    position: relative;
    overflow: hidden;
}

.anim-shine .huepos-badge::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: huepos-shine 3s infinite;
}

@keyframes huepos-shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Glow */
.anim-glow .huepos-badge {
    animation: huepos-glow 1.5s infinite alternate;
}

@keyframes huepos-glow {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.3);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .huepos-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}