/* Modern Product Card Design */

/* Base Product Card */
.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: none; /* Disabled transition animation */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: none; /* Disabled card hover animation */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Keep original shadow */
}

/* Image Container */
.product-card .image-container {
    position: relative;
    padding-top: 120%; /* 5:6 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.product-card .product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* Second Image on Hover */
.product-card .hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* Badges Container */
.product-card .badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[dir="rtl"] .product-card .badges {
    left: auto;
    right: 15px;
}

/* Badge Styles */
.product-card .badge {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-card .badge.sale {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.product-card .badge.new {
    background: linear-gradient(135deg, #2ec5d9 0%, #1abc9c 100%);
    color: white;
}

.product-card .badge.sold-out {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* Quick Actions */
.product-card .quick-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

[dir="rtl"] .product-card .quick-actions {
    right: auto;
    left: 15px;
    transform: translateX(-20px);
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card .quick-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-card .quick-action-btn:hover {
    background: #2ec5d9;
    color: white;
    transform: scale(1.1);
}

.product-card .quick-action-btn i {
    font-size: 18px;
}

/* Product Info */
.product-card .product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Category */
.product-card .category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Product Name */
.product-card .name {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product-card:hover .name {
    color: #2ec5d9;
}

/* Rating */
.product-card .rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.product-card .stars {
    display: flex;
    gap: 2px;
}

.product-card .stars i {
    font-size: 14px;
    color: #d1d5db;
}

.product-card .rating-count {
    font-size: 13px;
    color: #6c757d;
}

/* Price */
.product-card .price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 15px;
}

.product-card .price {
    font-size: 22px;
    font-weight: 700;
    color: #212529;
}

.product-card .original-price {
    font-size: 16px;
    color: #6c757d;
    text-decoration: line-through;
}

.product-card .discount-percent {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Add to Cart Button */
.product-card .add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2ec5d9 0%, #1abc9c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card .add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(46, 197, 217, 0.3);
}

.product-card .add-to-cart-btn:active {
    transform: translateY(0);
}

/* Loading State */
.product-card .add-to-cart-btn.loading {
    color: transparent;
}

.product-card .add-to-cart-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

/* Color Swatches */
.product-card .color-options {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.product-card .color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.product-card .color-swatch:hover {
    transform: scale(1.2);
    border-color: #212529;
}

.product-card .color-swatch.active {
    border-color: #2ec5d9;
    box-shadow: 0 0 0 2px rgba(46, 197, 217, 0.2);
}

/* Size Options */
.product-card .size-options {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.product-card .size-option {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card .size-option:hover {
    border-color: #2ec5d9;
    color: #2ec5d9;
}

.product-card .size-option.active {
    background: #2ec5d9;
    color: white;
    border-color: #2ec5d9;
}

/* Special Card Styles */
.product-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.product-card.featured .name,
.product-card.featured .price,
.product-card.featured .category {
    color: white;
}

.product-card.featured .add-to-cart-btn {
    background: white;
    color: #667eea;
}

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

/* Mobile specific styles */
@media (max-width: 767px) {
    .product-card .image-container {
        height: 350px !important;
        padding-top: 0 !important;
    }
    
    .product-card .product-image {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .product-card .image-container {
        height: 400px !important;
        padding-top: 0 !important;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animations */
@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.product-card.skeleton {
    pointer-events: none;
}

.product-card.skeleton .image-container {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.product-card.skeleton .name,
.product-card.skeleton .category,
.product-card.skeleton .price {
    background: #f0f0f0;
    color: transparent;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .product-card {
        border-radius: 16px;
    }
    
    .product-card .product-info {
        padding: 15px;
    }
    
    .product-card .name {
        font-size: 16px;
    }
    
    .product-card .price {
        font-size: 20px;
    }
}