/* Product Cards Styling */

.product-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0;
    padding: 8px 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.product-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-details {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.product-category {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 6px 0;
}

.product-description {
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.product-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.product-benefits li {
    font-size: 10px;
    color: #374151;
    line-height: 1.4;
    padding: 3px 0 3px 14px;
    position: relative;
}

.product-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 11px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.product-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Defensive: ensure links display as buttons */
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

/* Defensive: disabled button style */
.product-cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.product-cta:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.product-cta:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-image {
        height: 100px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-price {
        font-size: 13px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .product-cards-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
