/* ==========================================================================
   Amir Trading Corporation - Gallery Showcase & Lightbox CSS Layer
   Design System: Luxury B2B Editorial, Uncropped Media & Ambient Lightbox
   ========================================================================== */

/* 1. Gallery Hero Section */
.gallery-hero-section {
    position: relative;
    padding: 9rem 0 3.5rem;
    background-color: var(--bg-primary);
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.gallery-hero-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.gallery-editorial-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.gallery-editorial-tag::before,
.gallery-editorial-tag::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background-color: var(--accent-gold);
}

.gallery-main-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.gallery-main-title span {
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
    color: var(--accent-gold);
}

.gallery-hero-desc {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

/* 2. Showcase Grid Layout */
.gallery-grid-section {
    padding: 4rem 0 7rem;
    background-color: var(--bg-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 868px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 540px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 3. Showcase Card Item */
.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 3 / 4.2;
    background-color: #121212;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.gallery-card-img-wrap {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.08);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.75) 75%,
        rgba(0, 0, 0, 0.94) 100%
    );
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 35%,
        rgba(0, 0, 0, 0.85) 70%,
        rgba(0, 0, 0, 0.96) 100%
    );
}

/* Card Header & Badges */
.gallery-card-header {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}

.gallery-tag-pill {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background-color: rgba(26, 25, 25, 0.65);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-expand-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.9);
    color: #1a1919;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-expand-icon {
    opacity: 1;
    transform: scale(1);
}

/* Card Body Overlay */
.gallery-card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    color: #ffffff;
}

.gallery-brand-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.gallery-brand-logo-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    color: #1a1919;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.05em;
}

.gallery-brand-logo-img {
    height: 24px;
    max-width: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}

.gallery-brand-name {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
}

.gallery-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.gallery-card-intro {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 4. Load More Button Section */
.gallery-load-more-wrap {
    margin-top: 4rem;
    text-align: center;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1.1rem 2.8rem;
    border-radius: 50px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition-quick);
}

.btn-load-more:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background-color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(212, 175, 55, 0.2);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border-light);
    color: var(--text-muted);
    background-color: var(--bg-card-gray);
    transform: none;
    box-shadow: none;
}

.btn-load-more i {
    font-size: 0.85rem;
    transition: transform 0.4s ease;
}

.btn-load-more:hover i {
    transform: rotate(90deg);
}

/* 5. Lightbox Modal Overlay (Uncropped Media Fitting & Ambient Background) */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 1rem;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.lightbox-container {
    position: relative;
    z-index: 2;
    width: 92%;
    max-width: 1100px;
    height: 82vh;
    max-height: 680px;
    background-color: var(--bg-surface);
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.lightbox-modal.active .lightbox-container {
    transform: scale(1) translateY(0);
}

/* Lightbox Media Container - Uncropped Display with Soft Ambient Glow */
.lightbox-media-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #0d0c0b;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.lightbox-media-blur-bg {
    position: absolute;
    inset: -30px;
    width: calc(100% + 60px);
    height: calc(100% + 60px);
    object-fit: cover;
    filter: blur(35px) brightness(0.35);
    opacity: 0.65;
    z-index: 1;
    pointer-events: none;
}

.lightbox-media-img,
video.lightbox-media-img {
    position: relative;
    z-index: 2;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Lightbox Info Panel */
.lightbox-info-wrap {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-surface);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) rgba(0, 0, 0, 0.05);
}

.lightbox-info-wrap::-webkit-scrollbar {
    width: 5px;
}

.lightbox-info-wrap::-webkit-scrollbar-thumb {
    background-color: var(--accent-gold);
    border-radius: 4px;
}

.lightbox-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.lightbox-category-badge {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-gold);
    background-color: rgba(212, 175, 55, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.lightbox-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background-color: var(--bg-card-gray);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-quick);
}

.lightbox-close-btn:hover {
    background-color: var(--text-primary);
    color: #ffffff;
    transform: rotate(90deg);
}

.lightbox-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.lightbox-company-stamp {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem;
    background-color: var(--bg-card-gray);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-gold);
}

.lightbox-stamp-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    color: #1a1919;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-stamp-logo-img {
    height: 32px;
    max-width: 90px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.lightbox-stamp-text h5 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.lightbox-stamp-text p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.lightbox-intro-box {
    margin-bottom: 1.75rem;
}

.lightbox-intro-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: block;
}

.lightbox-intro-text {
    font-family: var(--font-editorial);
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
}

.lightbox-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border-light);
}

.lightbox-spec-item {
    background-color: var(--bg-primary);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.lightbox-spec-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    display: block;
}

.lightbox-spec-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Lightbox Navigation Row */
.lightbox-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.lightbox-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition-quick);
}

.lightbox-nav-btn:hover {
    color: var(--accent-gold);
}

.lightbox-nav-btn i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-card-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition-quick);
}

.lightbox-nav-btn:hover i {
    background-color: var(--accent-gold);
    color: #1a1919;
}

.lightbox-counter-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Mobile Lightbox Responsive */
@media (max-width: 900px) {
    .lightbox-modal {
        padding: 0.75rem;
    }

    .lightbox-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 500px;
        height: auto;
        max-height: 88vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-gold) rgba(0, 0, 0, 0.1);
        border-radius: 16px;
    }

    .lightbox-container::-webkit-scrollbar {
        width: 5px;
    }

    .lightbox-container::-webkit-scrollbar-thumb {
        background-color: var(--accent-gold);
        border-radius: 4px;
    }

    .lightbox-media-wrap {
        width: 100%;
        height: 280px;
        min-height: 280px;
        flex-shrink: 0;
        padding: 1rem;
    }

    .lightbox-info-wrap {
        padding: 1.5rem 1.25rem;
        overflow-y: visible;
        flex: 1;
    }

    .lightbox-title {
        font-size: 1.4rem;
    }

    .lightbox-intro-text {
        font-size: 1.05rem;
    }
}
