/* ============================================
   Modern Product Card Component - React-like Design
   ============================================ */

/* Grid Layout Fix for tablet widths - 2 column layout */
@media (min-width: 480px) and (max-width: 991px) {
    .product_listing__main > div[class*="col-"],
    .row.product_listing__main > div,
    .product_listing__main .col-xs-6,
    .product_listing__main .col-sm-4 {
        width: 50% !important;
        float: left !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(200, 16, 46, 0.12);
    border-color: rgba(200, 16, 46, 0.3);
}

/* Image Area */
.product-card__image {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.product-card__image-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-card__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card__image img {
    transform: scale(1.08);
}

/* Quick Actions Overlay */
.product-card__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

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

.product-card__action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #666;
    font-size: 16px;
    text-decoration: none;
}

.product-card__action-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.product-card__action-btn--wishlist:hover {
    background: #c8102e;
}

.product-card__action-btn--view:hover {
    background: #2c3e50;
}

/* Badge */
.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-card__badge--out-of-stock {
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
}

/* Content Area */
.product-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card__title a:hover {
    color: #c8102e;
}

/* Price */
.product-card__price {
    margin-bottom: 16px;
    flex: 1;
}

.product-card__price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #c8102e;
    display: block;
}

/* Add to Cart Button */
.product-card__cart-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #c8102e 0%, #a00d25 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.2);
}

.product-card__cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.35);
    background: linear-gradient(135deg, #a00d25 0%, #c8102e 100%);
}

.product-card__cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.product-card__cart-btn--disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    box-shadow: none;
}

.product-card__cart-btn i {
    font-size: 16px;
}

/* Responsive Design */
/* Tablet specific - 480px to 991px (includes 600px, 750px, etc.) */
@media (min-width: 480px) and (max-width: 991px) {
    .product-card {
        margin-bottom: 20px;
    }
    
    .product-card__content {
        padding: 18px;
    }
    
    .product-card__title {
        font-size: 14px;
        min-height: 42px;
    }
    
    .product-card__price-amount {
        font-size: 19px;
    }
    
    .product-card__cart-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .product-card__actions {
        opacity: 1;
        transform: translateX(0);
    }
    
    .product-card__action-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .product-card {
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .product-card:hover {
        transform: translateY(-4px);
    }

    .product-card__content {
        padding: 16px;
    }

    .product-card__title {
        font-size: 14px;
        min-height: 40px;
    }

    .product-card__price-amount {
        font-size: 18px;
    }

    .product-card__cart-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .product-card__actions {
        opacity: 1;
        transform: translateX(0);
    }

    .product-card__action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .product-card__title {
        font-size: 13px;
        min-height: 36px;
    }

    .product-card__content {
        padding: 12px;
    }

    .product-card__price-amount {
        font-size: 16px;
    }
    
    .product-card__cart-btn {
        padding: 9px 14px;
        font-size: 12px;
    }
}

@media (max-width: 375px) {
    .product-card {
        border-radius: 8px;
    }
    
    .product-card__title {
        font-size: 12px;
        min-height: 34px;
    }

    .product-card__content {
        padding: 10px;
    }

    .product-card__price-amount {
        font-size: 15px;
    }
    
    .product-card__cart-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .product-card__action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Animation for adding to cart */
@keyframes addToCartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.product-card__cart-btn.adding {
    animation: addToCartPulse 0.3s ease;
}
