/* ==========================================================================
   ADA COLOR - STANDALONE MOBILE-FIRST CHECKOUT & CART STYLES
   ========================================================================== */

.ada-checkout-wrap {
    max-width: 1200px;
    margin: 15px auto 60px;
    padding: 0 15px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #222;
}

/* Progress Stepper */
.ada-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    position: relative;
}

.ada-step {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #888;
    font-weight: 600;
    font-size: 14px;
}

.ada-step.disabled {
    cursor: default;
    opacity: 0.65;
}

.ada-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #777;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid #ddd;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.ada-step.active {
    color: #111;
}

.ada-step.active .ada-step-num {
    background: #f58220;
    color: #fff;
    border-color: #f58220;
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.2);
}

.ada-step.completed {
    color: #03ae00;
}

.ada-step.completed .ada-step-num {
    background: #03ae00;
    color: #fff;
    border-color: #03ae00;
}

.ada-step-divider {
    flex: 1;
    height: 2px;
    background: #e2e2e2;
    margin: 0 10px;
}

.ada-step-divider.completed {
    background: #03ae00;
}

/* Free Delivery Progress Banner */
.ada-free-delivery-banner {
    background: linear-gradient(135deg, #fff9f2 0%, #fff 100%);
    border: 1px solid #ffd8b3;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(245, 130, 32, 0.06);
}

.ada-free-delivery-banner.reached {
    background: linear-gradient(135deg, #f1fbf1 0%, #fff 100%);
    border-color: #a3e4a1;
}

.ada-free-delivery-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ada-free-delivery-top i {
    font-size: 22px;
    color: #f58220;
}

.ada-free-delivery-banner.reached .ada-free-delivery-top i {
    color: #03ae00;
}

.ada-free-highlight {
    color: #e65c00;
    font-weight: 800;
    font-size: 16px;
}

.ada-free-delivery-banner.reached .ada-free-highlight {
    color: #03ae00;
}

.ada-progress-track {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 99px;
    overflow: hidden;
}

.ada-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f58220, #ff9f43);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.ada-free-delivery-banner.reached .ada-progress-fill {
    background: linear-gradient(90deg, #03ae00, #2ecc71);
}

/* Layout Grid */
.ada-checkout-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.ada-checkout-main {
    flex: 1 1 64%;
    min-width: 0;
}

.ada-checkout-sidebar {
    flex: 0 0 360px;
    max-width: 100%;
    position: sticky;
    top: 20px;
}

/* Cards & Panels */
.ada-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.ada-card-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ada-card-title i {
    color: #f58220;
    margin-right: 8px;
}

/* Cart Items List (Step 1) */
.ada-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.ada-cart-item:last-child {
    border-bottom: none;
}

.ada-cart-thumb {
    width: 84px;
    height: 84px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.ada-cart-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ada-cart-info {
    flex: 1;
    min-width: 0;
}

.ada-cart-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    line-height: 1.35;
}

.ada-cart-title:hover {
    color: #f58220;
}

.ada-cart-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.ada-cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
}

.ada-cart-badge img {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

.ada-cart-warning {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff4f4;
    border-left: 3px solid #d9534f;
    color: #b52b27;
    font-size: 12px;
    border-radius: 4px;
    line-height: 1.4;
}

.ada-cart-store-only {
    margin-top: 6px;
    display: inline-block;
    padding: 4px 8px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ada-cart-price-col {
    text-align: right;
    min-width: 95px;
}

.ada-unit-price {
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

.ada-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    display: block;
}

/* Quantity Stepper Controls */
.ada-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.ada-qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: #f8f8f8;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
}

.ada-qty-btn:hover {
    background: #ececec;
    color: #f58220;
}

.ada-qty-input {
    width: 46px;
    height: 38px;
    border: none;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    outline: none;
}

.ada-line-sum-col {
    min-width: 105px;
    text-align: right;
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.ada-remove-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ada-remove-btn:hover {
    background: #fee;
    color: #d9534f;
    border-color: #f5c6cb;
}

/* Promo Code Box */
.ada-promo-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e0e0e0;
}

.ada-promo-form {
    display: flex;
    gap: 8px;
}

.ada-promo-input {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.ada-promo-input:focus {
    border-color: #f58220;
    outline: none;
}

.ada-promo-btn {
    height: 42px;
    padding: 0 16px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.ada-promo-btn:hover {
    background: #f58220;
}

.ada-promo-active-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f8e8;
    border: 1px solid #b2e2b2;
    color: #1b6d1b;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.ada-promo-msg {
    margin-top: 6px;
    font-size: 13px;
}

/* Guest vs Login Tabs (Step 2) */
.ada-auth-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.ada-auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}

.ada-auth-tab.active {
    border-color: #f58220;
    background: #fff8f2;
    color: #d66400;
}

.ada-login-panel {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

/* Interactive Option Cards (Delivery & Payment) */
.ada-option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ada-option-card {
    border: 2px solid #e2e2e2;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.ada-option-card:hover {
    border-color: #ccc;
    background: #fcfcfc;
}

.ada-option-card.selected {
    border-color: #f58220;
    background: #fff9f4;
    box-shadow: 0 3px 10px rgba(245, 130, 32, 0.12);
}

.ada-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ada-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: #222;
    margin-bottom: 6px;
}

.ada-option-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #bbb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ada-option-card.selected .ada-option-radio-dot {
    border-color: #f58220;
}

.ada-option-card.selected .ada-option-radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f58220;
}

.ada-option-desc {
    font-size: 12.5px;
    color: #666;
    line-height: 1.4;
}

