/* ========================================
   CHECKOUT PAGE
======================================== */

.checkout-page {
    background: var(--bg-light);
    padding: var(--space-2xl) 0;
    min-height: calc(100vh - 80px);
}

.checkout-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.checkout-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
}

.checkout-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.checkout-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.checkout-section {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.checkout-section:last-of-type {
    border-bottom: none;
}

.checkout-section h3 {
    margin-bottom: var(--space-lg);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

/* Recap */
.checkout-recap {
    background: var(--bg-light);
}

.recap-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.recap-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
}

.recap-qty {
    color: var(--primary);
    font-weight: 600;
    min-width: 30px;
}

.recap-name {
    flex: 1;
    color: var(--text-dark);
}

.recap-price {
    font-weight: 500;
    color: var(--text-dark);
}

/* Delivery mode cards */
.delivery-mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.delivery-mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg);
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    text-align: center;
}

.delivery-mode-card:hover {
    border-color: var(--primary-light);
    background: var(--card-bg);
}

.delivery-mode-card.active {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 4px 20px rgba(229, 57, 53, 0.15);
}

.delivery-mode-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.delivery-mode-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-sm);
}

.delivery-mode-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.delivery-mode-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.delivery-mode-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.delivery-mode-check {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-fast);
}

.delivery-mode-card.active .delivery-mode-check {
    opacity: 1;
    transform: scale(1);
}

/* Time selection */
.time-selection {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.time-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.time-option:hover {
    border-color: var(--primary-light);
    background: var(--card-bg);
}

.time-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--card-bg);
}

.time-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.time-label {
    font-weight: 500;
    color: var(--text-dark);
}

.time-estimate {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: auto;
}

.custom-time-picker {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

/* Pickup info */
.pickup-info {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.pickup-info-icon {
    font-size: 2rem;
}

.pickup-info-content {
    flex: 1;
}

.pickup-info-content strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-dark);
}

.pickup-info-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Payment methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.payment-method:hover:not(.disabled) {
    border-color: var(--primary-light);
    background: var(--card-bg);
}

.payment-method.active {
    border-color: var(--primary);
    background: var(--card-bg);
}

.payment-method.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-method-icon {
    font-size: 1.75rem;
}

.payment-method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.payment-method-name {
    font-weight: 600;
    color: var(--text-dark);
}

.payment-method-soon {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.payment-method-check {
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: all var(--transition-fast);
}

.payment-method.active .payment-method-check {
    opacity: 1;
}

/* Checkout footer */
.checkout-footer {
    padding: var(--space-xl);
    background: var(--bg-dark);
    color: var(--text-light);
}

.checkout-totals {
    margin-bottom: var(--space-lg);
}

.checkout-totals .order-total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.checkout-totals .order-total-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
}

.checkout-footer .btn-primary {
    background: var(--primary);
    font-size: 1rem;
}

.checkout-footer .btn-primary:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .delivery-mode-cards {
        grid-template-columns: 1fr;
    }

    .checkout-wrapper {
        padding: 0 var(--space-sm);
    }

    .checkout-section {
        padding: var(--space-lg);
    }
}