body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f7;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #333;
}

.pos-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

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

.product-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.product-card:active {
    transform: scale(0.95);
}

.product-card h3 {
    margin: 10px 0 5px;
}

.product-card p {
    color: #666;
    margin: 0;
}

.cart-panel {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.cart-panel h2 {
    margin-top: 0;
}

#cartItems {
    list-style: none;
    padding: 0;
    flex-grow: 1;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-total {
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
    margin-bottom: 20px;
}

#checkoutBtn {
    background-color: #007aff;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
}

#checkoutBtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    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: 30px;
    border-radius: 15px;
    width: 300px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007aff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#closeModalBtn {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #007aff;
    color: white;
    cursor: pointer;
}
