/* Address Selection Grid */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.address-option-card {
    position: relative;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    display: flex;
    flex-direction: column;
}

.address-option-card:hover {
    border-color: #ccc;
    background: #FAFAFA;
}

/* Hide default radio */
.address-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected State */
.address-option-card:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 4px 12px rgba(255, 179, 3, 0.1);
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.address-name {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.address-check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.address-check-icon::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s;
}

.address-option-card input:checked~.address-card-header .address-check-icon {
    border-color: var(--color-primary);
}

.address-option-card input:checked~.address-card-header .address-check-icon::after {
    transform: scale(1);
}

.address-details {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* New Address Button variant */
.address-option-card.new-address {
    border-style: dashed;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    background: #FAFAFA;
}

.address-option-card.new-address:hover {
    border-color: var(--color-primary);
    background: #fff;
}

.new-address-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-weight: 600;
}

.plus-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* Refined Form Styling */
.form-section {
    padding: 2.5rem;
    border: 1px solid #EBE5D9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
    letter-spacing: -0.02em;
}

/* Payment Method Modern */
.payment-grid {
    display: grid;
    gap: 1rem;
}

.payment-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
}

.payment-card:hover {
    border-color: #ccc;
}

.payment-card:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.payment-card input {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
    margin-right: 1.2rem;
}

.payment-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 0.2rem;
}

.payment-info span {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Checkout Stepper */
.checkout-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4rem 0 5rem 0;
    /* Increased top/bottom margin */
    gap: 1rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
    font-weight: 600;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step.active {
    color: var(--color-primary-dark);
}

.step-number {
    width: 28px;
    height: 28px;
    background: #E0E0E0;
    color: #757575;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.step.active .step-number {
    background: var(--color-primary);
    color: #2D2720;
    box-shadow: 0 4px 10px rgba(255, 179, 3, 0.3);
}

.step-divider {
    width: 40px;
    height: 2px;
    background: #E0E0E0;
}

.step.completed .step-number {
    background: var(--color-success);
    color: #fff;
}

/* Summary with Thumbnails */
.summary-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px dashed #eee;
}

.summary-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
    border: 1px solid #eee;
    flex-shrink: 0;
    position: relative;
}

.summary-qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-secondary);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.summary-info {
    flex: 1;
}

.summary-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-secondary);
    display: block;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.summary-variant {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.summary-price {
    font-weight: 700;
    color: var(--color-secondary);
    font-size: 0.95rem;
}

/* Payment Icons */
.payment-icon-wrapper {
    width: 40px;
    display: flex;
    justify-content: center;
    color: var(--color-text-light);
}

.payment-card.active-method .payment-icon-wrapper {
    color: var(--color-primary-dark);
}

/* Summary Card Sticky Refined */
.summary-card {
    border: 1px solid #EBE5D9;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--color-text);
}

.summary-row.total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #eee;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-secondary);
    font-family: var(--font-heading);
}

/* Form placeholders */
::placeholder {
    color: #bbb;
    opacity: 1;
}

@media (max-width: 768px) {
    .address-grid {
        grid-template-columns: 1fr;
    }
}