/* Checkout Layout & Styling */
.checkout-page {
    background-color: #f8fafc;
    min-height: 80vh;
}

.checkout-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

.checkout-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Controls */
.form-label-custom {
    font-size: 0.815rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-control-custom {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.95rem;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.form-control-custom:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    background-color: #ffffff;
    outline: none;
}

/* Auth Mode Switcher */
.checkout-auth-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.checkout-auth__option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: all 0.2s ease;
}

.checkout-auth__option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-auth__option:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.checkout-auth__option.is-active {
    border-color: #0f172a;
    background-color: #f8fafc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.checkout-auth__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkout-auth__option.is-active .checkout-auth__icon {
    background: #0f172a;
    color: #ffffff;
}

.checkout-auth__meta {
    flex-grow: 1;
}

.checkout-auth__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
}

.checkout-auth__desc {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

.checkout-auth__hint {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Order Summary Sticky Panel */
.summary-card {
    position: sticky;
    top: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.order-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.order-item:first-of-type {
    padding-top: 0;
}

.order-item-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.order-item-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.order-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
}

/* Shipping Option Cards */
.shipping-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    display: block;
}

.shipping-card:hover {
    border-color: #cbd5e1;
}

.shipping-card.active {
    border-color: #0f172a;
    background-color: #f8fafc;
}

.shipping-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shipping-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shipping-card.active .shipping-icon {
    background: #0f172a;
    color: #ffffff;
}

.shipping-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.15rem;
}

.shipping-sub {
    font-size: 0.775rem;
    color: #64748b;
}

.shipping-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.shipping-card.active .shipping-check {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* Select2 Container */
.select2-container--default .select2-selection--single {
    height: 48px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: normal;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    outline: none;
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__rendered {
    color: #94a3b8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent;
    border-width: 5px 4px 0 4px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #0f172a transparent;
    border-width: 0 4px 5px 4px;
}

.select2-dropdown {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 1055;
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #0f172a;
}

.select2-container--default .select2-results__option {
    font-size: 0.9rem;
    padding: 8px 12px;
    color: #1e293b;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0f172a;
    color: #ffffff;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
}

.select2-selection.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Chrome, Safari, Edge, Opera */
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button,
.checkout-qty-input::-webkit-outer-spin-button,
.checkout-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox & Standard */
.cart-qty-input,
.checkout-qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}
