/* AR Product Popup Styles */

.ar-product-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 999999;
    overflow-y: auto;
}

.ar-product-popup {
    position: relative;
    max-width: 1200px;
    width: 90%;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.ar-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    line-height: 1;
}

.ar-popup-close:hover {
    background: #f0f0f0;
    border-color: #999;
}

.ar-popup-content {
    padding: 40px;
    min-height: 300px;
}

.ar-popup-content.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-popup-product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.ar-popup-product-images img {
    width: 100%;
    height: auto;
}

.ar-popup-gallery {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ar-popup-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
}

.ar-popup-gallery-thumb:hover {
    border-color: #333;
}

.ar-popup-price {
    font-size: 24px;
    margin: 20px 0;
}

.ar-popup-price .amount {
    font-weight: bold;
}

.ar-popup-short-description {
    margin: 20px 0;
    line-height: 1.6;
}

.ar-popup-add-to-cart {
    margin: 30px 0;
}

.ar-popup-add-to-cart .quantity {
    display: inline-block;
    margin-right: 10px;
}

.ar-popup-add-to-cart .quantity input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.ar-popup-add-to-cart .single_add_to_cart_button {
    padding: 12px 30px;
    font-size: 16px;
}

.ar-popup-meta {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.ar-popup-meta > div {
    margin-bottom: 8px;
}

.ar-popup-view-details {
    margin-top: 20px;
}

.ar-view-full-details {
    text-decoration: underline;
    color: #0073aa;
}

.ar-view-full-details:hover {
    color: #005177;
}

/* Variable product styles */
.ar-popup-add-to-cart .variations {
    margin-bottom: 20px;
}

.ar-popup-add-to-cart .variations td {
    padding: 8px 0;
}

.ar-popup-add-to-cart .variations .label {
    width: 100px;
    font-weight: bold;
}

.ar-popup-add-to-cart .variations select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
}

/* Membership product styles */
.ar-popup-add-to-cart .membership-names-container {
    margin-bottom: 20px;
}

.ar-popup-add-to-cart .membership-name-field {
    margin-bottom: 15px;
}

.ar-popup-add-to-cart .membership-name-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ar-popup-add-to-cart .membership-name-field input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .ar-product-popup {
        width: 95%;
        margin: 20px auto;
    }
    
    .ar-popup-content {
        padding: 20px;
    }
    
    .ar-popup-product-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Loading spinner */
.ar-popup-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: ar-spin 1s linear infinite;
}

@keyframes ar-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success message */
.ar-popup-content .woocommerce-message {
    background-color: #0f834d;
    color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.ar-popup-content .woocommerce-message a {
    color: #fff;
    text-decoration: underline;
    margin-left: 10px;
}

/* Error styles */
.ar-popup-content .error {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
}