/* ============================================
   PRODUCTS PAGE - CARD REFINEMENT
   ============================================ */

/* Product Cards - Uniform and Premium */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 520px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-lg) !important;
    transition: all var(--transition-normal) !important;
}

.product-card:hover {
    transform: translateY(-16px) scale(1.02) !important;
    box-shadow: var(--shadow-2xl) !important;
    background: rgba(255, 255, 255, 1) !important;
}

/* Product Image - Fixed Height */
.product-image-wrapper {
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background-color: var(--soft-grey) !important;
    position: relative !important;
}

.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform var(--transition-slow) !important;
}

.product-card:hover .product-image {
    transform: scale(1.12) !important;
}

/* Product Info - Flexible Content */
.product-info {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    padding: 2rem !important;
    gap: 0 !important;
}

/* Product Heading */
.product-info h3 {
    min-height: 60px !important;
    max-height: none !important;
    height: auto !important;
    margin-bottom: 1rem !important;
    color: var(--primary-blue) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: block !important;
    overflow: visible !important;
}

/* Product Description */
.product-info p {
    flex: 1 !important;
    margin-bottom: 1.5rem !important;
    color: #64748b !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;

    /* Allow full text or limit to 4 lines */
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Contact Button - Always at Bottom */
.product-contact-btn {
    width: 100% !important;
    padding: 1rem 1.75rem !important;
    background: linear-gradient(135deg, rgba(37, 79, 126, 0.15) 0%, rgba(37, 79, 126, 0.25) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(37, 79, 126, 0.3) !important;
    border-radius: var(--radius-full) !important;
    color: var(--primary-blue) !important;
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all var(--transition-normal) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: var(--shadow-md) !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

.product-contact-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    background: var(--gradient-primary) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: width 0.6s ease, height 0.6s ease !important;
}

.product-contact-btn:hover::before {
    width: 400% !important;
    height: 400% !important;
}

.product-contact-btn:hover {
    color: var(--white) !important;
    border-color: var(--primary-blue) !important;
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-xl) !important;
}

.product-contact-btn i,
.product-contact-btn span {
    position: relative !important;
    z-index: 1 !important;
}

/* Grid Layout for Products */
.products-page .grid-4,
section .grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2.5rem !important;
    align-items: stretch !important;
}

/* Ensure all product cards stretch */
.products-page .grid-4>*,
section .grid-4>.product-card {
    height: 100% !important;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {

    .products-page .grid-4,
    section .grid-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {

    .products-page .grid-4,
    section .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

    .product-card {
        min-height: 480px !important;
    }
}

@media (max-width: 640px) {

    .products-page .grid-4,
    section .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .product-card {
        min-height: 450px !important;
    }

    .product-info {
        padding: 1.5rem !important;
    }

    .product-contact-btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
}

/* Ensure button is always visible */
.product-info {
    min-height: 200px !important;
}