/**
 * Product Card Styles
 * 
 * استایل‌های کارت محصولات - قابل استفاده در تمام صفحات
 * شناسه تغییر: PRODUCT-CARD-CSS-001
 * 
 * @package TopTheme
 * @since 1.0.0
 */

/* ============================================
   Base Product Card - Mobile First
   ============================================ */

.product-card {
    background: #fcefdb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Product Image Link */
.product-card-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Product Image */
.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f5f5f5;
}

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

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

/* Product Quick Actions */
.product-card-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.product-card-action-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-card-action-btn:hover {
    background: #FFB22C;
    color: #000;
    transform: scale(1.1);
}

/* Product Content */
.product-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Product Title */
.product-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Product Category */
.product-card-category {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

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

.product-card-category a:hover {
    color: #FFB22C;
}

/* Product Attributes */
.product-card-attributes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.product-card-attribute-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
    font-size: 11px;
}

.product-card-attribute-item .attribute-label {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    min-width: 45px;
    flex-shrink: 0;
}

.product-card-attribute-item .attribute-value {
    color: #333;
    font-weight: 600;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.attribute-toggle-more {
    background: none;
    border: none;
    color: #FFB22C;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-right: 5px;
    text-decoration: underline;
    font-family: inherit;
    transition: color 0.3s ease;
}

.attribute-toggle-more:hover {
    color: #e6a025;
}

.attribute-values-hidden {
    display: none;
}

.attribute-values-hidden.show {
    display: inline;
}

.attribute-values-visible.hide {
    display: none;
}

/* Product Price */
.product-card-price {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
}

.product-card-price-old {
    font-size: 10px;
    color: #999;
    text-decoration: line-through;
}

.product-card-price-current {
    font-size: 14px;
    font-weight: 700;
    color: #FF6B6B;
}

/* Add to Cart Button - Now links to single product page */
.product-card-add-to-cart {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: #FFB22C;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}

.product-card-add-to-cart:hover {
    background: #e6a025;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.4);
    color: #000;
    text-decoration: none;
}

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

/* Out of stock state */
.product-card-out-of-stock {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}


/* Desktop and up */
@media (min-width: 992px) {
    .product-card-image {
        padding-top: 100%;
    }
    
    .product-card-content {
        padding: 20px;
    }
    
    .product-card-title {
        font-size: 15px;
        min-height: 45px;
    }
    
    .product-card-price-current {
        font-size: 14px;
    }
    
    .product-card-add-to-cart {
        padding: 14px;
        font-size: 15px;
    }

    .product-card-out-of-stock {
        padding: 14px;
        font-size: 15px;
    }
}


