/**
 * Premium Product Cards CSS
 * Modern, elegant design for homepage products
 */

/* Premium Product Card Container */
.modern-product-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 4px;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-badge.featured {
    background: #28a745;
    color: #ffffff;
}

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

.product-badge.new {
    background: #868e96;
    color: #ffffff;
}

/* Product Actions - Top Right */
.product-actions-top {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

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

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.action-btn:hover {
    background: #495057;
    color: #ffffff;
    border-color: #495057;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.action-btn i {
    font-size: 0.9rem;
}

/* Product Image Wrapper */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-product-card:hover .product-image-wrapper img {
    transform: scale(1.12);
}


/* Product Info Section */
.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
}

.product-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: #e9ecef;
}

.product-name {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
    letter-spacing: -0.01em;
}

.product-name a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Price Section */
.product-price-section {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    letter-spacing: -0.02em;
}

.product-compare-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
    font-weight: 400;
}

/* Product Actions Bottom */
.product-actions-bottom {
    padding: 0 20px 20px;
    background: #ffffff;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    background: transparent !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: transparent !important;
    border-color: #495057 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #212529 !important;
}

.add-to-cart-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.add-to-cart-btn i {
    font-size: 1rem;
}

/* Stock Badge */
.stock-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-product-card {
        border-radius: 12px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-actions-bottom {
        padding: 0 16px 16px;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .product-actions-top {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .product-badges {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
    
    .product-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .product-actions-top {
        top: 8px;
        right: 8px;
        gap: 6px;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
    }
    
    .product-name {
        font-size: 0.9rem;
        min-height: 2.5em;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .add-to-cart-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}

