/* Məhsul Kartı - Vahid Stil */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    height: 460px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
    text-decoration: none;
    color: inherit;
}

/* Məhsul Şəkli */
.product-image-container {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* Məhsul Etiketləri */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.product-badge {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.product-badge.new {
    background: #28a745;
}

.product-badge.featured {
    background: #ffc107;
    color: #333;
}

.product-badge.sale {
    background: #dc3545;
}

/* Favori Düyməsi */
.product-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.product-card:hover .product-favorite {
    opacity: 1;
}

.product-favorite:hover {
    background: white;
    transform: scale(1.1);
}

.product-favorite:active {
    transform: scale(0.95);
}

/* Məhsul Məlumatları */
.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Qiymət Bölməsi */
.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-price-current {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.product-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* Rəng Seçimləri */
.product-colors {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #333;
}

.color-option.active {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.color-more {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-card {
        height: 440px;
    }
    
    .product-info {
        padding: 14px;
    }
    
    .product-title {
        font-size: 15px;
    }
    
    .product-price-current {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .product-card {
        height: 380px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .product-price-current {
        font-size: 16px;
    }
    
    .color-option {
        width: 18px;
        height: 18px;
    }
    
    .product-badges {
        top: 8px;
        left: 8px;
    }
    
    .product-favorite {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .product-card {
        height: 340px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .product-price-current {
        font-size: 15px;
    }
    
    .color-option {
        width: 16px;
        height: 16px;
    }
    
    .product-badge {
        padding: 3px 6px;
        font-size: 10px;
    }
}

/* Grid Layouts */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        padding: 16px 0;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 12px 0;
    }
}

/* Swiper Slider üçün xüsusi stiller */
.swiper-slide .product-card {
    height: 100%;
    margin: 0;
}

.swiper-container {
    padding: 0 !important;
}

.swiper-wrapper {
    align-items: stretch;
}

/* List görünüşü */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: 200px;
}

.products-grid.list-view .product-image-container {
    flex: 0 0 200px;
    aspect-ratio: auto;
}

.products-grid.list-view .product-info {
    flex: 1;
    padding: 20px;
}

.products-grid.list-view .product-title {
    font-size: 18px;
    margin-bottom: 8px;
    -webkit-line-clamp: 3;
}

.products-grid.list-view .product-price-current {
    font-size: 20px;
}

@media (max-width: 768px) {
    .products-grid.list-view .product-card {
        height: 160px;
    }
    
    .products-grid.list-view .product-image-container {
        flex: 0 0 140px;
    }
    
    .products-grid.list-view .product-info {
        padding: 12px;
    }
    
    .products-grid.list-view .product-title {
        font-size: 14px;
    }
    
    .products-grid.list-view .product-price-current {
        font-size: 16px;
    }
}

/* Bildiriş Stilləri */
.product-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

.product-notification.show {
    transform: translateX(0);
}

.product-notification.success {
    border-left: 4px solid #28a745;
}

.product-notification.error {
    border-left: 4px solid #dc3545;
}

.product-notification.info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.product-notification.success .notification-icon {
    background: #28a745;
}

.product-notification.error .notification-icon {
    background: #dc3545;
}

.product-notification.info .notification-icon {
    background: #17a2b8;
}

.notification-message {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* Lazy loading şəkillər */
.product-image.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.lazy.loaded {
    opacity: 1;
}

/* Yüklənmə animasiyası */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.product-card.loading .product-image {
    animation: pulse 1.5s infinite;
}

/* Hover effektləri - Touch cihazlar üçün optimallaşdırılmış */
@media (hover: hover) {
    .product-card:hover .product-favorite {
        opacity: 1;
        transform: scale(1);
    }
    
    .product-favorite:hover {
        background: white;
        transform: scale(1.1);
    }
}

/* Touch cihazlar üçün favori düyməsi həmişə görünür */
@media (hover: none) {
    .product-favorite {
        opacity: 0.8;
    }
    
    .product-card:active .product-favorite {
        opacity: 1;
    }
}

/* Mobil responsive bildirişlər */
@media (max-width: 768px) {
    .product-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .notification-content {
        padding: 12px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

/* Accessibility təkmilləşdirmələri */
.product-card:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.product-favorite:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Print stillər */
@media print {
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .product-favorite {
        display: none;
    }
    
    .product-badge {
        background: #333 !important;
        color: white !important;
    }
}

/* Yüksək kontrastlı rejim */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .product-badge {
        border: 1px solid #000;
    }
    
    .color-option {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-image,
    .product-favorite,
    .color-option {
        transition: none;
    }
    
    .product-card:hover .product-image {
        transform: none;
    }
    
    .product-card:hover {
        transform: none;
    }
} 