/* ===== PRODUCT OVERLAY STYLES ===== */
/* Ảnh viền sản phẩm cho các sự kiện đặc biệt */

.product-image-with-overlay {
    position: relative;
    display: inline-block;
}

.product-overlay-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.product-overlay {
    position: absolute !important;
    z-index: 15 !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
}

/* Position classes */
.product-overlay-top-left {
    top: 5px !important;
    left: 5px !important;
}

.product-overlay-top-right {
    top: 5px !important;
    right: 5px !important;
}

.product-overlay-bottom-left {
    bottom: 5px !important;
    left: 5px !important;
}

.product-overlay-bottom-right {
    bottom: 5px !important;
    right: 5px !important;
}

.product-overlay-center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.product-overlay-full {
    top: 0 !important;
    left: 0 !important;
    /* width and height will be set by inline style */
}

/* CSS Overlay Styles */
.product-overlay-css {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-overlay-red_border {
    background: linear-gradient(45deg, #ff0000, #ff4444);
    border: 3px solid #ff0000;
}

.product-overlay-pink_border {
    background: linear-gradient(45deg, #ff69b4, #ffb6c1);
    border: 3px solid #ff69b4;
}

.product-overlay-gold_border {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: 3px solid #ffd700;
}

.product-overlay-gradient_border {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border: 3px solid transparent;
    background-clip: padding-box;
}

/* Badge Styles */
.product-overlay-badge {
    background: linear-gradient(45deg, #ff4444, #ff6666);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.badge-text {
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    text-align: center;
    line-height: 1;
}

/* Event-specific styles */
.product-overlay-independence_day {
    background: linear-gradient(45deg, #ff0000, #ffff00);
    border: 3px solid #ff0000;
}

.product-overlay-womens_day {
    background: linear-gradient(45deg, #ff69b4, #ffb6c1, #ffc0cb);
    border: 3px solid #ff69b4;
}

.product-overlay-super_sale {
    background: linear-gradient(45deg, #ff4444, #ff6666, #ff8888);
    border: 3px solid #ff0000;
    animation: pulse 2s infinite;
}

.product-overlay-black_friday {
    background: linear-gradient(45deg, #000000, #1a1a1a, #333333);
    border: 4px solid #ff0000;
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.product-overlay-black_friday::before {
    content: "BLACK FRIDAY";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
}

.product-overlay-black_friday::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 0, 0, 0.3) 50%, 
        transparent 70%);
    animation: blackFridayShine 2s infinite;
    z-index: 1;
}

@keyframes blackFridayShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.product-overlay-super_sale {
    animation: pulse 2s infinite;
}

/* Hover effects */
.product-card:hover .product-overlay {
    transform: scale(1.1);
}

.product-card:hover .product-overlay-badge {
    transform: scale(1.2);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .product-overlay {
        min-width: 30px;
        min-height: 30px;
    }
    
    .badge-text {
        font-size: 10px;
    }
    
    .product-overlay-badge {
        min-width: 30px;
        min-height: 30px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .product-overlay {
        min-width: 25px;
        min-height: 25px;
    }
    
    .badge-text {
        font-size: 8px;
    }
    
    .product-overlay-badge {
        min-width: 25px;
        min-height: 25px;
    }
}

/* Ensure overlay doesn't interfere with product functionality */
.product-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Special effects for different events */
.product-overlay-independence_day::before {
    content: "🇻🇳";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
}

.product-overlay-womens_day::before {
    content: "🌸";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
}

.product-overlay-super_sale::before {
    content: "⚡";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .product-overlay::before {
        font-size: 12px;
    }
}

/* Ensure proper z-index stacking */
.woocommerce .product-card {
    position: relative;
}

.woocommerce .product-card .product-overlay {
    z-index: 20;
}

/* Overlay for single product page */
.single-product .product-image-with-overlay {
    position: relative;
}

.single-product .product-overlay {
    z-index: 25;
}
