/* Product page/shop page css*/

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to left, #1f1f1f, #262626);
    color: #f2f2f2;
}

h1, h3, h4 {
    color: #ff9000;
    margin: 0;
}

a {
    text-decoration: none;
    color: #ff9000;
}

a:hover {
    text-decoration: underline;
}


header {
    background-color: #111;
    border-bottom: 1px solid #444;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.product-header {
    padding: 20px;
    background-color: #1f1f1f;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.product-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ff9000;
}

.product-header p {
    font-size: 1rem;
    color: #dadada;
}

.sort-by-section {
    padding: 20px;
    background-color: #1f1f1f;
    border-bottom: 1px solid #444;
    margin-bottom: 20px; /* addd space below the sort by section */
    display: flex;
    align-items: center;
    gap: 10px; /* Sspace between the label and  the dropdown menu*/
    transform: translateX(2px);   /* move to right very little*/
}

.main-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
}


.filter-section {
    width: 250px;
    flex-shrink: 0;
    background-color: #222;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.filter-section h3, .filter-section h4 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #ff9000;
}

.filter-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.filter-section ul li {
    margin-bottom: 10px;
}

.filter-section form {
    margin-top: 20px;
}

.filter-btn {
    display: block;
    background: linear-gradient(to right, #ff7700, #ff9000);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.filter-btn:hover {
    background: linear-gradient(to right, #ff9c47, #ffad00);
}

label {
    font-size: 0.9rem;
    color: #f2f2f2;
}

.product-content {
    flex: 1;
    min-width: 0; /* Ensures flex items don't expand beyond container */
}

.sort-by-section {
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    width: 100%;
}

.product-wrapper {
    display: flex;
    flex-direction: column;
}

.product-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    border-radius: 5px;
    text-align: center;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    width: 100%;
    position: relative;
    padding-bottom: 100%; /* Creates a square aspect ratio */
    overflow: hidden;
    margin-bottom: 10px;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures image maintains aspect ratio */
}

.product-item h3.product-brand {
    margin: 5px 0;
}


.product-item h3.product-name {
    margin: 5px 0;
    color: white;
}

.product-item p.product-price {
    margin-top: auto;
    font-weight: bold;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 144, 0, 0.5);
}

#search-bar {
    width: 50%;
    padding: 8px 8px;
    background-color: #1f1f1f;
    color: white;
    border-color: #888;
}

#search-bar:focus {
    outline: none;
    border-color: #ff9000;
}


footer {
    background-color: #111;
    color: #888;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: #ff7700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .filter-section {
        width: 100%;
        float: none;
        border-right: none;
        margin-bottom: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}
