/* ===========================
   CHECKOUT & ORDER SUCCESS STYLES
   =========================== */

/* Checkout Progress Steps */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.progress-step.completed .step-icon {
    background: linear-gradient(135deg, var(--navy) 0%, var(--golden) 100%);
    color: white;
}

.progress-step.active .step-icon {
    background-color: var(--navy);
    color: var(--golden);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.step-label {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

.progress-step.active .step-label {
    color: var(--navy);
}

.progress-line {
    width: 80px;
    height: 3px;
    background-color: #e5e7eb;
    margin: 0 16px;
    position: relative;
    top: -20px;
}

.progress-line.completed {
    background: linear-gradient(90deg, var(--navy) 0%, var(--golden) 100%);
}

/* Checkout Cards */
.checkout-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.checkout-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.checkout-card-title i {
    color: var(--navy);
}

/* Guest Prompt */
.guest-prompt {
    background: linear-gradient(135deg, rgba(0, 41, 147, 0.05) 0%, rgba(188, 158, 80, 0.05) 100%);
    border: 2px solid var(--navy);
}

.guest-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--golden) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.checkout-login-btn {
    padding: 10px 28px;
    background-color: var(--navy);
    color: var(--golden);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.checkout-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 41, 147, 0.25);
}

/* Saved Addresses */
.saved-addresses {
    margin-bottom: 24px;
}

.saved-addresses-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.saved-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.saved-address-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.saved-address-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.saved-address-content {
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: white;
}

.saved-address-card input[type="radio"]:checked + .saved-address-content {
    border-color: var(--navy);
    background-color: rgba(0, 41, 147, 0.02);
    box-shadow: 0 4px 12px rgba(0, 41, 147, 0.1);
}

.saved-address-card:hover .saved-address-content {
    border-color: var(--golden);
}

.saved-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.address-label {
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.default-badge {
    background-color: var(--golden);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.address-name {
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.address-text {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.address-mobile {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 600;
}

.add-new-address-btn {
    width: 100%;
    padding: 14px;
    background-color: #f3f4f6;
    color: var(--navy);
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-new-address-btn:hover {
    background-color: rgba(0, 41, 147, 0.05);
    border-color: var(--navy);
}

/* Form Elements */
.checkout-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.checkout-input,
.checkout-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
}

.checkout-input:focus,
.checkout-select:focus {
    outline: none;
    border-color: var(--navy);
    background-color: rgba(0, 41, 147, 0.02);
}

.checkout-error {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #ef4444;
    font-weight: 600;
}

/* Address Type Options */
.address-type-options {
    display: flex;
    gap: 12px;
}

.address-type-btn {
    position: relative;
    cursor: pointer;
    flex: 1;
}

.address-type-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.address-type-btn span {
    display: block;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
}

.address-type-btn input[type="radio"]:checked + span {
    border-color: var(--navy);
    background-color: rgba(0, 41, 147, 0.05);
    color: var(--navy);
}

.address-type-btn:hover span {
    border-color: var(--navy);
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.payment-method-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.payment-method-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: white;
}

.payment-method-card input[type="radio"]:checked + .payment-method-content {
    border-color: var(--navy);
    background-color: rgba(0, 41, 147, 0.02);
    box-shadow: 0 4px 12px rgba(0, 41, 147, 0.1);
}

.payment-method-card:hover .payment-method-content {
    border-color: var(--golden);
}

.payment-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.payment-icon.cod {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.payment-icon.online {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.payment-icon.upi {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.payment-method-title {
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.payment-method-desc {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Checkout Summary */
.checkout-summary {
    position: sticky;
    top: 100px;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.checkout-summary-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 20px;
}

.summary-products {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

.summary-products::-webkit-scrollbar {
    width: 6px;
}

.summary-products::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

.summary-product-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #f9fafb;
}

.summary-product-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.summary-product-details {
    flex: 1;
}

.summary-product-details h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.summary-product-details p {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 2px;
}

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

.summary-breakdown {
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #4b5563;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
    margin-bottom: 0;
}

.summary-delivery-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f0fdf4;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-delivery-info i {
    color: #10b981;
    font-size: 20px;
}

.summary-delivery-info p {
    font-size: 0.85rem;
    color: #065f46;
}

.place-order-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--navy);
    color: var(--golden);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.place-order-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 41, 147, 0.25);
}

.place-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.security-badges {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.security-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.security-badge i {
    color: var(--golden);
    font-size: 24px;
}

.security-badge span {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

/* ===========================
   ORDER SUCCESS PAGE
   =========================== */

.order-success-section {
    min-height: 80vh;
    background: linear-gradient(135deg, rgba(0, 41, 147, 0.02) 0%, rgba(188, 158, 80, 0.02) 100%);
}

.success-header {
    text-align: center;
    margin-bottom: 48px;
}

.success-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 32px;
}

.success-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
    z-index: 2;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.success-rings span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #10b981;
    border-radius: 50%;
    animation: ringExpand 2s ease-out infinite;
}

.success-rings span:nth-child(1) {
    animation-delay: 0s;
}

.success-rings span:nth-child(2) {
    animation-delay: 0.5s;
}

.success-rings span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes ringExpand {
    0% {
        width: 120px;
        height: 120px;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.success-title {
    font-size: 3rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.success-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.order-id {
    font-size: 1.1rem;
    color: #4b5563;
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.order-id strong {
    color: var(--navy);
    font-weight: 800;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-details-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.order-info-section {
    text-align: center;
}

.info-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--golden) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.info-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
}

.info-text {
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.95rem;
}

.order-total-card {
    background: linear-gradient(135deg, var(--navy) 0%, rgba(0, 41, 147, 0.9) 100%);
    color: white;
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 41, 147, 0.2);
    animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

.total-label {
    font-size: 1.25rem;
    font-weight: 600;
}

.total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--golden);
}

.whats-next-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.whats-next-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 32px;
    text-align: center;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 60px;
    right: 60px;
    height: 3px;
    background-color: #e5e7eb;
    z-index: 0;
}

.timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 16px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.completed .timeline-icon {
    background: linear-gradient(135deg, var(--navy) 0%, var(--golden) 100%);
    color: white;
}

.timeline-content h4 {
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.85rem;
    color: #6b7280;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.9s backwards;
}

.success-btn {
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.success-btn.primary {
    background-color: var(--navy);
    color: var(--golden);
}

.success-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 41, 147, 0.25);
}

.success-btn.secondary {
    background-color: white;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.success-btn.secondary:hover {
    background-color: var(--navy);
    color: var(--golden);
}

.email-notification-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: fadeInUp 0.8s ease-out 1s backwards;
}

.email-notification-info i {
    color: var(--golden);
    font-size: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
    .checkout-summary {
        position: relative;
        top: 0;
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .progress-line {
        width: 40px;
        margin: 0 8px;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .checkout-card {
        padding: 20px;
    }

    .saved-addresses-grid {
        grid-template-columns: 1fr;
    }

    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .success-title {
        font-size: 2rem;
    }

    .success-subtitle {
        font-size: 1rem;
    }

    .order-details-card {
        padding: 24px;
    }

    .timeline {
        flex-direction: column;
        gap: 24px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 16px;
    }

    .timeline-icon {
        margin: 0;
        flex-shrink: 0;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .checkout-progress {
        padding: 0 10px;
    }

    .order-id {
        font-size: 0.95rem;
    }

    .total-amount {
        font-size: 1.5rem;
    }
}
