/* Modern E-ticaret Products Sayfası */

/* Hero Section */
.products-hero-section {
    background: linear-gradient(135deg, var(--accent) 0%, var(--text) 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: 16px;
    color: white;
}

.products-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.products-hero-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.products-hero-main-subtitle {
    font-size: 18px;
    opacity: 0.9;
    color: white;
}

.products-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--text) 100%);
    border-radius: 16px;
    margin-bottom: 32px;
    color: white;
}

.products-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.products-hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    color: white;
}

/* Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-label {
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.toolbar-select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.toolbar-select:hover {
    border-color: var(--accent);
}

.toolbar-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(123, 118, 105, 0.1);
}

.btn-toolbar {
    padding: 10px 20px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.btn-toolbar:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Modern Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: var(--bg);
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 14px;
}

.product-badge {
    position: absolute;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    line-height: 1.2;
    display: inline-block;
    width: auto;
    height: auto;
    max-width: none;
    box-sizing: border-box;
}

/* Badge konumları - üst üste binmemesi için */
.product-badge.featured {
    top: 12px;
    left: 12px;
    background: rgba(242, 180, 0, 0.9);
    color: white;
}

.product-badge.bestseller {
    top: 12px;
    right: 12px;
    background: rgba(255, 107, 53, 0.9);
    color: white;
}

.product-badge.top-rated {
    top: 12px;
    right: 12px;
    background: rgba(242, 180, 0, 0.9);
    color: white;
}

/* Stok durumu badge'leri sağ alt köşede */
.product-badge.low-stock {
    bottom: 12px;
    right: 12px;
    background: rgba(255, 152, 0, 0.9);
    color: white;
}

.product-badge.out-of-stock {
    bottom: 12px;
    right: 12px;
    background: rgba(198, 40, 40, 0.9);
    color: white;
}

/* Eğer hem featured hem stok durumu varsa, stok durumu sağ altta kalır */
.product-card-image .product-badge.featured + .product-badge.low-stock,
.product-card-image .product-badge.featured + .product-badge.out-of-stock {
    bottom: 12px;
    right: 12px;
    top: auto;
}

/* Eğer hem bestseller/top-rated hem stok durumu varsa */
.product-card-image .product-badge.bestseller + .product-badge.low-stock,
.product-card-image .product-badge.bestseller + .product-badge.out-of-stock,
.product-card-image .product-badge.top-rated + .product-badge.low-stock,
.product-card-image .product-badge.top-rated + .product-badge.out-of-stock {
    bottom: 12px;
    right: 12px;
    top: auto;
}


.product-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-actions {
    display: flex;
    gap: 12px;
}

.product-action-btn {
    padding: 12px 24px;
    background: white;
    color: var(--text);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}

.product-action-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.product-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
    flex: 1;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rating-stars {
    display: flex;
    gap: 2px;
    font-size: 14px;
}

.rating-text {
    font-size: 12px;
    color: var(--text-muted);
}

.rating-text.no-rating {
    font-style: italic;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.product-add-cart {
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.product-add-cart:hover:not(.disabled) {
    background: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-add-cart.disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .products-hero-section {
        padding: 40px 16px;
        margin-bottom: 24px;
    }
    
    .products-hero-main-title {
        font-size: 28px;
    }
    
    .products-hero-main-subtitle {
        font-size: 14px;
    }
    
    .products-hero {
        padding: 32px 16px;
        margin-bottom: 24px;
    }
    
    .products-hero-title {
        font-size: 24px;
    }
    
    .products-hero-subtitle {
        font-size: 14px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card-body {
        padding: 12px;
    }
    
    .product-card-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-add-cart {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
        width: 100%;
    }
    
    .toolbar-select {
        flex: 1;
        min-width: 0;
    }
    
    .category-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 8px;
    }
    
    .category-filters::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card-body {
        padding: 12px;
    }
    
    .product-card-title {
        font-size: 16px;
        -webkit-line-clamp: 2;
    }
    
    .product-card-footer {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .product-add-cart {
        padding: 10px 16px;
        white-space: nowrap;
    }
    
    .products-hero-section {
        padding: 32px 12px;
    }
    
    .products-hero-main-title {
        font-size: 24px;
    }
    
    .products-toolbar {
        padding: 12px;
    }
}

