/**
 * dailybuddy Product Card Widget Styles
 */

/* ==========================================================================
   Base Card Styles
   ========================================================================== */

.dailybuddy-product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.dailybuddy-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Product Image
   ========================================================================== */

.dailybuddy-product-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.dailybuddy-product-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dailybuddy-product-card:hover .dailybuddy-product-image img {
    transform: scale(1.05);
}

/* ==========================================================================
   Badge / Ribbon
   ========================================================================== */

.dailybuddy-product-badge {
    position: absolute;
    z-index: 10;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: #e74c3c;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dailybuddy-product-badge.badge-top-left {
    top: 15px;
    left: 15px;
}

.dailybuddy-product-badge.badge-top-right {
    top: 15px;
    right: 15px;
}

.dailybuddy-product-badge.badge-bottom-left {
    bottom: 15px;
    left: 15px;
}

.dailybuddy-product-badge.badge-bottom-right {
    bottom: 15px;
    right: 15px;
}

/* Badge Types */
.dailybuddy-product-badge.badge-type-sale {
    background: #e74c3c;
}

.dailybuddy-product-badge.badge-type-new {
    background: #27ae60;
}

.dailybuddy-product-badge.badge-type-hot {
    background: #f39c12;
}

.dailybuddy-product-badge.badge-type-custom {
    background: #9b59b6;
}

/* ==========================================================================
   Quick View Button 
   ========================================================================== */

.dailybuddy-quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dailybuddy-product-card:hover .dailybuddy-quick-view-btn {
    transform: translate(-50%, -50%) scale(1);
}

.dailybuddy-quick-view-btn:hover {
    background: #fff;
    color: #2196F3;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Quick View Modal */
.dailybuddy-quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.dailybuddy-quick-view-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dailybuddy-quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.dailybuddy-quick-view-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    z-index: 1;
}

.dailybuddy-quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: all 0.3s ease;
}

.dailybuddy-quick-view-close:hover {
    background: #e74c3c;
    color: #fff;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Social Share
   ========================================================================== */

.dailybuddy-social-share {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: 5;
}

.dailybuddy-product-card:hover .dailybuddy-social-share {
    opacity: 1;
    transform: translateX(0);
}

.dailybuddy-social-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dailybuddy-social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dailybuddy-social-btn.facebook:hover {
    background: #3b5998;
    color: #fff;
}

.dailybuddy-social-btn.twitter:hover {
    background: #1da1f2;
    color: #fff;
}

.dailybuddy-social-btn.pinterest:hover {
    background: #bd081c;
    color: #fff;
}

.dailybuddy-social-btn.linkedin:hover {
    background: #0077b5;
    color: #fff;
}

/* ==========================================================================
   Product Content
   ========================================================================== */

.dailybuddy-product-content {
    padding: 25px;
}

.dailybuddy-product-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.dailybuddy-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dailybuddy-product-title a:hover {
    color: #2196F3;
}

.dailybuddy-product-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */

.dailybuddy-countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.dailybuddy-countdown-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.dailybuddy-countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 700;
}

.dailybuddy-countdown-timer>span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dailybuddy-countdown-timer .number {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 35px;
    text-align: center;
}

.dailybuddy-countdown-timer .label {
    font-size: 12px;
    opacity: 0.8;
}

/* ==========================================================================
   Rating
   ========================================================================== */

.dailybuddy-product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #f39c12;
}

.dailybuddy-review-count {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

/* ==========================================================================
   Price
   ========================================================================== */

.dailybuddy-product-price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dailybuddy-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #2196F3;
}

.dailybuddy-product-old-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.dailybuddy-product-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dailybuddy-product-button {
    flex: 1;
    padding: 12px 20px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.dailybuddy-product-button:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.dailybuddy-product-button.cart-button {
    background: #4CAF50;
}

.dailybuddy-product-button.cart-button:hover {
    background: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* ==========================================================================
   Layout: Overlay on Hover
   ========================================================================== */

.dailybuddy-product-card.layout-overlay .dailybuddy-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.dailybuddy-product-card.layout-overlay:hover .dailybuddy-product-overlay {
    opacity: 1;
}

.dailybuddy-product-card.layout-overlay .dailybuddy-product-overlay .dailybuddy-product-button {
    min-width: auto;
}

/* ==========================================================================
   Layout: Content on Hover
   ========================================================================== */

.dailybuddy-product-card.layout-content-on-hover .dailybuddy-product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.dailybuddy-product-card.layout-content-on-hover:hover .dailybuddy-product-overlay {
    transform: translateY(0);
}

.dailybuddy-product-card.layout-content-on-hover .dailybuddy-product-overlay .dailybuddy-product-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dailybuddy-product-card.layout-content-on-hover .dailybuddy-product-overlay .dailybuddy-product-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

@media screen and (max-width: 768px) {
    .dailybuddy-product-content {
        padding: 20px;
    }

    .dailybuddy-product-title {
        font-size: 18px;
    }

    .dailybuddy-product-price {
        font-size: 20px;
    }

    .dailybuddy-product-buttons {
        flex-direction: column;
    }

    .dailybuddy-product-button {
        width: 100%;
    }

    .dailybuddy-countdown-timer {
        font-size: 16px;
    }

    .dailybuddy-quick-view-content {
        padding: 25px;
    }
}

@media screen and (max-width: 480px) {
    .dailybuddy-product-image img {
        height: 250px;
    }

    .dailybuddy-product-badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .dailybuddy-social-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .dailybuddy-countdown-timer {
        font-size: 14px;
    }

    .dailybuddy-countdown-timer .number {
        min-width: 28px;
        padding: 3px 6px;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

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

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

/* Countdown pulse animation when time is low */
.dailybuddy-countdown.urgent {
    animation: pulse 2s ease-in-out infinite;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* ==========================================================================
   Elementor Editor Compatibility
   ========================================================================== */

.elementor-editor-active .dailybuddy-product-card {
    /* Ensure proper display in editor */
}