* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: rgb(37, 153, 231);
}
header {
    display: block;
    background-color: white;
    width: 100%;
    border-bottom: 1px solid gray;
    background-size: cover;
    background-position: center;
}
.row {
    direction: ltr;
}
.category {
    color: #fff;
}
.search {
    display: flex;
    justify-content: center;
    align-items: center;
}
#search{
    width: 500px;
    border: none;
    border-radius: 100px;
    padding: 10px 18px;
    border: 1px solid #2c2f2c;
    font-size: 14px;
    transition: all 0.2s;
    margin: 10px;
}
.category {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0 20px auto;
}
.button {
    display: flex;
    flex-direction: row;
}
.btn {
    background-color: white;
    margin: 10px;
    padding: 10px;
    border-radius: 10px;
}
ul {
    padding: 0;
    margin: 0;
    font-family: monospace;
    list-style: none;
    display: flex;
    justify-content: center;
}
ul li {
    display: inline-block;
    position: relative;
}
ul li a {
    display: block;
    padding: 20px 25px;
    text-decoration: none;
    text-align: center;
    font-size: 20px;
}

ul li ul.dropdown {
   width: 100%;
   position: absolute;
   z-index: 999;
   display: none; 
   background-color: white;
   text-align: center;
}
ul li:hover ul.dropdown {
    display: block;
}
.product-container {
    max-width: 1400px;
    margin: 0 auto;  
    padding: 0 20px; 
    
}
.product {
    margin: 30px auto;
    display: flex;
    justify-content: center;
}
.product-grid{
    display: grid;
    grid-template-columns: repeat(5, minmax(200px, 240px));
    gap: 15px;
    justify-content: center;
    margin: 30px auto;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
}
.merchandise {
    line-height: 1.5;
}
.product-grid .product-card{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
    background: white;
    border: 1.5px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* max-width: 28px; */
    margin: 0 auto;
}
.product-grid .product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
    flex-shrink: 0;
}

.product-grid .product-card .card-body {
    flex: 1;
    display: flex;
    padding: 15px;
    text-align: center;
    flex-direction: column;
    background: white;
    min-height: 0;
}
.product-grid .product-card p {
    flex: 1;
    margin: 0 0 15px 0;
    font-size: 15px;
    line-height: 1.45;
    /* height: 65px;
    max-height: 85px; */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-word;
}
.product-grid .product-card button {
    width: max-content;
    margin: 0 auto;
    padding: 12px;
    display: flex;
    align-items: center;
    background: rgb(237, 130, 49);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 0;
    transition: background 0.2s;
    justify-content: center;
}

@media (max-width: 425px) {
    header {
        margin: auto;
        width: 100vh;
        display: flex;
    }
    header ul {
        display: flex;
        justify-content: center;
    }
    .product-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        justify-items: center;
        
    }
    .product-card {
        width: max-content;
    }
}

@media (max-width: 820px) {
    .product-grid{
        display: grid;
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        gap: 15px;
        justify-content: center;
        margin: 30px;
        align-items: stretch;
    }
    .product-grid .product-card{
        display: flex;
        flex-direction: column;
        background: white;
        border: 1.5px solid white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        width: 100%;
        height: 100%;
        overflow: hidden;
        /* max-width: 28px; */
        margin: 0 auto;
    }
    .product-grid .product-card img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        overflow: hidden;
        flex-shrink: 0;
    }

    .product-grid .product-card .card-body {
        flex: 1;
        display: flex;
        padding: 15px;
        text-align: center;
        flex-direction: column;
        background: white;
        min-height: 0;
    }
    .product-grid .product-card p {
        flex: 1;
        margin: 0 0 15px 0;
        font-size: 10px;
        line-height: 1.45;
        /* height: 65px;
        max-height: 85px; */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
        word-break: break-word;
    }
    .product-grid .product-card button {
        width: max-content;
        margin: 0 auto;
        padding: 12px;
        display: flex;
        align-items: center;
        background: rgb(237, 130, 49);
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 10px;
        cursor: pointer;
        margin-top: 0;
        transition: background 0.2s;
        justify-content: center;
    }
}
@media (min-width: 1024px) {
    .product-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(180px, 1fr));
        gap: 15px;
        margin: 20px auto;
    }
    .product-card{
        height: max-content;
    }
}