/* ==========================================
   PHASE 6: CART & CHECKOUT IMPROVEMENTS
   ========================================== */

/* Free Shipping Progress Bar */
.free-shipping-progress {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

.free-shipping-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.free-shipping-icon {
    font-size: 24px;
    color: #10b981;
}

.free-shipping-text {
    flex: 1;
    margin-left: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #065f46;
}

.free-shipping-amount {
    font-size: 18px;
    font-weight: 900;
    color: #047857;
}

.shipping-progress-bar {
    position: relative;
    height: 12px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.shipping-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.shipping-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.free-shipping-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.free-shipping-success .free-shipping-text,
.free-shipping-success .free-shipping-amount,
.free-shipping-success .free-shipping-icon {
    color: white;
}

/* Suggested Products in Cart */
.cart-suggestions {
    margin: 30px 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
}

.cart-suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.cart-suggestions-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.cart-suggestions-subtitle {
    font-size: 14px;
    color: #666;
}

.cart-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.cart-suggestion-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cart-suggestion-item:hover {
    border-color: var(--amazon-blue);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.cart-suggestion-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cart-suggestion-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-suggestion-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--amazon-blue);
    margin-bottom: 8px;
}

.cart-suggestion-add {
    width: 100%;
    padding: 8px 16px;
    background: var(--amazon-orange);
    color: #111;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-suggestion-add:hover {
    background: #e68900;
    transform: scale(1.02);
}

/* One-Page Checkout Layout */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.checkout-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.checkout-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.checkout-section-number {
    width: 32px;
    height: 32px;
    background: var(--amazon-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.checkout-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.checkout-section.completed .checkout-section-number {
    background: #10b981;
}

.checkout-section.completed .checkout-section-number::before {
    content: '✓';
}

.checkout-form-group {
    margin-bottom: 20px;
}

.checkout-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.checkout-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.checkout-form-input:focus {
    outline: none;
    border-color: var(--amazon-blue);
    box-shadow: 0 0 0 3px rgba(20, 110, 180, 0.1);
}

.checkout-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Order Summary Sidebar */
.order-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.order-summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.order-summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-summary-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.order-summary-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.order-summary-item-details {
    flex: 1;
}

.order-summary-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.order-summary-item-qty {
    font-size: 13px;
    color: #666;
}

.order-summary-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--amazon-blue);
}

.order-summary-totals {
    padding: 16px 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.order-summary-row.total {
    font-size: 20px;
    font-weight: 900;
    color: #111;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
}

.checkout-place-order {
    width: 100%;
    padding: 16px 24px;
    background: var(--amazon-orange);
    color: #111;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.checkout-place-order:hover {
    background: #e68900;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 153, 0, 0.3);
}

/* Guest Checkout Toggle */
.guest-checkout-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.guest-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.guest-checkout-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.guest-checkout-toggle {
    display: flex;
    gap: 12px;
}

.guest-checkout-toggle button {
    padding: 10px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guest-checkout-toggle button.active {
    background: var(--amazon-blue);
    color: white;
    border-color: var(--amazon-blue);
}

.guest-checkout-toggle button:hover:not(.active) {
    border-color: var(--amazon-blue);
    color: var(--amazon-blue);
}

/* Payment Method Selection */
.payment-methods {
    display: grid;
    gap: 12px;
}

.payment-method {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-method:hover {
    border-color: var(--amazon-blue);
}

.payment-method.selected {
    border-color: var(--amazon-blue);
    background: rgba(20, 110, 180, 0.05);
}

.payment-method-radio {
    width: 20px;
    height: 20px;
}

.payment-method-icon {
    font-size: 24px;
    color: #666;
}

.payment-method-details {
    flex: 1;
}

.payment-method-name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.payment-method-description {
    font-size: 13px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .cart-suggestions-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .checkout-form-row {
        grid-template-columns: 1fr;
    }

    .cart-suggestions-grid {
        grid-template-columns: 1fr;
    }
}