/**
 * Quick View Modal Styles
 * Styling for the product quick view popup
 */

/* Modal Overlay */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quick-view-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.quick-view-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Modal Container */
.quick-view-modal__container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.quick-view-modal.is-open .quick-view-modal__container {
    transform: scale(1);
}

/* Close Button */
.quick-view-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quick-view-modal__close:hover {
    background-color: #f5f5f5;
}

.quick-view-modal__close svg {
    width: 20px;
    height: 20px;
    color: #333;
}

/* Modal Content */
.quick-view-modal__content {
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Loading State */
.quick-view-modal__loading {
    text-align: center;
    padding: 60px 20px;
}

.quick-view-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4e8a26;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.quick-view-modal__loading p {
    color: #666;
    font-size: 16px;
}

/* Product Layout */
.quick-view-modal__product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .quick-view-modal__product {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Gallery Slider */
.quick-view-modal__gallery {
    position: relative;
}

.quick-view-slider {
    position: relative;
    width: 100%;
}

.quick-view-slider__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    cursor: grab;
    user-select: none;
}

.quick-view-slider__track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.quick-view-slider__track.dragging {
    cursor: grabbing;
    scroll-snap-type: none; /* Disable snap while dragging */
    scroll-behavior: auto; /* Disable smooth scroll while dragging */
}

.quick-view-slider__track.dragging img {
    pointer-events: none; /* Prevent image drag while sliding */
}

.quick-view-slider__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 0 5px;
}

.quick-view-slider__slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Slider Dots */
.quick-view-slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.quick-view-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.quick-view-slider__dot:hover {
    background-color: #bbb;
    transform: scale(1.2);
}

.quick-view-slider__dot.active {
    background-color: #5fa52d;
    transform: scale(1.2);
}

/* Product Details */
.quick-view-modal__title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #333;
    line-height: 1.3;
        margin-bottom: 0em;
}

.quick-view-modal__price {
    font-size: 24px;
    font-weight: 700;
    color: #4e8a26;
    margin-bottom: 0em;
}

.quick-view-modal__price del {
    color: #999;
    font-weight: 400;
    margin-right: 10px;
}

.quick-view-modal__description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 14px;
}

.quick-view-modal__description p {
    margin-bottom: 15px;
}

.quick-view-modal__description p:last-child {
    margin-bottom: 0;
}

/* Actions */
.quick-view-modal__actions {
    margin-top: 30px;
}

/* Quick View Button in Related Products */
.related-product {
    display: flex;
    align-items: center;
    gap: 15px;
}
@media (max-width: 767px) {
    .related-product {
        flex-direction: column;
        gap: 10px;
    }
}
.related-product-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.related-product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.related-product-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-product-select {
    flex-shrink: 0;
}

.related-product-title {
    flex-grow: 1;
}

.quick-view-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-decoration: underline;
    transition: color 0.2s ease;
    display: inline-block;
    width: auto;
    text-align: left;
    margin-left: 2.7em;
}

.quick-view-btn:hover {
    color: #5fa52d;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .quick-view-btn {
        font-size: 13px;
    }
}

