/**
 * Buy Now Popup Styles
 * Responsive modal for product purchase links
 */

/* Popup Overlay */
.buy-now-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.buy-now-popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* Popup Container */
.buy-now-popup-container {
    background: #fff;
    max-width: 11   00px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.buy-now-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 10;
    padding: 5px 10px;
    transition: color 0.2s ease;
}

.buy-now-popup-close:hover {
    color: #000;
}

/* Popup Content */
.buy-now-popup-content {
    display: flex;
    flex-direction: column;
    padding: 40px;
    gap: 0px;
}

/* Top Section: Image + Product Info (Column A + B) */
.buy-now-popup-top {
    display: flex;
    gap: 40px;
    align-items: center;
}

/* Product Image Section (Column A) */
.buy-now-popup-image {
    flex: 0 0 auto;
    width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.buy-now-popup-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Product Info Section (Column B) */
.buy-now-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
}

/* Product Title */
.buy-now-popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

/* Product Dropdown */
.buy-now-popup-dropdown {
    position: relative;
}

.buy-now-product-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    transition: border-color 0.2s ease;
}

.buy-now-product-select:hover,
.buy-now-product-select:focus {
    border-color: #999;
    outline: none;
}

/* Retailers Section (Column C - Full Width) */
.buy-now-popup-retailers {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #B2B2B2;
}

.buy-now-retailers-heading {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: #000;
    margin: 0;
    padding: 12px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Retailer Buttons Container */
.buy-now-retailers-buttons {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 30px;
    background: #F0F0F0;
    align-items: center;
    justify-content: center;
}

.buy-now-retailer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.buy-now-retailer-btn:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.retailer-logo {
    max-width: 270px;
    height: auto;
    display: block;
}

/* No Links Notice */
.buy-now-no-links-notice {
    text-align: center;
    padding: 20px;
}

.buy-now-no-links-notice p {
    margin: 0;
    font-size: 16px;
    color: #666;
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .buy-now-popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .buy-now-popup-content {
        padding: 30px 20px;
        gap: 25px;
    }
    
    /* Stack top section vertically on mobile */
    .buy-now-popup-top {
        flex-direction: column;
        gap: 0px;
    }
    
    .buy-now-popup-image {
        width: 100%;
        padding: 15px;
    }
    
    .buy-now-popup-info {
        width: 100%;
    }
    
    .buy-now-popup-title {
        font-size: 20px;
    }
    
    .buy-now-retailers-buttons {
        flex-direction: column;
        gap: 20px;
        padding: 25px 20px;
    }
    
    .retailer-logo {
        max-width: 200px;
    }
    
    .buy-now-popup-close {
        font-size: 28px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .buy-now-popup-content {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .buy-now-popup-top {
        gap: 0px;
    }
    
    .buy-now-popup-image {
        padding: 10px;
    }
    
    .buy-now-popup-title {
        font-size: 18px;
    }
    
    .buy-now-product-select {
        font-size: 14px;
        padding: 10px 35px 10px 12px;
    }
    
    .buy-now-retailers-heading {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    .buy-now-retailers-buttons {
        padding: 20px 15px;
        gap: 15px;
    }
    
    .retailer-logo {
        max-width: 180px;
    }
}

/* Loading State */
.buy-now-popup-content.loading {
    opacity: 0.6;
    pointer-events: none;
}
