.summary-checkout-btn {
    width: min(100%, 380px);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 28px;
    border-radius: 999px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

.summary-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

body.checkout-open {
    overflow: hidden;
}

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: 'Cairo', sans-serif;
}

.checkout-modal[hidden] {
    display: none;
}

.checkout-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.checkout-modal__panel {
    position: relative;
    width: min(100%, 520px);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    background: #fff;
    padding: 28px 24px;
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.2);
}

.checkout-modal__close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.checkout-modal__panel h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.checkout-modal__alerts {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.checkout-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 14px;
    border: 1px solid #e6e6e6;
    background: linear-gradient(180deg, #fbfbfb 0%, #f7f7f7 100%);
    padding: 10px 12px;
}

.checkout-alert i {
    font-size: 1.1rem;
    margin-top: 3px;
    color: #111;
}

.checkout-alert p {
    font-size: 0.98rem;
    color: #3d3d3d;
    line-height: 1.7;
}

.checkout-order-summary {
    margin-top: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    background: #fcfcfc;
    padding: 14px;
}

.checkout-order-summary__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.checkout-order-summary__head h3 {
    font-size: 1.05rem;
    font-weight: 800;
}

.checkout-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed #e5e5e5;
    padding-bottom: 10px;
}

.checkout-summary-item__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout-summary-item__meta strong {
    font-size: 0.95rem;
    color: #111;
}

.checkout-summary-item__meta span {
    font-size: 0.88rem;
    color: #6a6a6a;
}

.checkout-summary-item__price {
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

.checkout-summary-empty {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 10px;
}

.checkout-summary-shipping {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.checkout-summary-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
}

.checkout-summary-select select {
    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.98rem;
    background: #fff;
}

.checkout-summary-select .checkout-field-invalid {
    border-color: #d13d3d;
    box-shadow: 0 0 0 2px rgba(209, 61, 61, 0.12);
}

.checkout-summary-select select:focus {
    border-color: #111;
    outline: none;
}

.checkout-summary-fee {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.98rem;
    font-weight: 700;
}

.checkout-summary-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
}

.checkout-summary-total strong {
    font-size: 1.06rem;
}

.checkout-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: #111;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 12px 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    outline: none;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: #111;
}

.checkout-form .checkout-field-invalid {
    border-color: #d13d3d;
    box-shadow: 0 0 0 2px rgba(209, 61, 61, 0.12);
}

.checkout-field-error {
    min-height: 18px;
    font-size: 0.84rem;
    color: #b42318;
    font-weight: 600;
}

.checkout-form__submit {
    margin-top: 8px;
}

.checkout-form__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.checkout-feedback {
    min-height: 24px;
    margin-top: 12px;
    font-weight: 700;
}

.checkout-feedback.success {
    color: #1f7a3f;
}

.checkout-feedback.error {
    color: #b42318;
}

@media (max-width: 700px) {
    .summary-checkout-btn {
        width: 100%;
    }

    .checkout-modal {
        padding: 12px;
    }

    .checkout-modal__panel {
        padding: 24px 16px;
    }

    .checkout-modal__panel h2 {
        font-size: 1.5rem;
    }
}
