/* Shop Layout */
.shop-page {
    padding: var(--spacing-lg) 0;
}

.shop-layout {
    display: grid;
    grid-template-columns: 20% 78%;
    gap: 2%;
}

/* Sidebar */
.shop-sidebar {
    background: transparent;
    padding: 1.5rem 2rem 1.5rem 0;
    border-radius: 0;
    width: 100%;
    position: relative;
}

/* Sidebar divider */
.shop-sidebar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background: var(--border-color);
}

/* Shop Content */
.shop-content {
    min-width: 0;
    width: 100%;
    padding-left: 2rem;
}

/* Ürün Grid */
.shop-content .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop için 3 sütun */
    gap: 2rem;
}

/* Widget genel boşluk */
.widget {
    margin-bottom: 2.5rem;
}

/* Tüm Widget Başlıkları için Ortak Stil */
.widget .widget-title {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-accent) !important;
}

/* Tüm Widget Başlıklarının Önündeki İkon */
.widget .widget-title::before {
    content: '';
    width: 12px;
    height: 12px;
    background-color: var(--primary-accent) !important;
    border-radius: 2px;
}

/* Özel Widget Başlıkları için Ek Stiller */
.widget_product_categories .widget-title,
.widget_product_colors .widget-title,
.widget_product_sizes .widget-title {
    /* color: var(--text-color); Bu satırı kaldır */
}

/* Kategori Listesi */
.widget_product_categories .product-categories {
    list-style: none;
    padding: 0 0 0 17px;
    margin: 0;
}

/* Kategori Link */
.widget_product_categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;

    color: var(--text-color);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 4px;
}

/* Normal Hover */
.widget_product_categories li:not(.current-cat) a:hover {
    border-color: #202020;
}

/* Aktif Durum */
body .widget_product_categories .product-categories .current-cat > a {
    border: 1px solid #202020;
    border-radius: 4px;
    background: #202020;
    color: #fff !important;
}

/* Aktif kategorideki sayı göstergesi için */
body .widget_product_categories .product-categories .current-cat > a .count {
    background: #fff;
    color: #202020;
}

/* Normal durumdaki sayı göstergesi */
.widget_product_categories .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    background: #202020;
    color: #fff;
    font-size: 0.75rem;
    border-radius: 2px;
}

/* Aktif kategorideki sayı göstergesini üzerine yaz */
body .widget_product_categories .product-categories .current-cat > a .count {
    background: #fff !important;
    color: #202020 !important;
}

/* Ürün Sayısı */
.widget_product_categories .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    background: #202020;
    color: #fff;
    font-size: 0.75rem;
    border-radius: 2px;
}

/* Alt Kategoriler */
.widget_product_categories .children {
    list-style: none;
    padding-left: 12px;
    margin-top: 4px;
}

/* Renk Widget Stili */
.widget_product_colors {
    margin-bottom: var(--spacing-md);
}

/* Renk Filtreleri Grid */
.widget_product_colors .color-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 0 0 17px;
}

/* Renk Filtre Öğesi */
.widget_product_colors .color-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Checkbox gizle */
.widget_product_colors input[type="checkbox"] {
    display: none;
}

/* Renk alanı */
.widget_product_colors .color-box {
    width: 100%;
    position: relative;
}

/* 16:7 oranı için aspect-ratio */
.widget_product_colors .color-box::before {
    content: '';
    display: block;
    padding-top: calc(4 / 16 * 100%);
}

/* Renk alanının kendisi */
.widget_product_colors .color-box span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* Renk ismi */
.widget_product_colors .color-name {
    font-size: var(--text-xs);
    color: var(--primary-accent) !important;
    font-family: var(--primary-font);
}

/* Seçili durum */
.widget_product_colors input[type="checkbox"]:checked + .color-filter {
    border: 1px solid #202020;
    background-color: #202020;
}

.widget_product_colors input[type="checkbox"]:checked + .color-filter .color-name {
    color: #fff;
}

/* Responsive için */
@media screen and (max-width: 1200px) {
    .widget_product_colors .color-filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Beden Widget Stili */
.widget_product_sizes {
    margin-bottom: var(--spacing-md);
}

/* Beden Filtreleri Grid */
.widget_product_sizes .size-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 0 0 0 17px;
}

/* Beden Filtre Öğesi */
.widget_product_sizes .size-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Checkbox gizle */
.widget_product_sizes input[type="checkbox"] {
    display: none;
}

/* Beden metni */
.widget_product_sizes .size-filter span {
    font-size: var(--text-xs);
    color: var(--primary-accent) !important;
    font-family: var(--primary-font);
}

/* Seçili durum */
.widget_product_sizes input[type="checkbox"]:checked + .size-filter {
    border: 1px solid #202020;
    background-color: #202020;
}

.widget_product_sizes input[type="checkbox"]:checked + .size-filter span {
    color: #fff;
}