/* Courier Selector Buttons */
.ada-courier-selector {
    display: flex;
    gap: 14px;
    margin: 14px 0 18px;
}

.ada-courier-btn {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.ada-courier-btn img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.ada-courier-btn.selected {
    border-color: #f58220;
    background: #fff9f4;
    box-shadow: 0 2px 8px rgba(245, 130, 32, 0.15);
}

/* Store Pickup Grid */
.ada-stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.ada-store-card {
    border: 2px solid #e4e4e4;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.ada-store-card:hover {
    border-color: #bbb;
}

.ada-store-card.selected {
    border-color: #03ae00;
    background: #f3fcf3;
}

.ada-store-card h5 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

.ada-store-card p {
    margin: 0;
    font-size: 12px;
    color: #555;
    white-space: pre-line;
    line-height: 1.4;
}

/* Form Fields & Real-Time Validation */
.ada-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.ada-form-group {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
}

.ada-form-group.full-width {
    flex: 1 1 100%;
}

.ada-form-group.small-width {
    flex: 0 1 130px;
}

.ada-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.ada-label .req {
    color: #d9534f;
    margin-left: 2px;
}

.ada-input,
.ada-select,
.ada-textarea {
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    color: #222;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.ada-textarea {
    height: auto;
    min-height: 85px;
    padding: 12px 14px;
    resize: vertical;
}

.ada-input:focus,
.ada-select:focus,
.ada-textarea:focus {
    border-color: #f58220;
    box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.15);
    outline: none;
}

.ada-input.is-valid,
.ada-select.is-valid {
    border-color: #28a745;
    background-color: #fbfffc;
}

.ada-input.is-invalid,
.ada-select.is-invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.ada-field-error {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.ada-form-group.has-error .ada-field-error {
    display: block;
}

/* Select2 overrides for modern look */
.ada-form-group .select2-container {
    width: 100% !important;
}

.ada-form-group .select2-container--default .select2-selection--single {
    height: 46px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.ada-form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding-left: 14px;
    font-size: 15px;
    color: #222;
}

.ada-form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 8px;
}

/* Order Summary Sidebar */
.ada-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14.5px;
    color: #444;
}

.ada-summary-row.discount {
    color: #03ae00;
    font-weight: 700;
}

.ada-summary-row.total {
    border-top: 2px solid #eee;
    margin-top: 10px;
    padding-top: 14px;
    font-size: 20px;
    font-weight: 800;
    color: #111;
}

.ada-summary-vat {
    font-size: 12px;
    color: #888;
    text-align: right;
    margin-top: -4px;
    margin-bottom: 14px;
}

/* Primary & Secondary Action Buttons */
.ada-btn-primary {
    width: 100%;
    min-height: 52px;
    background: linear-gradient(135deg, #f58220 0%, #e66a00 100%);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

.ada-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 130, 32, 0.4);
}

.ada-btn-success {
    background: linear-gradient(135deg, #03ae00 0%, #028a00 100%);
    box-shadow: 0 4px 12px rgba(3, 174, 0, 0.3);
}

.ada-btn-success:hover {
    box-shadow: 0 6px 16px rgba(3, 174, 0, 0.4);
}

.ada-btn-secondary {
    min-height: 46px;
    padding: 0 20px;
    background: #f3f3f3;
    color: #333 !important;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    transition: background 0.15s;
}

.ada-btn-secondary:hover {
    background: #e7e7e7;
}

.ada-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

/* Review Box in Step 3 */
.ada-review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.ada-review-box {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
}

.ada-review-box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #222;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eaeaea;
}

.ada-review-edit-link {
    color: #f58220;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.ada-review-content {
    font-size: 13.5px;
    color: #444;
    line-height: 1.5;
}

/* Terms Checkbox */
.ada-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff9f2;
    border: 1.5px solid #ffd8b3;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 16px 0;
}

.ada-terms-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: #f58220;
    flex-shrink: 0;
}

/* Empty Cart State */
.ada-empty-cart {
    text-align: center;
    padding: 50px 20px;
}

.ada-empty-cart i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 16px;
}

/* Add-to-Cart Toast Modal on Product Pages */
.ada-cart-toast-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ada-cart-toast-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 460px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.22);
    text-align: center;
    animation: adaToastIn 0.22s ease-out;
}

@keyframes adaToastIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile-First Responsive Breakpoints */
@media (max-width: 991px) {
    .ada-checkout-grid {
        flex-direction: column;
    }
    .ada-checkout-main,
    .ada-checkout-sidebar {
        flex: 1 1 100%;
        width: 100%;
        position: static;
    }
}

@media (max-width: 767px) {
    .ada-checkout-wrap {
        margin: 18px auto 40px;
        padding: 0 10px;
    }
    .ada-stepper {
        padding: 12px 10px;
        overflow-x: auto;
    }
    .ada-step {
        flex-direction: column;
        text-align: center;
        font-size: 11.5px;
        gap: 4px;
        padding: 4px;
    }
    .ada-step-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .ada-option-grid {
        grid-template-columns: 1fr;
    }
    .ada-review-grid {
        grid-template-columns: 1fr;
    }
    .ada-cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    .ada-cart-info {
        flex: 1 1 calc(100% - 110px);
    }
    .ada-cart-price-col {
        text-align: left;
        min-width: auto;
    }
    .ada-line-sum-col {
        margin-left: auto;
    }
    .ada-step-nav {
        flex-direction: column-reverse;
    }
    .ada-step-nav .ada-btn-secondary,
    .ada-step-nav .ada-btn-primary {
        width: 100%;
    }
    .ada-auth-tabs {
        flex-direction: column;
    }
}
