/* ================================================================
   GALLERY.CSS
   Surgicrafts Gallery Page - Surgical, Veterinary, Dental & Beauty
   Color scheme matches index.css: red (#c8102e), black (#0d0d0d)
================================================================ */

:root {
    --red: #c8102e;
    --red-dark: #9b0d23;
    --red-light: rgba(200, 16, 46, 0.1);
    --black: #0d0d0d;
    --white: #ffffff;
    --dark: #161616;
    --gray: #3a3a3a;
    --gray-light: #6c757d;
    --light: #f5f5f5;
    --mid: #777;
    --border: #e9ecef;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ================================================================
   GALLERY HERO SECTION
================================================================ */
.gallery-hero {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    overflow: hidden;
}

.gallery-hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1581595220892-b0739db3ba8c?w=800&q=80') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.gallery-hero-content .label {
    color: var(--red);
    margin-bottom: 16px;
}

.gallery-hero-content .heading {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 16px;
}

.gallery-hero-content .divider {
    margin-bottom: 20px;
}

.gallery-hero-content .sub {
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    font-size: 1rem;
}

/* ================================================================
   MAIN GALLERY SECTION
================================================================ */
.gallery-main-section {
    background: var(--light);
    padding: 60px 0;
}

/* Filter Tabs */
.gallery-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.filter-btn span {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item-inner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item-inner:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item-inner:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item-inner:hover .gallery-item-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item-inner:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    color: var(--white);
    font-family: "Oswald", sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.view-btn {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--red-dark);
    transform: scale(1.05);
}

/* No Results */
.gallery-no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 16px;
}

.gallery-no-results i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.gallery-no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--black);
}

.gallery-no-results p {
    color: var(--gray-light);
}

/* ================================================================
   FEATURED PRODUCTS SECTION
================================================================ */
.featured-products-gallery {
    background: var(--white);
    padding: 60px 0;
}

.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.featured-product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.featured-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-product-img {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.featured-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-product-card:hover .featured-product-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.featured-product-body {
    padding: 20px;
}

.product-cat {
    font-size: 0.7rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-name {
    font-family: "Oswald", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 6px;
}

.product-code {
    font-size: 0.75rem;
    color: var(--gray-light);
    margin-bottom: 16px;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.product-link:hover {
    gap: 12px;
    color: var(--red-dark);
}

/* ================================================================
   STATS SECTION
================================================================ */
.gallery-stats {
    background: linear-gradient(135deg, var(--dark) 0%, var(--black) 100%);
    padding: 60px 0;
}

.gallery-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.gallery-stats .stat-item {
    padding: 20px;
}

.gallery-stats .stat-number {
    font-family: "Oswald", sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 8px;
}

.gallery-stats .stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

/* ================================================================
   LIGHTBOX MODAL
================================================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--white);
    font-size: 0.9rem;
    padding: 10px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--red);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 8px;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--red);
}

/* ================================================================
   RESPONSIVE DESIGN
================================================================ */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .featured-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .lightbox-prev {
        left: -40px;
    }
    
    .lightbox-next {
        right: -40px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 50px 0;
    }
    
    .gallery-hero-content {
        text-align: center;
        margin: 0 auto;
    }
    
    .gallery-hero-content .divider {
        margin-left: auto;
        margin-right: auto;
    }
    
    .gallery-filter-tabs {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 6px 16px;
        font-size: 0.7rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .gallery-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .featured-products-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 10px 15px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-main-section {
        padding: 40px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        padding: 5px 12px;
        font-size: 0.65rem;
    }
    
    .gallery-stats .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-stats .stat-number {
        font-size: 2rem;
    }
    
    .overlay-content h3 {
        font-size: 1rem;
    }
    
    .view-btn {
        padding: 6px 16px;
        font-size: 0.7rem;
    }
}