/*
Theme Name: Blocksy Child
Theme URI: https://popustkod.org
Description: PopustKod.org Custom Child Theme for Blocksy
Author: PopustKod.org
Author URI: https://popustkod.org
Template: blocksy
Version: 2.0
*/

/* ===============================================
   POPUSTKOD.ORG CUSTOM STYLES
   =============================================== */

/* ===== 1. BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* ===== 2. STICKY HEADER ===== */
.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98) !important;
}

/* ===== 3. SOCIAL PROOF (Viewer Counter) ===== */
.social-proof {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(247, 147, 30, 0.08) 100%);
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 500;
    animation: fadeInUp 0.5s ease;
}

.social-proof .viewer-icon {
    font-size: 16px;
}

/* ===== 4. STOCK WARNING ===== */
.stock-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #D32F2F;
    background: rgba(211, 47, 47, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* ===== 5. PRODUCT BADGES ===== */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: badgeBounce 0.6s ease;
}

.hot-badge {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.new-badge {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

/* ===== 6. COUPON CARDS (Single Product) ===== */
.pk-single-coupon-container {
    margin: 20px 0;
}

.pk-coupon {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #FF6B35;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
    transition: all 0.3s ease;
}

.pk-coupon:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.pk-coupon-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.pk-coupon-price {
    font-size: 20px;
    font-weight: 700;
    color: #FF6B35;
    margin-bottom: 15px;
}

.pk-coupon-price strong {
    font-size: 24px;
}

.pk-coupon-btn {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pk-coupon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.pk-coupon-code {
    margin-top: 15px;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pk-coupon-code strong {
    color: #FF6B35;
    font-size: 18px;
}

/* ===== 7. SEARCH BAR ENHANCEMENTS ===== */
.search-form.focused {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.search-clear {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 24px;
    color: #999;
    padding: 5px;
    line-height: 1;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: #FF6B35;
}

/* ===== 8. PRODUCT HOVER EFFECTS ===== */
.product.hovered {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.product.hovered .woocommerce-loop-product__link img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ===== 9. ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes badgeBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes priceSparkle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===== 10. MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .social-proof {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .product-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .pk-coupon {
        padding: 15px;
    }
    
    .pk-coupon-title {
        font-size: 16px;
    }
    
    .pk-coupon-price {
        font-size: 18px;
    }
    
    .pk-coupon-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ===== 11. MOBILE MENU BACKDROP ===== */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* ===== 12. CHRISTMAS SEASON ADJUSTMENTS ===== */
body.christmas-mode {
    /* Optional: Add Christmas-specific styles here */
}

/* ===== 13. PRICE STYLING ===== */
.price ins,
.price .amount {
    animation: priceSparkle 1.5s ease-in-out;
    transform-origin: center;
}

/* ===== 14. ACCESSIBILITY ===== */
.back-to-top:focus,
.pk-coupon-btn:focus,
.search-clear:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* Skip screen readers for decorative icons */
.viewer-icon,
.product-badge {
    user-select: none;
}

/* ===== 15. PRINT STYLES ===== */
@media print {
    .back-to-top,
    .social-proof,
    .product-badge,
    #christmas-canvas {
        display: none !important;
    }
}

/* ===== 16. LOADING STATES ===== */
.pk-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.pk-loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
