body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

header {
    background-color: #ff6f61; /* Coral color */
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

header .tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: flex;
    flex-wrap: wrap; /* Allow sidebar to wrap on small screens */
    padding: 1rem;
    gap: 1rem;
}

#menu-section {
    flex: 3; /* Takes 3/4 of the space */
    min-width: 300px; /* Minimum width before wrapping */
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#sidebar {
    flex: 1; /* Takes 1/4 of the space */
    min-width: 280px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#cart-section, #status-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h2 {
    color: #ff6f61;
    margin-top: 0;
    border-bottom: 2px solid #ffe0dd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    background-color: #fff;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.product-card h3 {
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: #444;
}

.product-card .price {
    font-weight: bold;
    color: #28a745; /* Green for price */
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.add-to-cart-btn, .cta-button, #clear-cart-btn {
    background-color: #ff6f61;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    width: 100%;
    margin-top: auto; /* Pushes button to bottom in flex container */
}

.add-to-cart-btn:hover, .cta-button:hover, #clear-cart-btn:hover {
    background-color: #e65a50;
}

#clear-cart-btn {
    background-color: #777;
    margin-top: 0.5rem;
}
#clear-cart-btn:hover {
    background-color: #555;
}

#cart-items .cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

#cart-items .cart-item:last-child {
    border-bottom: none;
}

.cart-item-details {
    flex-grow: 1;
}
.cart-item-details span {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.cart-item-controls button {
    background: none;
    border: 1px solid #ddd;
    color: #333;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    margin: 0 0.2rem;
    border-radius: 3px;
}
.cart-item-controls button:hover {
    background-color: #f0f0f0;
}


#cart-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ffe0dd;
}

#cart-summary p {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}

#cart-summary p strong {
    font-size: 1.2rem;
    color: #333;
}
#cart-summary p strong span {
    color: #ff6f61;
}

#order-status-container {
    text-align: center;
}

#order-status-message {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

#progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 1rem;
    overflow: hidden; /* Ensures inner bar respects border radius */
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: #4CAF50; /* Green progress */
    text-align: center;
    line-height: 20px;
    color: white;
    border-radius: 5px 0 0 5px; /* Smooth edge for progress */
    transition: width 0.5s ease-in-out;
}

#order-status-stages {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

#order-status-stages li {
    padding: 0.3rem 0;
    color: #888; /* Default inactive color */
    opacity: 0.6;
    transition: color 0.3s ease, opacity 0.3s ease;
}

#order-status-stages li.active {
    color: #ff6f61;
    font-weight: bold;
    opacity: 1;
}

#order-status-stages li.completed::before {
    content: '✓ ';
    color: #4CAF50;
}


footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #333;
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 2rem;
}
footer p {
    margin: 0.3rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    header h1 {
        font-size: 2rem;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    .product-card img {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    .product-card img {
        height: 150px; /* Slightly larger image in single column */
    }
    header {
        padding: 1rem 0.5rem;
    }
    #menu-section, #cart-section, #status-section {
        padding: 1rem;
    }
}

