Copy/* Product Gallery Styles */
.product-gallery {
    position: sticky;
    top: 2rem;
    height: fit-content;
    width: 100%;
}

/* Main Image Container */
.main-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: #f8f9fa;
    width: 100%;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.main-image:hover {
    transform: scale(1.02);
}

/* Image Counter Overlay */
.image-counter-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

/* Navigation on Main Image */
.main-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.main-image-nav:hover:not(:disabled) {
    background: rgba(238, 77, 45, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.main-image-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.prev-main {
    left: 1rem;
}

.next-main {
    right: 1rem;
}

/* Zoom Button */
.image-zoom {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.image-zoom:hover {
    background: rgba(238, 77, 45, 0.9);
    transform: translateY(-2px);
}

/* Thumbnails Container */
.thumbnails-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.thumbnail-nav-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.thumbnail-nav-btn:hover:not(:disabled) {
    background: #ee4d2d;
    color: white;
    border-color: #ee4d2d;
}

.thumbnail-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.thumbnails-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
}

.thumbnails-slider {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.3s ease;
    width: 100%;
}

.thumbnail-item {
    flex: 0 0 calc(20% - 0.4rem); /* 5 items per view */
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 60px;
}

.thumbnail-item:hover {
    border-color: #ee4d2d;
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: #ee4d2d;
    box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.2);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image Indicators */
.image-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.indicator.active,
.indicator:hover {
    background: #ee4d2d;
    transform: scale(1.2);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.image-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.modal-nav-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav-btn:hover {
    background: rgba(238, 77, 45, 0.8);
    transform: scale(1.1);
}

.modal-counter {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* RESPONSIVE DESIGN - FIX CHÍNH */
@media (max-width: 1200px) {
    .main-image {
        height: 400px;
    }

    .thumbnail-item {
        flex: 0 0 calc(25% - 0.375rem); /* 4 items per view */
    }
}

@media (max-width: 1024px) {
    .main-image {
        height: 380px;
    }

    .thumbnail-item {
        flex: 0 0 calc(25% - 0.375rem); /* 4 items per view */
        min-width: 70px;
    }
}

@media (max-width: 768px) {
    .product-gallery {
        position: static;
        width: 100%;
    }

    .main-image {
        height: 350px;
    }

    .thumbnail-item {
        flex: 0 0 calc(33.333% - 0.333rem); /* 3 items per view */
        min-width: 80px;
    }

    .main-image-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .thumbnail-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .image-counter-overlay {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .image-zoom {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-image {
        height: 300px;
    }

    .thumbnail-item {
        flex: 0 0 calc(50% - 0.25rem); /* 2 items per view */
        min-width: 100px;
    }

    .thumbnails-container {
        gap: 0.3rem;
    }

    .image-indicators {
        gap: 0.3rem;
    }

    .indicator {
        width: 6px;
        height: 6px;
    }

    .modal-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .modal-counter {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .main-image-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .prev-main {
        left: 0.5rem;
    }

    .next-main {
        right: 0.5rem;
    }

    .image-zoom {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* Performance optimizations */
.thumbnail-item img {
    will-change: transform;
}

.thumbnails-slider {
    will-change: transform;
}

.main-image {
    will-change: transform;
}

/* Loading state */
.thumbnail-item.loading {
    background: #f8f9fa;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Focus states for accessibility */
.thumbnail-item:focus,
.main-image-nav:focus,
.thumbnail-nav-btn:focus,
.indicator:focus {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .thumbnail-item {
        border: 2px solid #333;
    }

    .thumbnail-item.active {
        border-color: #ee4d2d;
        background: rgba(238, 77, 45, 0.1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .thumbnail-item,
    .main-image,
    .thumbnails-slider,
    .main-image-nav,
    .image-zoom {
        transition: none;
    }

    .main-image:hover {
        transform: none;
    }

    .thumbnail-item:hover {
        transform: none;
    }
}


/* Swipe animations */
.main-image.swipe-left {
    animation: swipeLeft 0.3s ease-out;
}

.main-image.swipe-right {
    animation: swipeRight 0.3s ease-out;
}

@keyframes swipeLeft {
    0% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

@keyframes swipeRight {
    0% { transform: translateX(0); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

/* Modal animations */
.image-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.modal-open {
    opacity: 1;
}

/* Loading states */
.main-image {
    transition: opacity 0.3s ease;
}