/* Product Card Modern Styling - TOS Webcommerce */


@media (max-width: 575px) {
    #products-grid-area .item-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .product-image,
    .product-image-placeholder {
        height: 200px !important;
    }
    
    .product-item .card-body {
        padding: 0.6rem !important;
    }
    
    .product-brand {
        font-size: 0.7rem !important;
    }
    
    .product-name {
        font-size: 0.9rem !important;
        min-height: 2.2rem !important;
        max-height: 2.2rem !important;
    }
    
    .current-price {
        font-size: 0.95rem !important;
    }
    
    .product-rating .stars {
        font-size: 0.75rem !important;
    }
    
    .product-item .btn-sm {
        font-size: 0.85rem !important;
        padding: 0.4rem 0.6rem !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    #products-grid-area .item-card {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
    
    .product-image,
    .product-image-placeholder {
        height: 160px !important;
    }
    
    .product-item .card-body {
        padding: 0.5rem !important;
    }
    
    .product-brand {
        font-size: 0.65rem !important;
    }
    
    .product-name {
        font-size: 0.8rem !important;
    }
    
    .current-price {
        font-size: 0.85rem !important;
    }
}

@media (min-width: 744px) and (max-width: 991px) {
    #products-grid-area .item-card {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .product-image,
    .product-image-placeholder {
        height: 150px !important;
    }
    
    .product-item {
        max-width: 100% !important;
    }
    
    .product-card {
        max-width: 100% !important;
    }
    
    .product-item .card-body {
        padding: 0.5rem !important;
    }
    
    .product-brand {
        font-size: 0.65rem !important;
    }
    
    .product-name {
        font-size: 0.8rem !important;
        min-height: 2rem !important;
        max-height: 2rem !important;
    }
    
    .current-price {
        font-size: 0.85rem !important;
    }
    
    .product-item .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
    }
}

.item-card {
    padding: 0.25rem !important;
}

.product-card {
    margin-bottom: 0;
    padding: 0 !important;
    margin: 0 !important;
    height: 100%;
}

.product-item {
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    border: none !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-item .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .product-item {
        background: #ffffff !important;
        color: #212529 !important;
    }

    .product-item .card-body {
        background: #ffffff !important;
        color: #212529 !important;
    }

    .product-brand {
        color: #6c757d !important;
    }

    .product-link {
        color: #2c3e50 !important;
    }

    .product-image-placeholder {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    }
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}
.product-image {
    height: 120px;
    object-fit: cover;
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease;
}

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

.product-image-placeholder {
    height: 120px;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #adb5bd;
}

.placeholder-icon {
    font-size: 1.5rem;
    opacity: 0.5;
}

.discount-badge .discount-percent {
    font-size: 0.6rem;
    font-weight: bold;
    border-radius: 3px;
    padding: 0.15rem 0.3rem;
    background: linear-gradient(45deg, #dc3545, #ff6b6b) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}
.product-item .card-body {
    padding: 0.4rem !important;
}

.product-brand {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: #6c757d;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.3rem;
    min-height: 1.7rem;
    max-height: 1.7rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-link {
    color: #2c3e50 !important;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: var(--primary-color, #007bff) !important;
}
.product-rating {
    min-height: 0.9rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

.product-rating .stars {
    font-size: 0.6rem;
}

.product-rating .text-warning {
    color: #ffc107 !important;
}

.product-pricing {
    border-top: 1px solid #f1f1f1;
    padding-top: 0.3rem;
    margin-top: 0.2rem;
}

.current-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50 !important;
}

.original-price {
    font-size: 0.65rem;
    color: #999 !important;
}

.product-item .btn-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.product-item .btn-sm .icon {
    width: 12px !important;
    height: 12px !important;
}

.button-container {
    margin-top: 0.5rem;
    min-height: 28px;
}

.product-item .btn-primary {
    background-color: var(--primary-color, #ffdb56) !important;
    border-color: var(--primary-color, #ffdb56) !important;
    color: #000 !important;
}

.product-item .btn-primary:hover {
    background-color: var(--secondary-color, #ECAD4B) !important;
    border-color: var(--secondary-color, #ECAD4B) !important;
    color: #000 !important;
}

.product-item .btn-outline-primary {
    border-color: var(--primary-color, #ffdb56) !important;
    color: var(--primary-color, #ffdb56) !important;
}

.product-item .btn-outline-primary:hover {
    background-color: var(--primary-color, #ffdb56) !important;
    border-color: var(--primary-color, #ffdb56) !important;
    color: #000 !important;
}

.item-card .product-item.card {
    height: auto !important;
}

.item-card .product-card .card-img-container {
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.product-card {
    padding: 0 !important;
    margin: 0 !important;
}

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

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-item * {
    transition: all 0.3s ease;
}

.product-name .like-action {
    flex-shrink: 0;
}

.product-name .like-action svg {
    transition: all 0.2s ease;
}

.product-name .like-action:hover svg {
    transform: scale(1.2);
}

.product-name .like-action-wished svg use.wished {
    fill: var(--red-500, #dc3545);
    color: var(--red-500, #dc3545);
}
