/* ===== UNIVERSAL PRODUCT CARD COMPONENT ===== */
/* Bu dosya tüm sayfalarda kullanılacak ortak product card stillerini içerir */

/* Product Card Base Styles */
.product-item,
.product-card,
.product-card-slider,
.product-vendor {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

/* Slider specific width */
.product-card-slider {
    flex: 0 0 280px;
    margin-top: 10px;
}

/* Vendor admin panel specific */


/* Universal hover effect */
.product-item:hover,
.product-card:hover,
.product-card-slider:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Product Visual Container */
.product-visual {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8fafc;
}

.product-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-img-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Universal image hover effects */
.product-item:hover .product-img,
.product-card:hover .product-img,
.product-card-slider:hover .product-img {
    transform: scale(1.1);
}

.product-item:hover .product-img-back,
.product-card:hover .product-img-back,
.product-card-slider:hover .product-img-back {
    opacity: 1;
}

/* Product Tags/Badges */
.product-tag,
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
}

.product-tag.sale,
.product-badge.sale {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.product-tag.stock,
.product-badge.stock {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.product-tag.removed,
.product-badge.removed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    top: 50px;
}

/* Discount Timer Badge - Positioned below sale badge */
.discount-timer-badge {
    position: absolute;
    top: 50px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
    z-index: 3;
    font-family: 'Courier New', monospace;
}

.timer-value {
    letter-spacing: 0.5px;
}

/* Universal Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(247, 147, 30, 0.85) 50%, rgba(102, 126, 234, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-overlay,
.product-card:hover .product-overlay,
.product-card-slider:hover .product-overlay {
    opacity: 1;
}

.overlay-actions {
    display: flex;
    gap: 12px;
}

.overlay-btn {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.overlay-btn.primary {
    background: white;
    color: #ff6b35;
}

.overlay-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.overlay-btn:hover {
    transform: translateY(-2px);
}

.overlay-btn.disabled {
    background: rgba(107, 114, 128, 0.5);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    opacity: 0.5;
}

.overlay-btn.disabled:hover {
    transform: none;
    background: rgba(107, 114, 128, 0.5);
}

/* Product Content/Meta/Details */
.product-meta,
.product-details,
.product-info {
    padding: 20px;
}

/* Warning Messages */
.removed-warning,
.stock-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.removed-warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #f87171;
}

.stock-warning {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #6b7280;
    border: 1px solid #9ca3af;
}

.removed-warning svg,
.stock-warning svg {
    flex-shrink: 0;
}

/* Vendor panel: Kaldırılan ürünler için görsel efekt */
.product-vendor[data-product-id] {
    transition: all 0.3s ease;
}

.product-vendor:has(.removed-warning) {
    opacity: 0.7;
    filter: grayscale(0.3);
    border: 2px solid #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.product-vendor:has(.removed-warning):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
}

.product-name {
    margin-bottom: 12px;
}

.product-name a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #ff6b35;
}

/* Price Area */
.product-price-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
}

.price-current.discounted {
    color: #059669;
}

.price-old {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Discount Timer */
.discount-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    border-radius: 12px;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.timer-text {
    opacity: 0.9;
}

.timer-value {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}



.product-price-area .price-current {
    order: 1;
}

.product-price-area .price-old {
    order: 2;
    margin-left: 0;
}

.product-price-area .discount-timer {
    order: 3;
}

/* Vendor */
.product-vendor {
    margin-top: 8px;
}

.vendor-name {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.vendor-name:hover {
    color: #ff6b35;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-card-slider {
        flex: 0 0 240px;
    }
    
    .product-meta,
    .product-details,
    .product-info {
        padding: 16px;
    }
    
    .product-name a {
        font-size: 1rem;
    }
    
    .price-current {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-card-slider {
        flex: 0 0 200px;
    }
    
    .overlay-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}

/* Vendor Admin Panel Specific Styles */
.product-vendor .product-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-vendor:hover .product-overlay {
    opacity: 1;
}

.product-vendor .overlay-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.product-vendor .overlay-btn:hover {
    background: white;
    transform: scale(1.1);
}

.product-vendor .edit-btn:hover {
    color: #3b82f6;
}

.product-vendor .delete-btn:hover {
    color: #ef4444;
}

.product-vendor .view-btn:hover {
    color: #10b981;
}

/* Vendor card için UUID badge */
.product-vendor .uuid-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
    z-index: 5;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .product-item,
    .product-card,
    .product-card-slider,
    .product-vendor {
        border-radius: 12px;
        margin-top: 8px;
        min-width: auto; /* Grid ile kullanıldığında min-width kaldır */
    }
    
    .product-card-slider {
        flex: 0 0 240px;
        min-width: 180px;
    }
    
    .product-name a {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .price-current {
        font-size: 1.1rem;
    }
    
    .price-old {
        font-size: 0.85rem;
    }
    
    .vendor-name {
        font-size: 0.8rem;
    }
    
    .product-tag,
    .product-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .overlay-actions {
        gap: 6px;
    }
    
    .overlay-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .product-meta,
    .product-details,
    .product-info {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .product-item,
    .product-card,
    .product-vendor {
        min-width: auto; /* Grid düzeni için */
    }
    
    .product-card-slider {
        flex: 0 0 calc(50% - 10px);
        min-width: 140px;
        max-width: 180px;
    }
    
    .product-name a {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .price-current {
        font-size: 1rem;
    }
    
    .vendor-name {
        font-size: 0.75rem;
    }
    
    .overlay-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .overlay-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        width: 100%;
        text-align: center;
    }
    
    .product-meta,
    .product-details,
    .product-info {
        padding: 10px;
    }
    
    .product-tag,
    .product-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
}
