/* ============================================
   CHECKOUT.CSS - Cart & Checkout Styles
   ============================================ */

/* ============================================
   CART PAGE
   ============================================ */

.cart-section {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 60vh;
}

.cart-header {
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.cart-header p {
    color: #64748b;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-item {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.cart-item-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #0f172a;
}

.cart-item-sku {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.8rem;
    color: #475569;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-value {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-item-subtotal {
    font-weight: 700;
    color: #1e293b;
    min-width: 80px;
    text-align: right;
}

.remove-item {
    background: none;
    border: none;
    font-size: 0.8rem;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-item:hover {
    color: #dc2626;
    text-decoration: underline;
}

.continue-shopping {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.continue-shopping a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
}

.continue-shopping a:hover {
    text-decoration: underline;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-box {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.summary-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #475569;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e3a8a;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 16px;
}

.free-shipping-progress {
    margin: 16px 0;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #0d9488;
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 8px;
}

.free-shipping-eligible {
    background: #dcfce7;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #15803d;
    text-align: center;
    margin: 16px 0;
}

.checkout-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    width: 100%;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.empty-cart p {
    color: #64748b;
    margin-bottom: 24px;
}

/* Cart Loading */
.cart-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */

.checkout-section {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 60vh;
}

.checkout-header {
    margin-bottom: 40px;
}

.checkout-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.step {
    padding: 6px 14px;
    background: #e2e8f0;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.step.active {
    background: #1e3a8a;
    color: white;
}

.checkout-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.checkout-header p {
    color: #64748b;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

/* Checkout Form */
.checkout-left {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 24px 0 16px 0;
    color: #0f172a;
}

.form-card h2:first-of-type {
    margin-top: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1e293b;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

.postcode-message {
    margin-top: 6px;
    font-size: 0.7rem;
}

.postcode-valid {
    color: #10b981;
}

.postcode-error {
    color: #ef4444;
}

.postcode-warning {
    color: #f59e0b;
}

/* Shipping & Payment Options */
.shipping-options,
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.shipping-option,
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.shipping-option.selected,
.payment-option.selected {
    border-color: #1e3a8a;
    background: #eff6ff;
}

.shipping-option label,
.payment-option label {
    font-weight: 500;
    cursor: pointer;
}

.shipping-option small,
.payment-option small {
    font-size: 0.7rem;
    color: #64748b;
}

/* Order Card */
.checkout-right {
    position: sticky;
    top: 100px;
}

.order-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.order-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.order-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
}

.order-item-name {
    color: #1e293b;
}

.order-item-price {
    font-weight: 600;
    color: #0f172a;
}

.order-totals {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #475569;
}

.totals-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e3a8a;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 16px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.7rem;
    color: #64748b;
}

.place-order-btn {
    width: 100%;
    padding: 14px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.place-order-btn:hover {
    background: #0f2b6d;
}

.place-order-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.back-to-cart {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
}

.back-to-cart:hover {
    color: #1e3a8a;
}

/* Checkout Loading */
.checkout-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* ============================================
   SUCCESS PAGE
   ============================================ */

.success-page {
    background: #f0fdf4;
}

.success-container {
    padding: 60px 0;
}

.success-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
}

.success-icon {
    width: 70px;
    height: 70px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-card h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.order-number {
    font-size: 1rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 16px;
}

.success-message {
    color: #64748b;
    margin-bottom: 32px;
}

.order-details-box,
.shipping-address-box,
.whats-next-box {
    text-align: left;
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.order-details-box h3,
.shipping-address-box h4,
.whats-next-box h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #0f172a;
}

.order-items-list {
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.order-totals {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}

.totals-row.total {
    font-weight: 700;
    font-size: 1rem;
    color: #1e3a8a;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
    padding-top: 12px;
}

.whats-next-box ul {
    margin: 0;
    padding-left: 20px;
}

.whats-next-box li {
    margin: 8px 0;
    font-size: 0.85rem;
    color: #475569;
}

.success-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

.email-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #64748b;
}

.email-note svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .cart-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .cart-summary,
    .checkout-right {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .success-card {
        padding: 24px;
    }
    
    .success-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cart-section,
    .checkout-section {
        padding: 40px 0;
    }
    
    .cart-header h1,
    .checkout-header h1 {
        font-size: 1.5rem;
    }
    
    .cart-item-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}