/* style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background: #333;
    color: white;
    padding: 10px 20px;
    text-align: center;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.navbar li {
    position: relative;
    padding: 10px 15px;
}

.navbar a {
    color: white;
    text-decoration: none;
    display: block;
}

/* Dropdown styling */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #555;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%; /* Position below the main category */
    left: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #777;
}

/* Main Content and Grid */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
}

.details-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

/* Product Detail Page */
.product-detail {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.product-content {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.product-image {
    flex: 1;
    max-width: 400px;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.product-info {
    flex: 2;
}

.buy-links {
    margin-top: 20px;
}

.buy-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #28a745; /* Green for buying links */
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.buy-button:hover {
    background-color: #218838;
}

.back-link {
    display: block;
    margin-bottom: 15px;
    color: #007bff;
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 10px;
    background: #333;
    color: white;
    margin-top: 20px;
}