/* Responsive için */
@media screen and (max-width: 1200px) {
    .widget_product_sizes .size-filters {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .widget_product_sizes .size-filters {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hover efektleri */
.widget_product_colors .color-filter:hover {
    border-color: #202020;
}

.widget_product_sizes .size-filter:hover {
    border-color: #202020;
}


/* Loading durumu */
.products-grid.loading {
    position: relative;
    min-height: 200px;
    opacity: 0.5;
    pointer-events: none;
}

.products-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #202020;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 1204px) {
    .shop-layout {
        grid-template-columns: 25% 73%;
        gap: 2%;
    }

    .shop-content .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .shop-sidebar {
        display: none;
    }

    .shop-content {
        padding-left: 0;
    }

    .shop-content .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Fiyat Widget */
.widget_product_price {
    margin-bottom: 2.5rem;
}

/* Fiyat Filtresi */
.price-filter {
    padding: 0 0 0 17px;
}

/* Fiyat Input Alanları */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.price-input {
    position: relative;
    flex: 1;
}

.price-input .currency {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.85rem;
}

.price-input input {
    width: 100%;
    padding: 8px 8px 8px 24px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    background: #ffffff00;
    color: var(--primary-accent) !important;
}

.price-inputs .separator {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Slider */
.price-slider {
    position: relative;
    height: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border: none;
    background: none;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
}

.slider-range {
    position: absolute;
    height: 2px;
    background: var(--primary-accent) !important;
    top: 50%;
    transform: translateY(-50%);
    border: none;
}

/* Range input stilleri */
.price-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 16px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none !important;
}

/* Range input focus durumunda outline'ı kaldır */
.price-slider input[type="range"]:focus {
    outline: none;
    border: none;
    box-shadow: none !important;
}

/* Kaydırıcı noktaları */
.price-slider input[type="range"]::-webkit-slider-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--primary-accent) !important;
    border: none;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--primary-accent) !important;
    border: none;
    pointer-events: auto;
    -moz-appearance: none;
    cursor: pointer;
}

/* Hover durumunda kaydırıcı noktaları */
.price-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

.price-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* Responsive Grid */
@media screen and (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .shop-content {
        width: 100%;
        padding-left: 0;
    }

    /* Tablet için 2 sütun */
    .shop-content .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media screen and (max-width: 576px) {
    /* Mobil için 1 sütun */
    .shop-content .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Kategori sayı göstergesi */
.widget_product_categories .count {
    background: var(--primary-accent) !important;
    color: #fff;
}

/* Seçili durumlar */
.widget_product_colors input[type="checkbox"]:checked + .color-filter,
.widget_product_sizes input[type="checkbox"]:checked + .size-filter,
body .widget_product_categories .product-categories .current-cat > a {
    border: 1px solid var(--primary-accent) !important;
    background-color: var(--primary-accent) !important;
}

/* Seçili durumdaki metin renkleri */
.widget_product_colors input[type="checkbox"]:checked + .color-filter .color-name,
.widget_product_sizes input[type="checkbox"]:checked + .size-filter span,
body .widget_product_categories .product-categories .current-cat > a {
    color: #ffffff !important;
}

/* Seçili durumdaki renk kutusu border'ı */
.widget_product_colors input[type="checkbox"]:checked + .color-filter .color-box {
    border-color: #ffffff;
}

/* Hover efektleri */
.widget_product_colors .color-filter:hover,
.widget_product_sizes .size-filter:hover,
.widget_product_categories li:not(.current-cat) a:hover {
    border-color: var(--primary-accent) !important;
}

/* Renk filtresi için özel stil */
.widget_product_colors .color-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Beden filtresi için özel stil */
.widget_product_sizes .size-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Seçili durumda renk ve beden filtrelerinin içindeki tüm metin renkleri */
.widget_product_colors input[type="checkbox"]:checked + .color-filter *,
.widget_product_sizes input[type="checkbox"]:checked + .size-filter * {
    color: #ffffff !important;
}

/* Seçili durumda renk filtresi içindeki renk ismi */
.widget_product_colors input[type="checkbox"]:checked + .color-filter .color-name {
    color: #ffffff !important;
}

/* Seçili durumda beden filtresi içindeki metin */
.widget_product_sizes input[type="checkbox"]:checked + .size-filter span {
    color: #ffffff !important;
}

/* Sidebar Close Button - Tamamen gizle */
button.sidebar-close,
.sidebar-close {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Sadece mobilde göster */
@media screen and (max-width: 768px) {
    /* Sidebar içeriğini aşağı kaydır */
    .shop-sidebar {
        padding-top: 60px !important; /* Close icon için alan bırak */
    }

    .shop-sidebar.active .sidebar-close {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        align-items: center;
        justify-content: center;
        width: 40px; /* Sabit genişlik */
        height: 40px; /* Sabit yükseklik */
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--primary-accent);
        z-index: 100;
    }

    /* Close ikonunun kendisi için sabit boyut */
    .shop-sidebar.active .sidebar-close svg {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0; /* Boyutun küçülmesini engelle */
    }
}

/* Kategori Filtresi Stilleri */
.widget_product_categories .category-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 18px;
}

.widget_product_categories label {
    cursor: pointer;
    margin: 0;
    width: 100%;
    transition: padding-left 0.3s ease;
}

.widget_product_categories .category-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    height: 40px;
    background: transparent;
}

