/*!
Theme Name: Avanam
Theme URI: https://avanam.org
Author: AvanamOrg
Author URI: https://avanam.org/
Description: This is starter WordPress theme called Avanam. Created for theme developers to start building beautiful WordPress themes using Avanam.
Version: 1.5.9
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: avanam
Requires at least: 6.2
Tested up to: 6.7
Tags: translation-ready, two-columns, right-sidebar, left-sidebar, footer-widgets, blog, custom-logo, custom-background, custom-menu, rtl-language-support, editor-style, threaded-comments, custom-colors, featured-images, wide-blocks, full-width-template, theme-options, e-commerce
Requires PHP: 7.4

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share
what you've learned with others.
*/

/** Product gallery **/
.adidas-grid-gallery {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.adidas-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .adidas-grid-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .adidas-grid-gallery {
        margin-bottom: 1.5rem;
    }
}

.grid-view-cell {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f5f5f5;
}

.grid-view-cell.grid-hidden {
    display: none;
}

.adidas-grid-gallery[data-expanded="true"] .grid-view-cell.grid-hidden {
    display: block;
    animation: fadeInGrid 0.3s ease forwards;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-image-viewer {
    width: 100%;
    height: 100%;
}

.zoom-cursor-container {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: block;
}

.desktop-zoom-hover {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.zoom-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.grid-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.grid-hires-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@media (min-width: 1024px) {
    .desktop-zoom-hover:hover .grid-hires-image {
        opacity: 1;
    }
    
    .desktop-zoom-hover:hover .grid-main-image {
        opacity: 0;
    }
}

.grid-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    font-family: inherit;
}

.grid-expand-btn:hover {
    background: #000;
    color: #fff;
}

.expand-btn-text {
    line-height: 1;
}

.expand-btn-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.adidas-grid-gallery[data-expanded="true"] .expand-btn-icon {
    transform: rotate(180deg);
}



.pswp__caption__center {
    text-align: center;
    max-width: 80%;
}

@media (max-width: 768px) {
    .grid-expand-btn {
        display: none;
    }
    
    .grid-view-cell {
        aspect-ratio: 3 / 4;
    }
    
    .adidas-grid-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .adidas-grid-container::-webkit-scrollbar {
        display: none;
    }
    
    .adidas-grid-container .grid-view-cell {
        flex: 0 0 100%;
        scroll-snap-align: start;
    }
    
    .adidas-grid-container .grid-view-cell.grid-hidden {
        display: block;
    }
    
    .adidas-grid-gallery {
        margin-bottom: 1.5rem;
        position: relative;
    }
    
    .mobile-scroll-indicators {
        display: flex;
        justify-content: center;
        gap: 6px;
        margin-top: 12px;
    }
    
    .scroll-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        transition: all 0.3s ease;
    }
    
    .scroll-dot.active {
        background: #000;
        width: 24px;
        border-radius: 4px;
    }
}

.grid-view-cell.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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