/**
 * Modern Minimal Product Card Styles
 * Novoshop Theme
 */

/* ========================================
   Product Card Base
======================================== */
.product-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card * {
    box-sizing: border-box;
}

/* Hover Effects */
.product-card.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.product-card.hover-shadow:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

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

.product-card.hover-fade:hover {
    opacity: 0.9;
}

/* Out of Stock */
.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.5);
    z-index: 1;
}

/* ========================================
   Product Image
======================================== */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

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

/* ========================================
   Product Badges
======================================== */
.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge-sale {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff;
}

.badge-stock {
    background: rgba(108, 117, 125, 0.95);
    color: #ffffff;
}

.badge-featured {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333333;
}

/* ========================================
   Quick Actions
======================================== */
.product-quick-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

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

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

.quick-action:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: scale(1.1);
}

.quick-action svg {
    width: 18px;
    height: 18px;
}

.quick-action.wishlist-btn.active {
    background: #ff6b6b;
    color: #ffffff;
}

.quick-action.wishlist-btn.active svg {
    fill: currentColor;
}

/* ========================================
   Product Details
======================================== */
.product-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Product Category */
.product-category {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-category a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-category a:hover {
    color: #1a1a1a;
}

/* Product Title */
.product-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #666;
}

/* Product Excerpt */
.product-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   Product Rating
======================================== */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 14px;
    color: #ddd;
}

.star.filled {
    color: #ffc107;
}

.rating-count {
    font-size: 12px;
    color: #999;
}

/* ========================================
   Product Footer
======================================== */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Product Price */
.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.product-price del {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    margin-left: 8px;
}

.product-price ins {
    text-decoration: none;
    color: #ff6b6b;
}

/* Product Actions */
.product-actions {
    flex: 1;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-to-cart-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.add-to-cart-btn svg {
    width: 18px;
    height: 18px;
}

.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

.out-of-stock-btn {
    background: #999;
    cursor: not-allowed;
}

.out-of-stock-btn:hover {
    background: #999;
    transform: none;
    box-shadow: none;
}

/* ========================================
   Card Variations
======================================== */

/* Minimal Style */
.product-card-minimal {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-card-minimal:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Modern Style */
.product-card-modern {
    border: 1px solid #e0e0e0;
}

.product-card-modern:hover {
    border-color: #1a1a1a;
}

/* Elegant Style */
.product-card-elegant {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-radius: 16px;
}

.product-card-elegant .product-image-wrapper {
    border-radius: 12px;
    margin: 10px;
}

.product-card-elegant:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* ========================================
   List View Mode
======================================== */
.products-grid.list-mode .product-card {
    flex-direction: row;
}

.products-grid.list-mode .product-image-wrapper {
    width: 250px;
    flex-shrink: 0;
}

.products-grid.list-mode .product-details {
    flex: 1;
    padding: 25px;
}

.products-grid.list-mode .product-title {
    font-size: 20px;
}

.products-grid.list-mode .product-excerpt {
    display: block;
    -webkit-line-clamp: 3;
}

.products-grid.list-mode .product-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.products-grid.list-mode .product-actions {
    width: auto;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .product-quick-actions {
        opacity: 1;
        transform: translateX(0);
    }
    
    .quick-action {
        width: 36px;
        height: 36px;
    }
    
    .product-details {
        padding: 15px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .add-to-cart-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .products-grid.list-mode .product-card {
        flex-direction: column;
    }
    
    .products-grid.list-mode .product-image-wrapper {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-badges {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .product-quick-actions {
        flex-direction: row;
        left: 10px;
        top: auto;
        bottom: 10px;
    }
    
    .quick-action {
        width: 32px;
        height: 32px;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .add-to-cart-btn span {
        font-size: 12px;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease;
}

/* Stagger animation for grid items */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* ========================================
   Print Styles
======================================== */
@media print {
    .product-quick-actions,
    .product-actions {
        display: none;
    }
}

