/* QC Gallery Style */
.qc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Başlık stili */
.qc-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

/* Ana galeri konteyner */
.qc-gallery {
    margin-bottom: 40px;
}

/* Ana resim alanı */
.qc-main-image-container {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.qc-gallery-main-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Slider konteyner */
.qc-gallery-slider-container {
    position: relative;
    margin: 0 auto;
    max-width: 90%;
}

/* Slider */
.qc-gallery-slider {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 40px;
    overflow: hidden;
}

/* Slide */
.qc-gallery-slider .slide {
    flex: 0 0 auto;
    width: calc(20% - 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.qc-gallery-slider .slide img {
    width: 100%;
    height: auto;
    display: block;
}

.qc-gallery-slider .slide.active {
    border-color: #0073aa;
}

/* Navigasyon okları */
.qc-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.qc-gallery-nav:hover {
    background: #f7f7f7;
}

.qc-gallery-prev {
    left: 0;
}

.qc-gallery-next {
    right: 0;
}

.qc-gallery-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qc-gallery-nav:before {
    content: '';
    border: solid #555;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
}

.qc-gallery-prev:before {
    transform: rotate(135deg);
    margin-left: 5px;
}

.qc-gallery-next:before {
    transform: rotate(-45deg);
    margin-right: 5px;
}

/* İçerik alanı */
.qc-content {
    margin-top: 40px;
    line-height: 1.6;
}

/* Recent QC Shortcode Styles */
.qc-section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.qc-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.qc-recent-item {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.qc-recent-item:hover {
    transform: translateY(-5px);
}

.qc-recent-image {
    height: 180px;
    overflow: hidden;
}

.qc-recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qc-recent-item:hover .qc-recent-image img {
    transform: scale(1.05);
}

.qc-recent-details {
    padding: 15px;
}

.qc-recent-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.qc-recent-date {
    font-size: 14px;
    color: #666;
}

.qc-view-all {
    text-align: center;
    margin-top: 20px;
}

.qc-view-all a {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.qc-view-all a:hover {
    background: #005d8c;
}

/* Arşiv sayfası */
.qc-archive-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.qc-archive-item {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.qc-archive-item:hover {
    transform: translateY(-5px);
}

.qc-archive-image {
    height: 180px;
    overflow: hidden;
}

.qc-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qc-archive-item:hover .qc-archive-image img {
    transform: scale(1.05);
}

.qc-archive-details {
    padding: 15px;
}

.qc-archive-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.qc-archive-date {
    font-size: 14px;
    color: #666;
}

.qc-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 4px;
}

/* Pagination styles */
.qc-pagination {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.qc-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #555;
    background: #fff;
}

.qc-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.qc-pagination .page-numbers:hover:not(.current) {
    background: #f7f7f7;
}
/* PRODUCT STYLE - WOOCOMMERCE UYUMLU GÖRÜNÜM */
.qc-product-style {
    padding: 0 !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    float: none !important;
    width: 100% !important;
    clear: both !important;
}

.qc-product-style .qc-section-title {
    text-align: center !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    color: #333 !important;
}

.qc-product-style .qc-products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
}

.qc-product-style .qc-product-item {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid #f5f5f5 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    padding: 5px !important;
    text-align: center !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
    min-height: 400px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    position: relative !important;
}

.qc-product-style .qc-product-item:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.qc-product-style .qc-product-link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
    justify-content: space-between !important;
}

.qc-product-style .qc-product-image {
    width: 100% !important;
    height: 360px !important;
    overflow: hidden !important;
    margin-bottom: 5px !important;
}

.qc-product-style .qc-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    max-width: none !important;
}

.qc-product-style .qc-product-title {
    font-size: 17px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin: 10px 0 !important;
    line-height: 1.4 !important;
    height: 2.8em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #333 !important;
    width: 100% !important;
    padding: 0 5px !important;
}

.qc-product-style .qc-product-date {
    margin-top: auto !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #333 !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 0 !important;
}

.qc-product-style .qc-view-all {
    text-align: center !important;
    margin-top: 20px !important;
    width: 100% !important;
    clear: both !important;
    float: none !important;
}

.qc-product-style .qc-view-all a {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: #0073aa !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: background 0.3s ease !important;
}

.qc-product-style .qc-view-all a:hover {
    background: #005d8c !important;
}

/* Custom Category Display */
.custom-category-display {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

/* ANA SHORTCODE GRID STILLERI - TEMİZ VE SPESIFIK */
.custom-category-display ul.products,
.custom-category-display ul.qc-custom-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

.custom-category-display ul.qc-only-4 li.product:nth-child(n+5) {
    display: none !important;
}

.custom-category-display ul.products li.product,
.custom-category-display ul.qc-custom-grid li.product {
    min-height: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #f5f5f5 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
}

.custom-category-display ul.products li.product:hover,
.custom-category-display ul.qc-custom-grid li.product:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.custom-category-display ul.products li.product img,
.custom-category-display ul.qc-custom-grid li.product img {
    height: 360px !important;
    object-fit: cover !important;
    width: 100% !important;
}

.custom-category-display ul.products li.product h2,
.custom-category-display ul.qc-custom-grid li.product h2 {
    padding: 10px 5px !important;
    font-size: 17px !important;
    text-align: center !important;
    margin: 10px 0 !important;
}

/* RESPONSIVE DÜZENLEMELER - TABLET VE DESKTOP */
@media screen and (max-width: 1200px) {
    .qc-archive-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .qc-product-style .qc-products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* TABLET IÇIN - 992px ve altı */
@media screen and (max-width: 992px) {
    .qc-archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .qc-recent-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .qc-product-style .qc-products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Shortcode grid - Tablet 3 sütun */
    .custom-category-display ul.products,
    .custom-category-display ul.qc-custom-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .custom-category-display ul.products li.product,
    .custom-category-display ul.qc-custom-grid li.product {
        min-height: 350px !important;
    }
    
    .custom-category-display ul.products li.product img,
    .custom-category-display ul.qc-custom-grid li.product img {
        height: 260px !important;
    }
}

/* MOBİL İÇİN - 768px ve altı - EN ÖNEMLİ KISIM */
@media screen and (max-width: 768px) {
    .qc-gallery-slider .slide {
        width: calc(33.333% - 10px);
    }
    
    .qc-title, 
    .qc-section-title {
        font-size: 24px;
    }
    
    .qc-archive-grid, 
    .qc-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qc-archive-title, 
    .qc-recent-title {
        font-size: 15px;
    }
    
    .qc-product-style .qc-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .qc-product-style .qc-product-title {
        font-size: 15px !important;
    }
    
    .qc-product-style .qc-product-item {
        min-height: 320px !important;
    }
    
    .qc-product-style .qc-product-image {
        height: 200px !important;
    }
    
    /* MOBİL SHORTCODE GRID - 2 SÜTUN ZORLA */
    .custom-category-display ul.products,
    .custom-category-display ul.qc-custom-grid,
    body .custom-category-display ul.products,
    body .custom-category-display ul.qc-custom-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }
    
    .custom-category-display ul.products li.product,
    .custom-category-display ul.qc-custom-grid li.product {
        min-height: 320px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .custom-category-display ul.products li.product img,
    .custom-category-display ul.qc-custom-grid li.product img {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .custom-category-display ul.products li.product h2,
    .custom-category-display ul.qc-custom-grid li.product h2 {
        font-size: 15px !important;
        padding: 8px 5px !important;
    }
}

/* KÜÇÜK MOBİL İÇİN - 480px ve altı */
@media screen and (max-width: 480px) {
    .qc-gallery-slider .slide {
        width: calc(50% - 10px);
    }
    
    .qc-title,
    .qc-section-title {
        font-size: 20px;
    }
    
    .qc-archive-grid,
    .qc-recent-grid {
        grid-template-columns: 1fr;
    }
    
    .qc-archive-image,
    .qc-recent-image {
        height: 160px;
    }
    
    .qc-product-style .qc-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .qc-product-style .qc-product-item {
        min-height: 280px !important;
    }
    
    .qc-product-style .qc-product-image {
        height: 160px !important;
    }
    
    /* KÜÇÜK MOBİL SHORTCODE GRID - 2 SÜTUN DEVAM */
    .custom-category-display ul.products,
    .custom-category-display ul.qc-custom-grid,
    body .custom-category-display ul.products,
    body .custom-category-display ul.qc-custom-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .custom-category-display ul.products li.product,
    .custom-category-display ul.qc-custom-grid li.product {
        min-height: 280px !important;
    }
    
    .custom-category-display ul.products li.product img,
    .custom-category-display ul.qc-custom-grid li.product img {
        height: 180px !important;
    }
    
    .custom-category-display ul.products li.product h2,
    .custom-category-display ul.qc-custom-grid li.product h2 {
        font-size: 14px !important;
        padding: 6px 3px !important;
    }
}
/* ÇOK KÜÇÜK MOBİL İÇİN - 360px ve altı */
@media screen and (max-width: 360px) {
    .custom-category-display ul.products,
    .custom-category-display ul.qc-custom-grid,
    body .custom-category-display ul.products,
    body .custom-category-display ul.qc-custom-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    .custom-category-display ul.products li.product,
    .custom-category-display ul.qc-custom-grid li.product {
        min-height: 260px !important;
    }
    
    .custom-category-display ul.products li.product img,
    .custom-category-display ul.qc-custom-grid li.product img {
        height: 160px !important;
    }
    
    .custom-category-display ul.products li.product h2,
    .custom-category-display ul.qc-custom-grid li.product h2 {
        font-size: 13px !important;
        padding: 5px 2px !important;
    }
}

/* GALLERY SLIDER MOBİL DÜZENLEMELER */
@media screen and (max-width: 480px) {
    .qc-gallery {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px !important;
        align-items: flex-start !important;
        padding: 10px !important;
    }
    
    .qc-main-image-container {
        flex: 1 !important;
        order: 2 !important;
    }
    
    .qc-gallery-main-image {
        width: 100% !important;
        height: auto !important;
    }
    
    .qc-gallery-slider-container {
        width: 80px !important;
        order: 1 !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .qc-gallery-slider {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        margin: 50px 0 !important;
        padding: 0 !important;
        max-height: 320px !important;
        overflow: hidden !important;
        justify-content: flex-start !important;
    }
    
    .qc-gallery-slider .slide {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        border-radius: 4px !important;
    }
    
    .qc-gallery-nav {
        display: none !important;
    }
    
    .qc-gallery-nav-mobile {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: transparent !important;
        color: #333 !important;
        border: 2px solid #333 !important;
        width: 26px !important;
        height: 26px !important;
        border-radius: 4px !important;
        cursor: pointer !important;
        z-index: 10 !important;
        font-size: 14px !important;
        font-weight: bold !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .qc-gallery-nav-mobile:hover {
        background: #333 !important;
        color: white !important;
    }
    
    .qc-gallery-prev-mobile {
        top: 15px !important;
    }
    
    .qc-gallery-prev-mobile::after {
        content: '^' !important;
    }
    
    .qc-gallery-next-mobile {
        bottom: 15px !important;
    }
    
    .qc-gallery-next-mobile::after {
        content: 'v' !important;
    }
}

/* Büyük mobil ekranlar için gallery düzenlemesi */
@media screen and (min-width: 390px) and (max-width: 480px) {
    .qc-gallery-slider-container {
        width: 85px !important;
    }
    
    .qc-gallery-slider .slide {
        width: 75px !important;
        height: 75px !important;
        min-width: 75px !important;
        max-width: 75px !important;
    }
}

/* Ana resim margin ayarları farklı mobil boyutlar için */
@media screen and (max-width: 375px) {
    .qc-gallery-main-image {
        margin-top: 78px !important;
    }
}

@media screen and (min-width: 376px) and (max-width: 390px) {
    .qc-gallery-main-image {
        margin-top: 80px !important;
    }
}

@media screen and (min-width: 391px) and (max-width: 414px) {
    .qc-gallery-main-image {
        margin-top: 64px !important;
    }
}

@media screen and (min-width: 415px) and (max-width: 430px) {
    .qc-gallery-main-image {
        margin-top: 55px !important;
    }
}

/* SON ÇARE - İNLİNE STYLE OVERRIDE */
@media screen and (max-width: 768px) {
    .qc-custom-grid[style] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    [class*="qc-custom-grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* FLEX FALLBACK - Eğer grid çalışmıyorsa */
@media screen and (max-width: 768px) {
    .custom-category-display ul.products:not([style*="grid"]),
    .custom-category-display ul.qc-custom-grid:not([style*="grid"]) {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }
    
    .custom-category-display ul.products:not([style*="grid"]) li,
    .custom-category-display ul.qc-custom-grid:not([style*="grid"]) li {
        width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
    }
}