/* Resetting some defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body and overall layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #3b3b3b;
    line-height: 1.6;
}

header {
    background-color: white;
    color: #3b3b3b;
    padding: 20px;
    text-align: center;
    display: flex;           
    justify-content: space-between;  
    align-items: center;  
}

.header-nav {
    padding-right: 20px;
}

.about-link {
    color: #3b3b3b;
    text-decoration: none;
    font-size: 1.1em;
    padding: 5px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

header h1 {
    font-size: 2.5em;
}

header p {
    font-size: 1.2em;
}

.content-wrapper {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: #fff;
    margin-top: 20px;
    padding: 20px;
}

.search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #a8a8a8;
}

.categories h2 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.categories ul {
    list-style: none;
}

.categories li {
    margin-bottom: 10px;
}

.categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories a:hover {
    color: #3b3b3b;
}

.categories a.active {
    color: #3b3b3b;
    font-weight: bold;
}

main {
    flex: 1;
}

/* Main content */
main {
    padding: 20px;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product {
    background-color: #fff;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-info {
    padding: 20px;
}

.product-info h2 {
    color: #3b3b3b;
    font-size: 1.5em;
}

/* Footer */
footer {
    text-align: center;
    padding: 10px;
    background-color: white;
    color: #3b3b3b;
    margin-top: auto;
    margin-bottom: 0;
    bottom: 0;
    width: 100%;
}

.content-wrapper #categoriesButton {
    display: none;
    color: #3b3b3b;
    background: white;
    border: 1px solid #ddd;
    font-size: 1.1em;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 4px;
    margin-bottom: 0;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

.categories-button:hover {
    background-color: #f5f5f5;
}

/* Mobile devices */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }

    .product-info h2 {
        font-size: 1.2em;
    }

    .product-image {
        width: 200px !important;
    }
}

/* Tablets and smaller screens */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
        margin-top: 0;
        background-color: #fff;
        padding: 20px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .content-wrapper {
        display: block;
    }

    .content-wrapper #categoriesButton {
        display: block;
    }
}

/* About page */

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
}

.about-content h1 {
    color: #3b3b3b;
    margin-bottom: 30px;
    font-size: 2em;
}

.about-content h2 {
    color: #3b3b3b;
    margin: 30px 0 15px;
    font-size: 1.5em;
}

.about-content p {
    color: #3b3b3b;
    margin-bottom: 15px;
    line-height: 1.8;
}

/* Product page */

.product-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.product-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
}

.product-content h2 {
    color: #3b3b3b;
    font-size: 1.5em;
    margin-bottom: 20px;
}

.product-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.product-title {
    color: #3b3b3b;
    font-size: 2em;
    margin-bottom: 20px;
}

.product-description {
    color: #3b3b3b;
    line-height: 1.8;
    margin-bottom: 30px;
}

.buy-button {
    display: inline-block;
    background-color: #ff9900;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.buy-button:hover {
    background-color: #ff8800;
}

.sidebar.active {
    left: 0;
}
