/**
 * Product Lightbox/Quick View Styles
 */

/* Overlay */
.apb-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    padding: 20px;
    overflow-y: auto;
}

/* Container */
.apb-lightbox-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: lightboxFadeIn 0.3s ease-out;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close Button */
.apb-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.apb-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Content */
.apb-lightbox-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Gallery */
.apb-lightbox-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.apb-lightbox-main-image {
    position: relative;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.apb-lightbox-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.apb-lightbox-main-image img.zoomed {
    transform: scale(2);
    cursor: zoom-out;
}

.apb-zoom-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apb-zoom-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.apb-zoom-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Thumbnails */
.apb-lightbox-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.apb-lightbox-thumbnail {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.apb-lightbox-thumbnail:hover {
    border-color: var(--apb-primary-color, #FF9900);
}

.apb-lightbox-thumbnail.active {
    border-color: var(--apb-primary-color, #FF9900);
}

.apb-lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details */
.apb-lightbox-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apb-lightbox-title {
    margin: 0;
    font-size: 1.8em;
    line-height: 1.3;
    color: #111827;
}

.apb-lightbox-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
}

.apb-lightbox-price-group {
    display: flex;
    align-items: baseline;
    gap: 15px;
    flex-wrap: wrap;
}

.apb-lightbox-original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1.2em;
}

.apb-lightbox-current-price {
    font-size: 2em;
    font-weight: bold;
    color: var(--apb-accent-color, #B12704);
}

.apb-lightbox-savings {
    background: #10b981;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.apb-lightbox-description {
    line-height: 1.6;
    color: #6b7280;
}

.apb-lightbox-features h4 {
    margin: 0 0 10px;
    color: #111827;
}

.apb-lightbox-features ul {
    margin: 0;
    padding-left: 20px;
}

.apb-lightbox-features li {
    margin: 8px 0;
    line-height: 1.5;
}

/* Actions */
.apb-lightbox-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.apb-lightbox-buy-btn {
    flex: 1;
    padding: 15px 30px;
    background: var(--apb-primary-color, #FF9900);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s;
}

.apb-lightbox-buy-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.apb-lightbox-share-btn {
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.apb-lightbox-share-btn:hover {
    border-color: var(--apb-primary-color, #FF9900);
    color: var(--apb-primary-color, #FF9900);
}

.apb-lightbox-share-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Meta */
.apb-lightbox-meta {
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.apb-meta-item {
    margin: 8px 0;
    font-size: 0.9em;
    color: #6b7280;
}

.apb-meta-item strong {
    color: #111827;
    margin-right: 5px;
}

/* Quick View Trigger */
.apb-quick-view-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
}

.apb-quick-view-trigger:hover {
    border-color: var(--apb-primary-color, #FF9900);
    color: var(--apb-primary-color, #FF9900);
}

.apb-quick-view-trigger:before {
    content: "👁";
    font-size: 1.2em;
}

/* Body Lock */
body.apb-lightbox-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .apb-lightbox-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }

    .apb-lightbox-main-image {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 768px) {
    .apb-lightbox-overlay {
        padding: 10px;
    }

    .apb-lightbox-container {
        margin: 20px auto;
    }

    .apb-lightbox-content {
        padding: 20px;
        gap: 20px;
    }

    .apb-lightbox-title {
        font-size: 1.4em;
    }

    .apb-lightbox-current-price {
        font-size: 1.6em;
    }

    .apb-lightbox-actions {
        flex-direction: column;
    }

    .apb-lightbox-buy-btn {
        padding: 12px 20px;
    }
}

/* Print Styles */
@media print {
    .apb-lightbox-overlay {
        display: none !important;
    }
}
