/**
 * LP Quick View - Styles
 * Lightweight, clean modal styling
 */

/* Quick View Trigger Button */
.lp-qv-trigger {
    display: block;
    width: 100%;
    padding: 1.5rem 1rem;
    margin-top: 8px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    border-radius: 6px;
}

.lp-qv-trigger:hover {
    background: #333;
}

/* Modal Overlay */
.lp-qv-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lp-qv-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.lp-qv-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Modal Container */
.lp-qv-container {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: #fff;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    border-radius: 6px;
}

@media (min-width: 1200px) {
    .lp-qv-container {
        max-width: 1024px;
        height: auto;
    }
}

.lp-qv-modal[aria-hidden="false"] .lp-qv-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.lp-qv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lp-qv-close:hover {
    color: #000;
}

/* Content Area */
.lp-qv-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

/* Loading State */
.lp-qv-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.lp-qv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eee;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: lp-qv-spin 0.8s linear infinite;
}

@keyframes lp-qv-spin {
    to { transform: rotate(360deg); }
}

/* Gallery Section */
.lp-qv-gallery {
    position: relative;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
}

.lp-qv-main-image {
    flex: 1;
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 24px;
    min-height: 300px;
}

.lp-qv-main-image img {
    max-width: 100%;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lp-qv-thumbnails {
    display: flex;
    gap: 8px;
    padding: 0rem 2rem 2rem;
    overflow-x: auto;
    justify-content: center;
}

.lp-qv-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 2px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.lp-qv-thumb:hover,
.lp-qv-thumb.active {
    border-color: #1a1a1a;
}

.lp-qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Section */
.lp-qv-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 90vh;
}

.lp-qv-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

/* Price */
.lp-qv-price {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.lp-qv-price del {
    color: #999;
    font-weight: 400;
    font-size: 16px;
    margin-right: 8px;
}

.lp-qv-price ins {
    text-decoration: none;
    color: #1a1a1a;
}

/* Description */
.lp-qv-description {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Meta (SKU, Stock) */
.lp-qv-meta {
    margin-bottom: 24px;
    font-size: 13px;
    color: #777;
}

.lp-qv-meta span {
    display: flex;
    align-items: center;
}

.lp-qv-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lp-qv-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8bc34a;
}

.lp-qv-stock.out-of-stock .lp-qv-stock-dot {
    background: #e53935;
}

/* Actions */
.lp-qv-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-qv-quantity-wrap {
    display: none!important;
}

.lp-qv-quantity-wrap label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.lp-qv-quantity {
    width: 70px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    text-align: center;
}

.lp-qv-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1.5rem 1rem;
    background: #8eb21a;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.lp-qv-add-to-cart:hover {
    background: #7cb342;
}

.lp-qv-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lp-qv-add-to-cart svg {
    width: 18px;
    height: 18px;
}

.lp-qv-view-product {
    background: #1a1a1a;
    display: block;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.lp-qv-view-product:hover {
    background: #333;
    color: #fff;
}

/* Added to cart message */
.lp-qv-added-msg {
    padding: 10px;
    background: #e8f5e9;
    color: #8eb21a;
    font-size: 13px;
    text-align: center;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lp-qv-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .lp-qv-container {
        max-height: 95vh;
    }
    
    .lp-qv-content {
        grid-template-columns: 1fr;
    }
    
    .lp-qv-gallery {
        max-height: 45vh;
    }
    
    .lp-qv-main-image {
        min-height: 200px;
        padding: 16px;
    }
    
    .lp-qv-main-image img {
        max-height: 200px;
    }
    
    .lp-qv-thumbnails {
        padding: 8px 16px 16px;
    }
    
    .lp-qv-thumb {
        width: 56px;
        height: 56px;
    }
    
    .lp-qv-info {
        padding: 20px;
        max-height: 50vh;
    }
    
    .lp-qv-title {
        font-size: 18px;
    }
    
    .lp-qv-price {
        font-size: 18px;
    }
}

/* Prevent body scroll when modal open */
body.lp-qv-open {
    overflow: hidden;
}
