/*
 * ======================================================
 * == Styles for Amazon Recommended Products Section   ==
 * ======================================================
 */

/* Root variables used in this file for consistency. */
:root {
    --dark: #1e293b;
    --white: #ffffff;
    --border: #e2e8f0;
}

/* Main container for the product section */
.product-section {
    width: 100%;
    margin: 4rem auto 2rem;
    text-align: center;
}

/* Heading for the section */
.product-section h2 {
    font-size: 2em;
    margin-bottom: 2rem;
    color: var(--dark);
}

/* Flex container for the product cards */
.product-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

/* Individual product card styling */
.product-card {
    flex: 1 1 250px;
    max-width: 300px;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

/* Product image styling */
.product-card img {
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

/* Product name heading */
.product-name {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 1rem 0; /* Space below name */
    flex-grow: 1; /* Pushes button down to align cards of different text length */
}

/* Call-to-action button */
.product-cta {
    display: inline-block;
    padding: 10px 20px; /* Smaller button size */
    background-color: #FF9900; /* Amazon Orange */
    color: #111;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

.product-cta:hover {
    background-color: #E68A00; /* Darker orange for hover */
}


/* ===== Responsive Design for Products Section ===== */
@media (max-width: 768px) {
    .product-section {
        margin: 2rem auto 1rem;
    }
    .product-container {
        gap: 1.5rem;
    }
    .product-section h2 {
        font-size: 1.5em;
    }
}