* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.4;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.back-arrow {
    margin-right: 16px;
    cursor: pointer;
    border: none;
    background: none;
}

.page-title {
    font-size: 18px;
    font-weight: 500;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.summary-title {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.total-amount {
    font-size: 18px;
    font-weight: 600;
}

.toggle-details {
    font-size: 13px;
    color: #33cc66;
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    text-decoration: underline;
}

.order-details {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: none;
}

.section-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
}

.product {
    display: flex;
    margin-bottom: 12px;
}

.product-img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background: #f0f0f0;
    margin-right: 12px;
}

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

.product-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.product-meta {
    font-size: 12px;
    color: #666;
}

.product-price {
    font-size: 14px;
    font-weight: 600;
}

.price-details {
    margin-top: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.price-label {
    color: #666;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
}

.payment-section {
    margin-bottom: 24px;
}

.payment-methods {
    display: grid;
    grid-gap: 12px;
}

.payment-method {
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.payment-method:hover {
    border-color: #33cc66;
}

.payment-method.selected {
    border-color: #33cc66;
    background-color: rgba(51, 204, 102, 0.05);
}

apple-pay-button {
    --apple-pay-button-width: 100%;
    --apple-pay-button-height: 50px;
    --apple-pay-button-border-radius: 8px;
    --apple-pay-button-padding: 0px;
    margin-bottom: 16px;
}

.method-logo {
    margin-right: 12px;
    height: 24px;
}

.apple-pay {
    background-color: black;
    color: white;
    justify-content: center;
    font-weight: 500;
    border: none;
}

.apple-pay:hover {
    opacity: 0.9;
}

.apple-logo {
    height: 20px;
    margin-right: 8px;
}

.dibys-pay {
    background-color: #33cc66;
    color: white;
    justify-content: center;
    font-weight: 500;
    border: none;
}

.dibys-pay:hover {
    background-color: #2bb65a;
}

.or-separator {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: #999;
    font-size: 12px;
}

.or-separator:before,
.or-separator:after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #eee;
}

.or-separator:before {
    margin-right: 8px;
}

.or-separator:after {
    margin-left: 8px;
}

.checkout-button {
    display: block;
    width: 100%;
    height: 50px;
    border-radius: 8px;
    background-color: #33cc66;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 32px;
    transition: background-color 0.2s;
}

.checkout-button:hover {
    background-color: #2bb65a;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    font-size: 12px;
    color: #666;
}

.lock-icon {
    margin-right: 6px;
}

.agreement {
    margin-top: 24px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.terms-link {
    color: #33cc66;
    text-decoration: none;
}


        .success-container {
            padding: 24px 0 0;
        }

        .success-icon {
            width: 56px;
            height: 56px;
            background-color: #33cc66;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
        }

        .success-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
            color: #333;
            text-align: center;
        }

        .success-message {
            font-size: 13px;
            color: #666;
            margin-bottom: 20px;
            line-height: 1.4;
            text-align: center;
        }

        .order-id {
            background-color: #f8f8f8;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
        }

        .order-id-label {
            font-size: 11px;
            color: #666;
            margin-bottom: 3px;
        }

        .order-id-value {
            font-size: 14px;
            font-weight: 500;
            color: #333;
        }

        .order-summary {
            background-color: white;
            border-radius: 8px;
            padding: 14px;
            margin-top: 16px;
            text-align: left;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .section-title {
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 10px;
            color: #333;
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 6px;
            font-size: 12px;
        }

        .summary-label {
            color: #666;
        }

        .summary-value {
            font-weight: 500;
            color: #333;
        }

        .divider {
            height: 1px;
            background-color: #eee;
            margin: 10px 0;
        }

        .action-buttons {
            display: grid;
            grid-gap: 10px;
            margin-top: 20px;
        }

        .primary-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 48px;
            border-radius: 8px;
            background-color: #33cc66;
            color: white;
            border: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
        }

        .secondary-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 48px;
            border-radius: 8px;
            background-color: white;
            color: #333;
            border: 1px solid #eee;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
        }



                .failed-container {
            padding: 24px 0 0;
        }

        .failed-icon {
            width: 56px;
            height: 56px;
            background-color: #ff6b6b;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
        }

        .failed-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
            color: #333;
            text-align: center;
        }

        .failed-message {
            font-size: 13px;
            color: #666;
            margin-bottom: 20px;
            line-height: 1.4;
            text-align: center;
        }

        .error-box {
            background-color: #fff5f5;
            border: 1px solid #ffd6d6;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 20px;
            color: #e53e3e;
            font-size: 12px;
            text-align: center;
        }

        .action-buttons {
            display: grid;
            grid-gap: 10px;
            margin-top: 20px;
        }

        .primary-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 48px;
            border-radius: 8px;
            background-color: #33cc66;
            color: white;
            border: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
        }

        .secondary-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 48px;
            border-radius: 8px;
            background-color: white;
            color: #333;
            border: 1px solid #eee;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
        }

        .help-section {
            margin-top: 20px;
            background-color: white;
            border-radius: 8px;
            padding: 14px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .help-title {
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 10px;
            color: #333;
        }

        .help-item {
            margin-bottom: 10px;
            font-size: 12px;
        }

        .help-heading {
            font-weight: 500;
            margin-bottom: 2px;
            color: #333;
        }

        .help-text {
            color: #666;
            font-size: 12px;
            line-height: 1.4;
        }

        .contact-support {
            margin-top: 16px;
            font-size: 12px;
            color: #666;
            text-align: center;
        }

        .support-link {
            color: #33cc66;
            text-decoration: none;
            font-weight: 500;
        }



        /* Amount editing styles */
.amount-edit {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.amount-edit .edit-button {
    background: none;
    border: none;
    color: #33cc66;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    text-decoration: underline;
}

.amount-input {
    display: none;
    margin-top: 8px;
}

.amount-input.active {
    display: flex;
}

.amount-input input {
    flex: 1;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    margin-right: 8px;
}

.amount-input button {
    height: 38px;
    background: #33cc66;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Address form styles */
.billing-section, .shipping-section {
    margin-bottom: 20px;
}

.billing-form, .shipping-form {
    background-color: white;
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.form-group input {
    width: 100%;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #33cc66;
    outline: none;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.same-as-billing {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.same-as-billing input {
    margin-right: 4px;
}