body {
    font-family: 'Inter', sans-serif;
    background: #f4f4f4;
    color: #333;
}

.container { max-width: 1400px; margin: 0 auto; padding: 40px 24px; }

/* Progress Bar */
.progress-container { max-width: 800px; margin: 0 auto 40px; }
.checkout-progress { display: flex; justify-content: space-between; position: relative; list-style: none; }
.checkout-progress::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: #ddd; transform: translateY(-50%); }
.checkout-progress li { flex: 1; text-align: center; position: relative; }
.progress-step { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid #ddd; color: #aaa; font-weight: 600; transition: all 0.4s ease; margin-bottom: 8px; }
.checkout-progress li.active .progress-step { border-color: #3498db; background: #3498db; color: white; transform: scale(1.1); }
.checkout-progress li.completed .progress-step { border-color: #2ecc71; background: #2ecc71; color: white; }
.step-label { font-size: 13px; color: #888; }

/* Main Layout */
.main-grid { display: grid; grid-template-columns: 1fr 450px; gap: 30px; }
.form-section, .order-summary { background: white; border-radius: 16px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.section-title, .summary-title { font-size: 24px; font-weight: 600; margin-bottom: 24px; }

/* Form Styles */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; transition: border-color 0.3s, box-shadow 0.3s; }
.form-control:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1); outline: none; }

/* Order Summary */
.order-summary { position: sticky; top: 20px; }
.order-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eee; }
.order-item-img { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; background: #f9f9f9; }
.item-info { flex-grow: 1; }
.item-info h4 { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.item-qty { font-size: 13px; color: #888; }
.item-price { font-size: 16px; font-weight: 600; }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; }
.summary-row.total { font-size: 18px; font-weight: 700; margin-top: 10px; padding-top: 15px; border-top: 2px solid #333; }
.btn-place-order { width: 100%; padding: 16px; background: #333; color: white; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s; margin-top: 20px; }
.btn-place-order:hover { background: #000; }
.secure-badge { text-align: center; margin-top: 15px; font-size: 13px; color: #888; }
.secure-badge i { color: #2ecc71; margin-right: 5px; }

/* Shipping Address Collapse Styles */
.toggle-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 20px 0 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-section:hover {
    background: #e9ecef;
}

.toggle-section h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-section h4 i {
    color: #0066cc;
}

.toggle-icon {
    color: #666;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.toggle-icon.fa-chevron-up {
    transform: rotate(0deg);
}

.toggle-icon.fa-chevron-down {
    transform: rotate(0deg);
}

/* Collapsible Content */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-bottom: 20px;
}

.collapsible-content.active {
    max-height: 1000px; /* Adjust based on content */
}

/* Order Item Styles */
.order-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    border: 1px solid #eee;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #333;
    font-weight: 500;
}

.item-qty {
    font-size: 13px;
    color: #666;
}

.item-price {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.summary-row.total {
    border-bottom: none;
    border-top: 2px solid #333;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: 700;
}

/* Payment Messages */
.payment-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.payment-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

/* Button Loading State */
.btn-place-order {
    position: relative;
    min-height: 48px;
}

.btn-place-order.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-place-order.loading .btn-text {
    display: none;
}

.btn-place-order .btn-loader {
    display: none;
}

.btn-place-order.loading .btn-loader {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles for Auth Messages */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Spinner for Loading States */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.125em;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}