/* Product Detail Page Styles */

/* Main Container */
.product-detail-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
    background: #fff;
}
.product-detail-title {
    width: auto;
    height: auto;
    font-family: SF Pro Text, SF Pro Text;
    font-weight: 600;
    font-size: 18px;
    color: #333333;
    line-height: 25px;
    text-align: left;
    font-style: normal;
    text-transform: none;
    margin-bottom: 24px;
    display: block;
}
/* Product Gallery */
.pd-gallery {
    display: flex;
    gap: 30px;
    padding-bottom: 32px;
    border-bottom: solid 1px #e5e5e5;
}

.gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 80px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thumb-item:hover {
    border-color: #FB8901;
}

.thumb-item.active {
    border-color: #FB8901;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
}

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

.gallery-main {
    flex: 1;
    position: relative;
    min-height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Featured Carousel */
.featured-carousel {
    padding-bottom: 32px;
    border-bottom: solid 1px #e5e5e5;
    display: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    touch-action: pan-y pinch-zoom;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-slides {
    display: flex;
    width: fit-content;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-item {
    flex-shrink: 0;
    width: 100%;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-item img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 1000px;
}

/* Fullscreen Lightbox */
.fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.fullscreen-lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.2s ease;
}

.lightbox-image.dragging {
    cursor: grabbing;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-controls {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.lightbox-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-zoom-info {
    color: #fff;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

/* Hover zoom icon on main image */
.gallery-main::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-main:hover::after {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .pd-gallery {
        flex-direction: column;
    }

    .gallery-thumbs {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }

    .thumb-item {
        width: 70px;
        height: 70px;
    }

    .gallery-main {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .product-detail-main {
        padding: 15px;
    }

    .gallery-main {
        min-height: 300px;
    }
}