.widget_product_categories input[type="checkbox"] {
    display: none;
}

.widget_product_categories input[type="checkbox"]:checked + .category-filter {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: #fff;
}

.widget_product_categories .category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-accent);
}

.widget_product_categories .category-count {
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Alt kategori stilleri */
.widget_product_categories label {
    position: relative;
}

.widget_product_categories label:not([style*="padding-left: 0"]):before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 15px;
    height: 1px;
    background: var(--border-color);
    border-top: 1px dashed var(--border-color);
    background: none;
}

.widget_product_categories label:not([style*="padding-left: 0"]):after {
    content: '';
    position: absolute;
    left: 0;
    top: -4px;
    width: 1px;
    height: calc(100% + 8px);
    background: none;
    border-left: 1px dashed var(--border-color);
}

.widget_product_categories label:last-child:after {
    height: calc(50% + 4px);
}

/* Seçili durumdaki kategori sayısı */
.widget_product_categories input[type="checkbox"]:checked + .category-filter .category-count {
    background: #fff;
    color: var(--primary-accent);
}

/* Seçili durumdaki kategori ismi */
.widget_product_categories input[type="checkbox"]:checked + .category-filter .category-name {
    color: #fff;
}

/* Hover efektleri */
.widget_product_categories .category-filter:hover {
    border-color: var(--primary-accent);
}

/* Mobil için düzenleme */
@media (max-width: 768px) {
    .widget_product_categories .category-filters {
        padding-left: 12px;
    }
    
    .widget_product_categories label:not([style*="padding-left: 0"]):before {
        width: 10px;
    }
}

/* Ürün grid düzeni */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop için 3 sütun */
    gap: 2rem;
    margin: 2rem 0;
}

/* Tablet için 2 sütun */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobil için 1 sütun */
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Ürün kartı stilleri */
.products-grid .product-card {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.products-grid .product-card .product-image {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
}

.products-grid .product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.products-grid .product-card .product-content {
    padding: 0 1rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.products-grid .product-card .product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
}

.products-grid .product-card .info-left {
    flex: 1;
}

.products-grid .product-card .info-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.products-grid .product-card .product-title {
    margin: 0 0 0.15rem 0;
    font-size: 1rem;
    line-height: 1.4;
}

.products-grid .product-card .product-badges {
    margin-top: 0.15rem;
}

.products-grid .product-card .product-price {
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

/* Rating badge */
.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    background: #FFF8E8;
    color: #FFB800;
}

/* Breadcrumb Styles */
.product-breadcrumb {
    width: 95%;
    max-width: var(--max-width);
    margin: -42px auto 30px auto;
    background-color: var(--header-button-color);
    padding: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.product-breadcrumb .container {
    width: 100%;
    padding: 0;
}

.breadcrumb-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px;
}

.woocommerce-breadcrumb {
    color: var(--primary-accent);
    font-size: 14px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0;
    line-height: 1;
    flex: 1;
}

.woocommerce-breadcrumb a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.woocommerce-breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb-separator {
    color: var(--primary-accent);
    opacity: 0.5;
    font-size: 12px;
    line-height: 1;
}

/* Mobil için breadcrumb düzenlemesi */
@media (max-width: 768px) {
    .product-breadcrumb {
        width: 95%;
    }

    .breadcrumb-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 8px;
    }

    .woocommerce-breadcrumb {
        font-size: 13px !important;
        flex-wrap: wrap;
    }

    .product-sorting {
        margin-left: auto;
        width: auto;
    }

    .product-sorting select {
        min-width: 140px;
        font-size: 12px;
        padding: 4px 24px 4px 8px;
    }

    .breadcrumb-separator {
        margin: 0 2px;
    }
}

@media (max-width: 480px) {
    .product-sorting select {
        min-width: 120px;
    }

    .woocommerce-breadcrumb {
        font-size: 11px !important;
    }
}

/* Product Sorting Styles */
.product-sorting {
    position: relative;
    margin-left: 15px;
}

.product-sorting select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: 1px solid var(--primary-accent);
    border-radius: 4px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    color: var(--primary-accent);
    cursor: pointer;
    min-width: 200px;
    outline: none;
}

.product-sorting::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--primary-accent);
    pointer-events: none;
}

.product-sorting select:hover {
    border-color: var(--primary-accent);
    opacity: 0.8;
}

/* Alt kategoriler için daha düşük yükseklik */
.widget_product_categories label[style*="padding-left: 20"] .category-filter,
.widget_product_categories label[style*="padding-left: 40"] .category-filter,
.widget_product_categories label[style*="padding-left: 60"] .category-filter {
    height: 32px;
    padding: 6px 10px;
    border-style: dashed;
}

.widget_product_categories label[style*="padding-left: 20"] .category-name,
.widget_product_categories label[style*="padding-left: 40"] .category-name,
.widget_product_categories label[style*="padding-left: 60"] .category-name {
    font-size: 13px;
}

.widget_product_categories label[style*="padding-left: 20"] .category-count,
.widget_product_categories label[style*="padding-left: 40"] .category-count,
.widget_product_categories label[style*="padding-left: 60"] .category-count {
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    padding: 2px 5px;
}


