/* ===== PRODUCT CARD STYLES - COMPLETE ===== */

/* PRODUCTS GRID - MAIN CONTAINER */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* For tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* For mobile */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* PRODUCT CARD */
.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* LEFT SIDE BADGE - Category Badge */
.product-badge-left {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 10;
}

/* RIGHT SIDE BADGES - Discount/Cashback/Featured */
.product-badge-right {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

/* Common Badge Styles - 20% INCREASE */
.badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap;
    line-height: 1.2;
}

/* Category Badge - Left Side */
.badge-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.badge-category.dog { background: linear-gradient(135deg, #4361ee, #3a0ca3); }
.badge-category.cat { background: linear-gradient(135deg, #f72585, #b5179e); }
.badge-category.fish { background: linear-gradient(135deg, #00b4d8, #0077b6); }
.badge-category.dog-cat { background: linear-gradient(135deg, #6f42c1, #4b0082); }

/* Discount Badge */
.badge-discount {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

/* Cashback Badge */
.badge-cashback {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

/* Featured Badge */
.badge-featured {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #2c3e50;
}

/* Product Image Container - FIXED ASPECT RATIO */
.product-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Product Info - FLEXIBLE, TAKES REMAINING SPACE */
.product-info {
    padding: 11px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Title - FIXED HEIGHT, WRAP PROPERLY */
.product-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    line-height: 1.4;
    min-height: 37px;
    max-height: 37px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #2c3e50;
    word-break: break-word;
}

/* Rating Stars */
.product-rating {
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.product-rating .stars {
    display: inline-flex;
    gap: 2px;
}

.product-rating .stars i {
    font-size: 10px;
}

.product-rating .review-count {
    font-size: 9px;
    color: #999;
}

/* Price Section */
.product-price {
    margin-bottom: 9px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
}

.discounted-price, .price {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
}

/* Actions - ALIGN AT BOTTOM */
.product-actions {
    display: flex;
    gap: 7px;
    margin-top: auto;
    padding-top: 7px;
}

/* Add to Cart Button */
.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Wishlist Button */
.btn-wishlist {
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.05);
}

.btn-wishlist:active {
    transform: scale(0.95);
}

/* Share Button */
.btn-share {
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-share:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .products-grid {
        gap: 10px;
    }
    
    .product-info {
        padding: 6px;
    }
    
    .product-info h3 {
        font-size: 10px;
        min-height: 28px;
        max-height: 28px;
        margin-bottom: 4px;
    }
    
    .badge {
        padding: 2px 4px;
        font-size: 6px;
        border-radius: 8px;
    }
    
    .product-badge-left {
        top: 5px;
        left: 5px;
    }
    
    .product-badge-right {
        top: 5px;
        right: 5px;
        gap: 3px;
    }
    
    .btn-primary {
        font-size: 8px;
        padding: 4px 6px;
        gap: 2px;
    }
    
    .btn-primary i {
        display: none;
    }
    
    .btn-wishlist, .btn-share {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .discounted-price, .price {
        font-size: 12px;
    }
    
    .original-price {
        font-size: 9px;
    }
    
    .product-rating .stars i {
        font-size: 8px;
    }
    
    .product-rating .review-count {
        font-size: 7px;
    }
}