* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(45deg, #ff6347, #ff8c00), linear-gradient(135deg, #ff4500, #ff6347);
    background-size: 100% 100%, 100% 100%;
    background-position: 0 0, 100% 0;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 2em 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3em;
    margin-bottom: 0.2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-icons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-icons a {
    color: white;
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-icons a:hover {
    color: #ffd700;
}

.my-orders-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
}

.my-orders-btn i {
    margin-right: 5px;
}

.my-orders-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.category-nav {
    position: sticky;
    top: 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.category-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #ff6347;
    border-radius: 20px;
    margin-right: 10px;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.search-container.expanded {
    width: 200px;
    background-color: white;
    border: 1px solid #ff6347;
}

#search-icon {
    color: white;
    cursor: pointer;
    font-size: 1em;
    padding: 5px;
    transition: color 0.3s ease;
}

.search-container.expanded #search-icon {
    color: #ff6347;
}

#search-input {
    display: none;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9em;
    width: 0;
    transition: width 0.3s ease;
}

.search-container.expanded #search-input {
    display: block;
    width: 150px;
    margin-left: 5px;
}

.category-scroll button {
    background-color: #ff6347;
    color: white;
    border: none;
    padding: 8px 15px;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.category-scroll button:hover,
.category-scroll button.active {
    background-color: #e04a31;
}

#menu {
    padding: 1em;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.menu-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.menu-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 1em;
    padding: 1em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: calc(50% - 0.5em);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    position: relative;
    padding-bottom: 40px;
}

.menu-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
}

.menu-item h3 {
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #ff6347;
}

.menu-item p {
    margin-top: 0.3em;
    font-size: 0.8em;
    color: #555;
}

.add-to-cart {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 80%;
}

.add-btn, .quantity-selector {
    background-color: white;
    color: #4CAF50;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    width: 100%;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.add-btn {
    color: #006400; 
}

.quantity-selector {
    display: none;
    justify-content: space-between;
    align-items: center;
}

.quantity-selector button {
    background-color: transparent;
    color: #006400;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 10px;
}

.quantity {
    display: inline-block;
    text-align: center;
    color: #006400;
    font-weight: bold;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
    margin-top: auto;
}

footer p {
    font-size: 1em;
}

.heart {
    color: #ff6347;
    font-size: 1.2em;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (min-width: 769px) {
    .menu-item {
        width: calc(33.33% - 1em);
    }
}

.cart-info {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 80%;
    max-width: 300px;
    text-align: center;
}

#cart-count {
    float: left;
}

#view-cart {
    float: right;
    cursor: pointer;
}

.cart-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cart-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

.cart-content h2 {
    color: #ff6347;
    margin-bottom: 20px;
}

#cart-items {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.cart-item-name {
    flex-grow: 1;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    background-color: #ff6347;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 3px;
}

.cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#cart-total {
    font-weight: bold;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
}

#close-cart, #confirm-order {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#close-cart {
    background-color: #f0f0f0;
    color: #333;
}

#confirm-order {
    background-color: #4CAF50;
    color: white;
}

#confirm-order:hover {
    background-color: #45a049;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-content h2 {
    color: #ff6347;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.modal-content select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 98%;
    background-position-y: 50%;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#cancel-order {
    background-color: #f0f0f0;
    color: #333;
}

#submit-order {
    background-color: #4CAF50;
    color: white;
}

#cancel-order:hover {
    background-color: #e0e0e0;
}

#submit-order:hover {
    background-color: #45a049;
}

#close-confirmation {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

#close-confirmation:hover {
    background-color: #45a049;
}

.modal-content p {
    text-align: center;
    margin-bottom: 20px;
}

.order-item {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.view-details {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    margin-left: 50px;
    cursor: pointer;
}

#order-list {
    max-height: 300px;
    overflow-y: auto;
}

/* New styles for improved order history and details */
.order-history-modal .modal-content,
.order-details-modal .modal-content {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.order-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-item h3 {
    color: #ff6347;
    margin-bottom: 10px;
}

.order-item p {
    margin: 5px 0;
}

.view-details {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.view-details:hover {
    background-color: #45a049;
}

#order-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.order-details-modal ul {
    list-style-type: none;
    padding: 0;
}

.order-details-modal li {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
}

#close-history,
#close-details {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

#close-history:hover,
#close-details:hover {
    background-color: #e55a3c;
}

#view-orders {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

#view-orders:hover {
    background-color: #45a049;
}
.phone-input-container {
    display: flex;
    align-items: stretch;
    margin-bottom: 15px;
}

.phone-prefix {
    background-color: #f0f0f0;
    padding: 10px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
}

#customer-phone {
    padding-left: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 20px;
}
#view-order-details {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    margin-left: 40px;
    transition: background-color 0.3s;
}

#view-order-details:hover {
    background-color: #45a049;
}
.no-orders-message {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

.no-orders-message p {
    margin: 0;
}