/* --- Biến và cài đặt chung --- */
:root {
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-300: #cbd5e1;
    --color-slate-500: #64748b;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-white: #ffffff;
    --color-blue-50: #eff6ff;
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-slate-50);
    color: var(--color-slate-800);
    margin: 0;
}

/* --- Layout chung --- */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

/* --- Header --- */
.header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    height: 2rem;
    width: 2rem;
    color: var(--color-blue-600);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-slate-800);
}

.support-info {
    font-size: 0.875rem;
    color: var(--color-slate-500);
}

.phone-number {
    font-weight: 600;
    color: var(--color-blue-600);
}

/* --- Main Content --- */
.page-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.checkout-container {
    max-width: 42rem; /* Tương đương max-w-2xl */
    margin-left: auto;
    margin-right: auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-slate-800);
}

.page-subtitle {
    margin-top: 0.5rem;
    color: var(--color-slate-500);
}

/* --- Form --- */
.checkout-form > * + * {
    margin-top: 2rem;
}

.form-section > * + * {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.form-group-wrapper > * + * {
    margin-top: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-slate-700);
    margin-bottom: 0.25rem;
}

.form-input, .form-textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-slate-300);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* --- Payment Options --- */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.payment-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--color-slate-300);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.radio-input {
    height: 1rem;
    width: 1rem;
    color: var(--color-blue-600);
    border-color: var(--color-slate-300);
}
.radio-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}
.option-label {
    margin-left: 0.75rem;
    font-weight: 500;
    color: var(--color-slate-700);
}

.payment-option:has(.radio-input:checked) {
    background-color: var(--color-blue-50);
    border-color: var(--color-blue-500);
}


/* --- Order Summary --- */
.order-items > * + * {
    margin-top: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.375rem;
    object-fit: cover;
}

.product-name {
    font-weight: 600;
    color: var(--color-slate-800);
}

.product-quantity {
    font-size: 0.875rem;
    color: var(--color-slate-500);
}

.product-price {
    font-weight: 600;
}

.order-summary {
    border-top: 1px solid var(--color-slate-200);
    margin-top: 1rem;
    padding-top: 1rem;
}
.order-summary > * + * {
     margin-top: 0.75rem;
}
.summary-row {
    display: flex;
    justify-content: space-between;
}
.summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
}
.font-medium {
    font-weight: 500;
}

/* --- Buttons --- */
.submit-button-container {
    margin-top: 2rem;
}
.delete-button-container {
    text-align: center;
}
.submit-button {
    width: 100%;
    background-color: var(--color-blue-600);
    color: var(--color-white);
    font-weight: 600;
    font-size: 1.125rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
.submit-button:hover {
    background-color: var(--color-blue-700);
}

/* Footer */
.site-footer {
  background-color: #1e293b;
  color: #ffffff;
  margin-top: 4rem;
}
.footer-bottom {
  border-top: 1px solid #334155;
  padding: 1.5rem 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}


/* --- Responsive --- */
@media (min-width: 640px) {
    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}