/* ============================================
   GALLERY V3 - MODERN WOOCOMMERCE STYLE
   Clean, Minimal, Professional E-commerce Design
   ============================================ */

/* BREADCRUMB */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: #111827;
}

.breadcrumb-nav span:last-child {
    color: #111827;
    font-weight: 500;
}

/* MAIN LAYOUT */
.gallery-main {
    padding: 2rem 0 4rem;
    background: #ffffff;
}

.gallery-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 2rem;
}

/* SIDEBAR */
.gallery-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-widget {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.sidebar-widget__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* SIDEBAR CATEGORIES - MODERN GRID STYLE */
.sidebar-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.category-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    min-height: 70px;
}

.category-grid-item:hover {
    border-color: #111827;
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-grid-item.active {
    background: #111827;
    border-color: #111827;
}

.category-grid-item__name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #4b5563;
    line-height: 1.3;
    display: block;
}

.category-grid-item.active .category-grid-item__name {
    color: white;
}

.category-grid-item__badge {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    background: #10b981;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 700;
}

/* SIDEBAR CTA */
.sidebar-widget--cta {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
}

.sidebar-cta {
    text-align: center;
}

.sidebar-cta__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-cta h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.sidebar-cta p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.sidebar-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #059669;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* SIDEBAR INFO */
.sidebar-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-info li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0;
    color: #4b5563;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-info li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-info svg {
    color: #111827;
    flex-shrink: 0;
}

/* GALLERY CONTENT */
.gallery-content {
    min-width: 0;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-header__left h1 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #111827;
}

.gallery-header__left p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.gallery-sort {
    padding: 0.625rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #4b5563;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-sort:hover {
    border-color: #d1d5db;
}

.gallery-sort:focus {
    outline: none;
    border-color: #111827;
}

/* PRODUCTS GRID - WOOCOMMERCE STYLE */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

/* PRODUCT CARD - MINIMAL & CLEAN */
.product-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 1 !important;
    visibility: visible !important;
}

.product-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9fafb;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__content {
    display: none;
}

/* Desktop için product-info göster */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.product-info__title {
    font-size: 0.875rem;
    margin: 0;
    font-weight: 700;
    color: #111827;
}

.product-info__whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: #10b981;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
}

.product-info__whatsapp:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* WhatsApp buton text kontrolü */
.whatsapp-text-mobile {
    display: none;
}

.whatsapp-text-desktop {
    display: inline;
}

/* LIGHTBOX - SIMPLE & MODERN */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__prev {
    left: 1.5rem;
}

.lightbox__next {
    right: 1.5rem;
}

.lightbox__prev:hover,
.lightbox__next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox__info {
    text-align: center;
    color: white;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sidebar-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-layout {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .gallery-sidebar {
        position: static;
        display: contents; /* Sidebar'ı kaldır, children'ı direkt layout'a ekle */
    }
    
    /* Kategoriler en üstte */
    .sidebar-widget:first-child {
        order: 1;
    }
    
    /* Gallery content ortada */
    .gallery-content {
        order: 2;
    }
    
    /* WhatsApp CTA en altta */
    .sidebar-widget--cta {
        order: 3;
    }
    
    /* Bilgilendirme en altta */
    .sidebar-widget:last-child {
        order: 4;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sidebar-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-main {
        padding: 1.5rem 0 3rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .sidebar-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobil için özel ürün düzeni - çerçeve dışı bilgiler */
    .product-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-card {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        transition: all 0.2s ease;
    }
    
    .product-card:hover {
        border-color: #d1d5db;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    
    .product-card__image {
        aspect-ratio: 1;
        cursor: pointer;
    }
    
    .product-card__content {
        display: none !important;
    }
    
    /* Çerçeve dışı bilgiler - mobilde göster */
    .product-info {
        display: flex !important;
        flex-direction: column;
        gap: 0.375rem;
        align-items: center;
    }
    
    .product-info__title {
        font-size: 0.875rem;
        margin: 0;
        font-weight: 700;
        color: #111827;
    }
    
    .product-info__whatsapp {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.625rem 1.25rem;
        background: #10b981;
        color: white;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.8125rem;
        border-radius: 6px;
        transition: all 0.2s ease;
        width: 100%;
    }
    
    .product-info__whatsapp:hover {
        background: #059669;
        transform: translateY(-1px);
    }
    
    .product-info__whatsapp svg {
        width: 16px;
        height: 16px;
    }
    
    /* Mobilde "WhatsApp" göster */
    .whatsapp-text-desktop {
        display: none;
    }
    
    .whatsapp-text-mobile {
        display: inline;
    }
}

@media (max-width: 576px) {
    .breadcrumb-section {
        padding: 0.75rem 0;
    }
    
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-sort {
        width: 100%;
    }
    
    .sidebar-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lightbox__prev {
        left: 0.75rem;
    }
    
    .lightbox__next {
        right: 0.75rem;
    }
    
    .lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
    }
}
