a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: inherit;
}

/* ===== Hero Section ===== */
#hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    background: var(--hero-gradient);
    color: #fff;
}

#hero h1 {
    font-weight: 700;
    font-size: 48px;
    margin-bottom: 16px;
}

#hero p {
    max-width: 700px;
    font-size: 20px;
}

/* ===== Product Filter Section ===== */
#product-filter {
    background-color: #fefefe;
    padding: 20px 0;
}

#product-filter .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

#product-filter .nav-link {
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    color: #123;
    cursor: pointer;
    border-radius: 9999px;
    border: 1px solid #ccc;
    background-color: transparent;
    transition: all 0.3s ease;
}

#product-filter .nav-link:hover,
#product-filter .nav-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: #2f6663;
}

/* ===== Products Section ===== */
#products {
    padding: 40px 20px;
}

#products .products-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* always 3 per row */
    gap: 30px;
    align-items: stretch;
}

/* ===== Product Card ===== */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* pushes footer to bottom */
    align-items: center;
    width: 100%;
    min-height: 520px; /* ensures all cards equal height */
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(55,123,118,0.25);
    border: 0.1px solid #ccc;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(55,123,118,0.35);
}

.product-card .product-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.product-card .tag {
    margin-right: auto;
    width: 100%;
}

.product-card .tag button {
    border: 1px solid #ccc;
    padding: 4px 12px;
    margin-bottom: 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--primary-color);
    color: #fff;
    cursor: text;
}

.product-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.product-card .product-image {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.product-card .product-image img {
    width: 100%;
    height: 400px; /* fixed uniform height */
    object-fit: inherit;
    border-radius: 8px;
}

.product-card p {
    font-size: 14px;
    color: hsl(180, 5%, 45%);
    text-align: center;
    margin-bottom: 16px;
    flex-grow: 1; /* stretches description to fill space */
}

.product-card .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 12px;
}

.product-card .price {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.product-card .btn {
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid #2f6663;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-card .btn:hover {
    background-color: var(--primary-dark);
    color: #f0f0f0;
    border-color: #264f4c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ===== Subscribe Section ===== */
#subscribe {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 64px 20px;
    background-color: #ebe6e0;
}

#subscribe h2 {
    font-weight: 700;
    font-size: 30px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

#subscribe p {
    max-width: 700px;
    color: #555;
    margin-bottom: 24px;
}

.search-bar {
    max-width: 425px;
    width: 90%;
    margin: 0 auto;
    display: flex;
}

.search-bar .input-group {
    display: flex;
    width: 100%;
}

.search-bar input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 10px 0 0 10px;
    border: 0;
    outline: none;
    background-color: #f7f5f2;
    color: #000;
}

.search-bar input::placeholder {
    color: hsl(160, 10%, 40%);
}

.search-bar button {
    padding: 8px 16px;
    border: 0;
    border-radius: 0 10px 10px 0;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background-color: var(--primary-dark);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    #products .products-container {
        grid-template-columns: repeat(3, 1fr); /* maintain 3 on tablets */
    }
}

@media (max-width: 768px) {
    #products .products-container {
        grid-template-columns: repeat(2, 1fr); /* 2 per row on smaller screens */
    }

    #product-filter .container {
        flex-wrap: wrap;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    #products .products-container {
        grid-template-columns: 1fr; /* 1 per row on mobile */
    }
}
