/* Quick View Modal Styles */
.wpc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.wpc-modal.active {
    display: block;
}

.wpc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.wpc-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: wpcModalSlideIn 0.3s ease;
}

@keyframes wpcModalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.wpc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wpc-modal-close:hover {
    background: #333;
    color: #fff;
    transform: rotate(90deg);
}

.wpc-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

/* Loading State */
.wpc-modal-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

.wpc-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: wpcSpin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes wpcSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Quick View Product */
.wpc-quick-view-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.wpc-quick-view-images {
    position: relative;
}

.wpc-quick-view-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.wpc-quick-view-summary {
    display: flex;
    flex-direction: column;
}

.wpc-quick-view-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #333;
    line-height: 1.3;
}

.wpc-quick-view-price {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #77a464;
}

.wpc-quick-view-price .price {
    color: #77a464;
}

.wpc-quick-view-price del {
    color: #999;
    margin-right: 10px;
    font-size: 20px;
}

.wpc-quick-view-rating {
    margin-bottom: 15px;
}

.wpc-quick-view-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

/* Variations */
.variations {
    margin-bottom: 20px;
}

.variation-item {
    margin-bottom: 15px;
}

.variation-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.variation-item select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.variation-item select:hover {
    border-color: #333;
}

.variation-item select:focus {
    outline: none;
    border-color: #77a464;
}

/* Quantity Input */
.wpc-quick-view-quantity {
    margin-bottom: 20px;
}

.wpc-quick-view-quantity .quantity {
    display: inline-block;
}

.wpc-quick-view-quantity input[type="number"] {
    width: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

/* Add to Cart Button */
.wpc-quick-view-add-to-cart {
    width: 100%;
    padding: 15px 30px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpc-quick-view-add-to-cart:hover {
    background: #77a464;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.wpc-quick-view-add-to-cart.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.wpc-quick-view-add-to-cart.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wpcSpin 0.6s linear infinite;
}

/* Product Meta */
.wpc-quick-view-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.wpc-quick-view-meta span {
    display: block;
    margin-bottom: 8px;
}

.wpc-quick-view-meta .sku {
    font-weight: 600;
    color: #333;
}

/* View Details Link */
.wpc-quick-view-details {
    display: inline-block;
    margin-top: 15px;
    color: #77a464;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.wpc-quick-view-details:hover {
    color: #333;
}

/* Body lock when modal open */
body.wpc-modal-open {
    overflow: hidden;
}

/* Error State */
.wpc-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .wpc-modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .wpc-modal-content {
        padding: 20px;
    }

    .wpc-quick-view-product {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .wpc-quick-view-title {
        font-size: 22px;
    }

    .wpc-quick-view-price {
        font-size: 20px;
    }

    .wpc-modal-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wpc-modal-content {
        padding: 15px;
    }

    .wpc-quick-view-title {
        font-size: 20px;
    }

    .wpc-quick-view-add-to-cart {
        padding: 12px 20px;
        font-size: 14px;
    }
}