/* --- Main Form & Thank You Container --- */
.order-form-wrapper {
    max-width: 700px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Contains child margins */
}
.order-form-container, #hoanggia-thank-you {
    padding: 20px 30px;
}

/* --- Form Elements --- */
.order-form-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}
.form-group {
    margin-bottom: 15px;
}
.form-row-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.order-form-container input[type="text"],
.order-form-container input[type="tel"],
.order-form-container textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

/* --- Product Table --- */
.product-table-wrapper {
    overflow-x: auto;
}
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.product-table th, .product-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}
.product-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}
.product-table td[data-label="Sản phẩm"] {
    text-align: left;
}
.quantity-input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.qty-input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ccc;
    margin: 0 5px;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-button {
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    line-height: 1;
}
.text-right {
    text-align: right !important;
    padding-right: 20px !important;
}
.total-row {
    font-weight: bold;
    font-size: 1.2em;
}

/* --- Submit Button --- */
.submit-button-wrapper {
    text-align: center;
    margin-top: 20px;
}
.submit-button {
    background-color: #d9534f;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.2s;
}
.submit-button:hover {
    background-color: #c9302c;
}

/* --- Thank You Message --- */
#hoanggia-thank-you {
    display: none;
    border-top: 2px solid #28a745;
    text-align: center;
}
.thank-you-title {
    color: #28a745;
    margin-top: 0;
}

/* --- Responsive for Mobile --- */
@media screen and (max-width: 600px) {
    .form-row-2-cols {
        grid-template-columns: 1fr;
    }
    .product-table thead {
        display: none;
    }
    .product-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }
    .product-table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted #ccc;
    }
    .product-table td:last-child {
        border-bottom: none;
    }
    .product-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
    .product-table td.text-right {
        text-align: right !important;
    }
}