/* Ürünler Sayfası Stilleri */
.products-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.products-container {
    display: flex;
    gap: 2rem;
}

/* Sol Taraf - Filtreler */
.filters-sidebar {
    flex: 0 0 280px;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.filters-sidebar h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #f5f5f5;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
}

.filter-option:hover input ~ .checkmark {
    background-color: #f5f5f5;
}

.filter-option input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-option input:checked ~ .checkmark:after {
    display: block;
}

.filter-option .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Fiyat Aralığı */
.price-range {
    padding: 0.5rem 0;
}

.price-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    outline: none;
    border-radius: 5px;
    margin-bottom: 0.8rem;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

/* Değerlendirme Filtreleri */
.rating-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.2s;
}

.rating-option:hover {
    background: #f5f5f5;
}

.rating-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Yıldız stilleri */
.stars {
    display: flex;
    margin-right: 0.5rem;
}

.star {
    color: #FFD700; /* Dolu yıldız rengi - Altın sarısı */
    font-size: 1rem;
    position: relative;
}

.star.empty {
    color: #ddd; /* Boş yıldız rengi - Açık gri */
}

/* Yarım yıldız efekti */
.star.half {
    position: relative;
    display: inline-block;
    color: #FFD700; /* Dolu renk */
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, #FFD700 50%, #ddd 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.star.half:after {
    position: absolute;
    color: #ddd;
    width: 50%;
    overflow: hidden;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
}

/* Filtre Butonları */
.apply-filters, .clear-filters {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-filters {
    background: var(--primary-color);
    color: white;
    margin-bottom: 0.8rem;
}

.apply-filters:hover {
    background: #0d1757;
}

.clear-filters {
    background: #f5f5f5;
    color: #666;
}

.clear-filters:hover {
    background: #e0e0e0;
}

/* Sağ Taraf - Ürünler */
.products-grid {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.products-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 0.9rem;
}

/* Ürün Listesi - İkili düzen */
.products-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* İkişerli düzen */
    gap: 2rem; /* Daha fazla boşluk */
}

/* Ürün Kartı - Daha büyük */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Ürün Görüntüsü - Kartlara sığdırılmış */
.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
    padding: 1rem;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.product-badge.bestseller {
    background: #FF6B6B;
}

.product-badge.free {
    background: #20BF6B;
}

.product-info {
    padding: 1.2rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.product-rating .stars {
    margin-right: 0.5rem;
}

.rating-count {
    font-size: 0.8rem;
    color: #666;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

/* Ürün butonları için yeni stiller */
.product-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-to-cart, .detail-button {
    flex: 1;
    padding: 0.8rem 0.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-cart {
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
}

.detail-button {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.add-to-cart:hover {
    background: #0d1757;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.detail-button:hover {
    background: #e9e9e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Filters Sidebar Mobile Toggle */
.filters-toggle {
    display: none;
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    text-align: left;
    position: relative;
}

.filters-toggle:after {
    content: '\f107'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    right: 1rem;
    transition: transform 0.3s;
}

.filters-toggle.active:after {
    transform: rotate(180deg);
}

/* Responsive Tasarım */
@media (max-width: 992px) {
    .products-container {
        flex-direction: column;
    }
    
    .filters-sidebar {
        flex: none;
        width: 100%;
        position: static;
        margin-bottom: 1.5rem;
    }
    
    .products-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .products-page {
        padding: 1.5rem 1rem;
    }
    
    .filters-toggle {
        display: block;
    }
    
    .filters-sidebar {
        display: none;
        margin-bottom: 1rem;
    }
    
    .filters-sidebar.active {
        display: block;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .products-list {
        grid-template-columns: repeat(2, 1fr); /* İkişerli düzen */
        gap: 1rem;
    }
    
    .product-image {
        height: 220px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-info h3 {
        font-size: 1rem;
        height: 2.4rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .old-price {
        font-size: 0.8rem;
    }
    
    .product-buttons {
        flex-direction: column;
    }
    
    .add-to-cart, .detail-button {
        padding: 0.7rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .products-page {
        padding: 1rem 0.8rem;
    }
    
    .products-list {
        grid-template-columns: repeat(2, 1fr); /* İkişerli düzen korunuyor */
        gap: 0.8rem;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-image img {
        padding: 0.5rem;
    }
    
    .product-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        top: 5px;
        right: 5px;
    }
    
    .product-info {
        padding: 0.8rem 0.6rem;
    }
    
    .product-info h3 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
        height: 2.1rem;
    }
    
    .product-rating {
        margin-bottom: 0.5rem;
    }
    
    .product-rating .stars .star {
        font-size: 0.8rem;
    }
    
    .current-price {
        font-size: 0.95rem;
    }
    
    .old-price {
        font-size: 0.7rem;
    }
    
    .product-buttons {
        margin-top: 0.7rem;
        gap: 0.4rem;
    }
    
    .add-to-cart {
        font-size: 0.85rem;
        padding: 0.6rem 0.4rem;
    }
    
    .detail-button {
        font-size: 0.75rem;
        padding: 0.6rem 0.4rem;
    }
}

/* For very small screens */
@media (max-width: 360px) {
    .products-list {
        gap: 0.6rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-info {
        padding: 0.7rem 0.5rem;
    }
    
    .product-info h3 {
        font-size: 0.8rem;
        height: 2rem;
        margin-bottom: 0.2rem;
    }
    
    .product-rating .stars .star {
        font-size: 0.75rem;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
    
    .product-buttons {
        margin-top: 0.6rem;
        gap: 0.3rem;
    }
    
    .add-to-cart, .detail-button {
        padding: 0.5rem 0.3rem;
    }
    
    .add-to-cart {
        font-size: 0.8rem;
    }
    
    .detail-button {
        font-size: 0.7rem;
    }
} 