/**
 * Perfume Core - Product Features Styles
 * 
 * Styling for scarcity, social proof, and trust elements
 */

/* ==========================================================================
   Scarcity Badges
   ========================================================================== */

.ppf-scarcity-badges {
    margin: 15px 0;
}

.ppf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 10px;
    margin-bottom: 8px;
    animation: ppf-pulse-badge 2s ease-in-out infinite;
}

.ppf-badge-scarcity {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.ppf-badge-limited {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    border: 1px solid #fcd34d;
}

.ppf-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

@keyframes ppf-pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Countdown Timer */
.ppf-countdown {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 15px 0;
    display: inline-block;
}

.ppf-countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d4af37;
    display: block;
    margin-bottom: 8px;
}

.ppf-countdown-timer {
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
}

.ppf-countdown-timer span:not(.ppf-countdown-sep) {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 45px;
    text-align: center;
}

.ppf-countdown-sep {
    color: #d4af37;
    font-weight: 400;
}

/* Urgency Bar */
.ppf-urgency-bar {
    background: #fff;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 15px 0;
}

.ppf-urgency-text {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ppf-urgency-text::before {
    content: '🔥';
}

.ppf-urgency-progress {
    height: 8px;
    background: #fecaca;
    border-radius: 4px;
    overflow: hidden;
}

.ppf-urgency-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: ppf-urgency-pulse 1.5s ease-in-out infinite;
}

@keyframes ppf-urgency-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ==========================================================================
   Social Proof
   ========================================================================== */

.ppf-social-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.ppf-proof-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.ppf-proof-icon {
    font-size: 18px;
}

.ppf-proof-icon.ppf-pulse {
    animation: ppf-icon-pulse 2s ease-in-out infinite;
}

@keyframes ppf-icon-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.ppf-purchases .ppf-proof-text {
    font-weight: 600;
    color: #059669;
}

.ppf-views .ppf-proof-text {
    font-weight: 500;
    color: #2563eb;
}

/* ==========================================================================
   Trust Badges
   ========================================================================== */

.ppf-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.ppf-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.ppf-trust-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ppf-trust-icon {
    font-size: 16px;
}

.ppf-guarantee {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    margin-top: 10px;
    font-weight: 600;
    color: #92400e;
}

.ppf-guarantee-icon {
    font-size: 20px;
}

/* Free Shipping Notice */
.ppf-free-shipping-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 10px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.ppf-shipping-icon {
    font-size: 20px;
}

/* ==========================================================================
   Benefits List
   ========================================================================== */

.ppf-benefits-list {
    margin: 25px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.ppf-benefits-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ppf-benefits-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ppf-benefits-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #4b5563;
}

.ppf-benefits-list li:last-child {
    border-bottom: none;
}

.ppf-benefit-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #d4af37 0%, #b8972f 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ==========================================================================
   Recent Sales Popup
   ========================================================================== */

.ppf-recent-sale-popup {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 1100;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(10px);
    color: #fefefe;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    animation: ppf-popup-fade-in 0.35s ease-out;
    overflow: hidden;
}

@keyframes ppf-popup-fade-in {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Sweep light effect on show */
.ppf-recent-sale-popup::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
    transform: translateX(-120%);
    animation: ppf-sweep 1.4s ease-out 0.2s forwards;
    pointer-events: none;
}

@keyframes ppf-sweep {
    0% {
        transform: translateX(-120%);
    }
    60% {
        transform: translateX(20%);
    }
    100% {
        transform: translateX(120%);
    }
}

.ppf-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e5e7eb;
    font-size: 16px;
    transition: color 0.2s ease;
}

.ppf-popup-close:hover {
    color: #d4af37;
}

.ppf-popup-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ppf-popup-image {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, #111 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.ppf-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ppf-popup-name {
    font-size: 13px;
    font-weight: 700;
    color: #fefefe;
    letter-spacing: 0.01em;
}

.ppf-popup-text {
    font-size: 12px;
    color: #d4af37;
    letter-spacing: 0.02em;
}

.ppf-popup-time {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ppf-popup-time::before {
    content: '•';
    font-size: 12px;
    color: #d4af37;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .ppf-trust-badges {
        padding: 15px;
    }

    .ppf-countdown-timer {
        font-size: 18px;
    }

    .ppf-countdown-timer span:not(.ppf-countdown-sep) {
        padding: 6px 10px;
        min-width: 38px;
    }

    .ppf-recent-sale-popup {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .ppf-social-proof {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==========================================================================
   Out of Stock Styling (Black & White)
   ========================================================================== */

.product.outofstock,
.product.outofstock * {
    color: #e5e7eb !important;
}

.product.outofstock img {
    filter: grayscale(100%) brightness(0.8);
}

.product.outofstock .price,
.product.outofstock .text-gold,
.product.outofstock .text-gold\/60 {
    color: #e5e7eb !important;
}

.product.outofstock .bg-gold,
.product.outofstock .badge,
.product.outofstock .onsale {
    background: #111 !important;
    color: #e5e7eb !important;
    border-color: #2d2d2d !important;
}

.product.outofstock .ajax_add_to_cart,
.product.outofstock .add_to_cart_button {
    background: #1a1a1a !important;
    color: #9ca3af !important;
    border-color: #2d2d2d !important;
    pointer-events: none;
    cursor: not-allowed;
}