* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    display: flex;
    flex-direction: column;
    font-family: 'Lucida Sans', Geneva, Verdana, sans-serif;
}

/* Header */
header {
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    box-shadow: 0 0 5px 2px black;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
}

#left{
    height: 100%;
    width: 80%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

#right{
    height: 100%;
    width: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#right a{
    text-decoration: none;
    color: black;
}
#cart_logo{
    border-radius: 50%;
    box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.837);
    padding: 15px;
    font-size: 1.5rem;
}


/* Main */
main {
    min-height: 90vh;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Topic card */
.topic-card {
    width: 90%;
    box-shadow: 0 0 5px 1px rgba(0,0,0,0.4);
    border-radius: 40px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Topic header */
.topic-header {
    width: 100%;
    font-size: x-large;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}
/* Items container */
.items {
    width: 95%;
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    padding: 5px 10px;
}

/* Product */
.product {
    min-height: 80px;
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 0 1px 1px black;
    box-shadow: inset 0px 0px 5px 0.5px black;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.productDetail{
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product_name{
    font-size: 1rem;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    width: 100%;
    text-align: center;
}
.qut_name{
    font-size: medium;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.product.selected {
    background-color: #4CAF50;
    color: white;
    box-shadow: inset 0px 0px 25px 1px black;
}

/* Quantity */
.qty-box {
    min-width: 45%;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.qty-box button {
    width: 28px;
    border-radius: 50%;
    border: none;
    background: green;
    color: white;
    
    cursor: pointer;
}

/* Custom inputs */
.items input,
.items select {
    height: 35px;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 0 10px;
}

.items button {
    height: 35px;
    border-radius: 20px;
    border: none;
    background: green;
    color: white;
}

/* Add to cart */
#addCart {
    width: 90%;
    margin-top: 20px;
    height: 50px;
    border-radius: 25px;
    background: black;
    color: white;
    font-size: 18px;
    border: none;   
}
/* Fix select dropdown UI */
.items select {
    width: 40%;
    height: 35px;
    border-radius: 20px;
    border: 1px solid #ccc;
    padding: 0 12px;
    font-size: 14px;
    background-color: white;

    /* remove default browser style */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* custom arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpolygon points='0,0 14,0 7,8' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* prevent overflow on mobile */
.items {
    overflow: hidden;
}

/* cart msg */
#cart_alert {
    position: fixed;
    top: 20px;
    text-align: center;
    align-self: center;
    min-width: 220px;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: large;
    color: white;
    display: none;
    z-index: 999;
    animation: fadeInOut 2s forwards;
}

.success {
    background: #28a745;
}

.error {
    background: #dc3545;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

