/**
 * Custom Category Templates — Özel Kategori Şablon Stilleri
 *
 * Yalnızca is_product_category() true olduğunda yüklenir.
 *
 * @package Electro
 * @subpackage CustomCategoryTemplates
 */

/* Kategori başlık alanı */
.cct-category-header {
    margin-bottom: 1.5em;
}

.cct-category-header .page-title {
    margin-bottom: 0.25em;
}

/* Alt başlık — turuncu kenarlıklı badge/tag */
.cct-subtitle {
    display: inline-block;
    font-size: 14px;
    color: #333;
    border: 1px solid #f89a1f;
    border-radius: 20px;
    padding: 6px 16px;
    margin: 10px 0 0 0;
    background: transparent;
    line-height: 1.4;
}

/* Alt başlık altındaki turuncu çizgi */
.cct-subtitle-separator {
    border-top: 2px solid #f89a1f;
    margin: 15px 0 20px 0;
}

/* Bölümler arası turuncu ayırıcı */
.cct-section-separator {
    border-top: 2px solid #f89a1f;
    margin: 2em 0;
}

/* ===== SEO İçerik Alanı ===== */
.cct-seo-content {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #ebebeb;
    line-height: 1.6;
}

/* Devamını Oku butonu — turuncu kenarlıklı badge */
.cct-read-more-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid #f89a1f;
    border-radius: 20px;
    color: #f89a1f;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 18px;
    margin-top: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cct-read-more-btn:hover {
    background-color: #f89a1f;
    color: #fff;
}

/* Sidebar olmadığında tam genişlik */
#primary.content-area.cct-full-width {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
}

/* ===== Özel Ürün Kartı ===== */

/* Grid düzeni — 5 sütun */
.cct-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

/* Ürün kartı */
.cct-product-card {
    list-style: none;
    padding: 15px;
    border: 1px solid #ebebeb;
    border-radius: 4px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.cct-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cct-product-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ürün başlığı — üstte, ortalı */
.cct-product-title {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 10px 0;
    min-height: 36px;
    text-align: center;
}

.cct-product-title a {
    color: #333;
    text-decoration: none;
}

.cct-product-title a:hover {
    color: #f89a1f;
}

/* Ürün görseli */
.cct-product-image {
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.cct-product-image img {
    max-width: 100%;
    height: auto;
}

/* Fiyat — ortalı */
.cct-product-price {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.cct-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 13px;
}

.cct-product-price ins {
    text-decoration: none;
}

/* Sepete Ekle butonu — ortalı */
.cct-product-action {
    text-align: center;
}

.cct-product-action .cct-btn-cart {
    display: inline-block;
    background-color: #f89a1f;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cct-product-action .cct-btn-cart:hover {
    background-color: #e55b00;
    color: #fff;
}

.cct-product-action .cct-btn-outofstock {
    background-color: #999;
}

.cct-product-action .cct-btn-outofstock:hover {
    background-color: #777;
}

/* "Sepetim" / "View Cart" linkini gizle */
.cct-product-card .added_to_cart {
    display: none !important;
}

/* Responsive */
@media (max-width: 1199px) {
    .cct-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .cct-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .cct-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 479px) {
    .cct-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== SSS (FAQ) Akordiyon ===== */
.cct-faq-section {
    margin: 3em 0 0;
    padding-top: 2em;
    border-top: 1px solid #ebebeb;
}

.cct-faq-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 0 0 20px;
}

.cct-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cct-faq-item {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cct-faq-item:hover {
    border-color: #d0d0d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.cct-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 22px;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-align: left;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.cct-faq-question:hover {
    color: #f89a1f;
}

.cct-faq-question[aria-expanded="true"] {
    color: #f89a1f;
}

.cct-faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #bbb;
    transition: transform 0.3s ease, color 0.2s ease;
}

.cct-faq-question:hover .cct-faq-icon {
    color: #f89a1f;
}

.cct-faq-question[aria-expanded="true"] .cct-faq-icon {
    transform: rotate(180deg);
    color: #f89a1f;
}

.cct-faq-answer {
    overflow: hidden;
}

.cct-faq-answer[hidden] {
    display: none;
}

.cct-faq-answer:not([hidden]) {
    padding: 0 22px 20px;
    margin-top: -4px;
}

.cct-faq-answer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: #666;
}

@media (max-width: 767px) {
    .cct-faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .cct-faq-answer:not([hidden]) {
        padding: 0 16px 16px;
    }
}

/* ===== Özel Sidebar ===== */
.cct-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
    padding-left: 30px;
}

.cct-sidebar-widget {
    border: 1px solid #ebebeb;
    border-radius: 4px;
    padding: 20px;
}

.cct-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f89a1f;
}

.cct-sidebar-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cct-sidebar-categories li {
    border-bottom: 1px solid #f5f5f5;
}

.cct-sidebar-categories li:last-child {
    border-bottom: none;
}

.cct-sidebar-categories a {
    display: block;
    padding: 8px 0;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cct-sidebar-categories a:hover {
    color: #f89a1f;
}

.cct-sidebar-current a {
    color: #f89a1f;
    font-weight: 600;
}

/* Sidebar varken primary genişliği */
#primary.content-area:not(.cct-full-width) {
    flex: 0 0 75%;
    max-width: 75%;
}

@media (max-width: 991px) {
    .site-content-inner.row {
        flex-wrap: wrap;
    }

    .cct-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        margin-top: 2em;
        order: 99;
    }

    #primary.content-area:not(.cct-full-width) {
        flex: 0 0 100%;
        max-width: 100%;
        order: 1;
    }
}
