.orders-page {
    direction: rtl;
    text-align: right;
    font-size: 14px;
    line-height: 1.6;
}

.orders-page h2,
.orders-page h3 {
    font-weight: 600;
    margin-top: 0;
}

.orders-page .orders-page-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

/* Order list */
.orders-page .order-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.orders-page .order-list-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.orders-page .order-list-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.orders-page .order-list-card__main {
    flex: 1;
    min-width: 180px;
}

.orders-page .order-list-card__id {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.orders-page .order-list-card__date {
    font-size: 13px;
    color: #888;
}

.orders-page .order-list-card__actions {
    flex-shrink: 0;
}

.orders-page .order-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 10px;
    color: #666;
}

.orders-page .order-empty .fa {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

/* Status badges */
.orders-page .order-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.orders-page .order-list-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 13px;
    color: #555;
}

.orders-page .order-list-card__price {
    font-weight: 600;
    color: #333;
}

.orders-page .order-list-card__paytype {
    color: #888;
}

.orders-page .order-badge--registered { background: #e3f2fd; color: #1565c0; }
.orders-page .order-badge--payment { background: #fff3e0; color: #e65100; }
.orders-page .order-badge--preparing { background: #e0f7fa; color: #00838f; }
.orders-page .order-badge--shipped { background: #e8f5e9; color: #2e7d32; }
.orders-page .order-badge--returned { background: #fce4ec; color: #c2185b; }
.orders-page .order-badge--cancelled { background: #ffebee; color: #c62828; }

/* Legacy badge aliases (backward compat) */
.orders-page .order-badge--active { background: #e3f2fd; color: #1565c0; }
.orders-page .order-badge--sent { background: #e8f5e9; color: #2e7d32; }
.orders-page .order-badge--awaiting { background: #fff3e0; color: #e65100; }
.orders-page .order-badge--paid { background: #e0f7fa; color: #00838f; }
.orders-page .order-badge--end { background: #e8f5e9; color: #2e7d32; }

.orders-page .order-progress-wrap--exception .order-progress__bar {
    background: #bdbdbd;
}

.orders-page .order-progress-step--exception {
    flex: 1;
    text-align: center;
    color: #c62828;
    font-weight: 600;
}

/* Detail header */
.orders-page .order-detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eee;
}

.orders-page .order-detail-header__title {
    font-size: 20px;
    font-weight: 700;
}

.orders-page .order-back-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.orders-page .order-back-link:hover {
    color: #333;
}

.orders-page .order-back-link .fa {
    margin-left: 6px;
}

/* Cards */
.orders-page .order-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 18px;
    overflow: hidden;
}

.orders-page .order-card__header {
    padding: 14px 18px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.orders-page .order-card__body {
    padding: 18px;
}

/* Progress */
.orders-page .order-progress-wrap {
    margin-bottom: 18px;
}

.orders-page .order-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #555;
}

.orders-page .order-progress-label__pct {
    font-weight: 700;
    color: #e65100;
}

.orders-page .order-progress {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.orders-page .order-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #f57c00);
    border-radius: 6px;
    min-width: 2%;
    transition: width 0.4s ease;
}

.orders-page .order-progress-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 12px;
    gap: 6px;
}

.orders-page .order-progress-step {
    flex: 1;
    min-width: 60px;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    position: relative;
}

.orders-page .order-progress-step.is-done {
    color: #2e7d32;
    font-weight: 600;
}

.orders-page .order-progress-step.is-current {
    color: #e65100;
    font-weight: 700;
}

.orders-page .order-note {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

/* Repay card */
.orders-page .order-repay-card {
    background: #fff8e1;
    border: 2px solid #ffcc80;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 18px;
    text-align: center;
}

.orders-page .order-repay-card.is-failed {
    border-color: #ef9a9a;
    background: #ffebee;
}

.orders-page .order-repay-card__icon {
    font-size: 48px;
    color: #f57c00;
    margin-bottom: 10px;
}

.orders-page .order-repay-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.orders-page .order-repay-card__amount {
    font-size: 22px;
    font-weight: 700;
    color: #e65100;
    margin: 12px 0;
}

.orders-page .order-repay-card__warning {
    font-size: 13px;
    color: #666;
    margin: 12px 0 18px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

.orders-page .order-repay-card .btn-pay {
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
}

.orders-page .order-repay-expired {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Info rows */
.orders-page .order-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.orders-page .order-info-list li {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.orders-page .order-info-list li:last-child {
    border-bottom: none;
}

.orders-page .order-info-list__label {
    width: 130px;
    flex-shrink: 0;
    color: #888;
    font-size: 13px;
}

.orders-page .order-info-list__value {
    flex: 1;
    color: #333;
    font-weight: 500;
}

/* Summary grid */
.orders-page .order-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.orders-page .order-summary-item__label {
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
}

.orders-page .order-summary-item__value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.orders-page .order-summary-total {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orders-page .order-summary-total__label {
    font-size: 15px;
    font-weight: 600;
}

.orders-page .order-summary-total__value {
    font-size: 20px;
    font-weight: 700;
    color: #e65100;
}

.orders-page .order-settle-toggle {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.orders-page .order-settle-toggle summary {
    cursor: pointer;
    font-size: 13px;
    color: #666;
    font-weight: 600;
    padding: 6px 0;
}

.orders-page .order-settle-table {
    margin-top: 10px;
    font-size: 13px;
}

/* Product items */
.orders-page .order-product-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.orders-page .order-product-item {
    display: flex;
    gap: 16px;
    padding: 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.orders-page .order-product-item__image {
    flex-shrink: 0;
    width: 90px;
}

.orders-page .order-product-item__image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    background: #fff;
}

.orders-page .order-product-item__details {
    flex: 1;
    min-width: 0;
}

.orders-page .order-product-item__name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.orders-page .order-product-item__name a {
    color: #333;
    text-decoration: none;
}

.orders-page .order-product-item__name a:hover {
    color: #e65100;
}

.orders-page .order-product-item__meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.orders-page .order-product-item__meta .fa {
    margin-left: 5px;
    color: #aaa;
}

.orders-page .order-product-item__price {
    font-size: 13px;
    color: #555;
    margin-top: 6px;
}

.orders-page .order-product-item__total {
    font-size: 14px;
    font-weight: 700;
    color: #e65100;
    margin-top: 4px;
}

.orders-page .order-product-item__action {
    flex-shrink: 0;
    align-self: center;
}

/* Tickets */
.orders-page .order-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.orders-page .order-ticket-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.orders-page .order-ticket-msg.is-staff {
    flex-direction: row-reverse;
}

.orders-page .order-ticket-msg__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #666;
    font-size: 16px;
}

.orders-page .order-ticket-msg.is-staff .order-ticket-msg__avatar {
    background: #bbdefb;
    color: #1565c0;
}

.orders-page .order-ticket-msg.is-user .order-ticket-msg__avatar {
    background: #ffe0b2;
    color: #e65100;
}

.orders-page .order-ticket-msg__bubble {
    flex: 1;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.orders-page .order-ticket-msg.is-staff .order-ticket-msg__bubble {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.orders-page .order-ticket-msg__meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.orders-page .order-ticket-msg__meta strong {
    color: #333;
}

.orders-page .order-ticket-msg__text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.orders-page .order-ticket-form textarea {
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
}

.orders-page .order-ticket-form .btn-send {
    min-height: 44px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
}

/* Buttons */
.orders-page .btn-order-detail {
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

/* Account dashboard & profile form */
.orders-page .account-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
}

.orders-page .account-balance__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fff3e0;
    color: #e65100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.orders-page .account-balance__amount {
    font-size: 24px;
    font-weight: 700;
    color: #e65100;
}

.orders-page .account-balance__label {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.orders-page .account-alert {
    margin-bottom: 18px;
    border-radius: 8px;
}

.orders-page .account-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.orders-page .account-profile__avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffe0b2;
    box-shadow: 0 4px 14px rgba(230, 81, 0, 0.12);
    background: #f5f5f5;
}

.orders-page .account-profile__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.orders-page .account-profile__meta {
    flex: 1;
    min-width: 0;
}

.orders-page .account-profile__name {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.orders-page .account-profile__email {
    margin: 0 0 14px;
    font-size: 13px;
    color: #888;
}

.orders-page .account-profile__email .fa {
    margin-left: 6px;
}

.orders-page .account-profile__edit {
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
}

.orders-page .account-profile__edit .fa {
    margin-left: 6px;
}

.orders-page .account-profile__details {
    margin-bottom: 0;
}

.orders-page .account-actions {
    margin-top: 18px;
}

.orders-page .account-actions .btn {
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
}

@media (max-width: 575px) {
    .orders-page .account-profile {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .orders-page .account-profile__email .fa {
        margin-left: 0;
        margin-right: 6px;
    }
}

.orders-page .order-form .form-group {
    margin-bottom: 16px;
}

.orders-page .order-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.orders-page .order-form .form-control {
    border-radius: 8px;
    border-color: #ddd;
    min-height: 40px;
    box-shadow: none;
}

.orders-page .order-form .form-control:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.15);
}

.orders-page .order-form .form-control[disabled] {
    background: #f5f5f5;
    color: #888;
}

.orders-page .order-form .select2-container .select2-selection--single {
    border-radius: 8px;
    border-color: #ddd;
    min-height: 40px;
}

.orders-page .order-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}

.orders-page .order-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.orders-page .order-form__actions {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.orders-page .order-form__actions .btn-submit {
    min-height: 44px;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
}

/* Profile picture upload */
.orders-page .profile-pic-upload__hint {
    margin: 0 0 16px;
    color: #888;
    font-size: 13px;
}

.orders-page .profile-pic-upload__preview {
    margin-bottom: 16px;
}

.orders-page .profile-pic-upload__image {
    margin: 0 auto;
    width: 128px;
}

.orders-page .profile-pic-upload__image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    display: block;
}

.orders-page .profile-pic-upload__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.orders-page .profile-pic-upload__form input[type="file"] {
    flex: 1 1 220px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.orders-page .profile-pic-upload__form .btn {
    min-height: 40px;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.orders-page .profile-pic-upload__loading {
    color: #888;
    font-size: 13px;
}

.orders-page #progressbox {
    border: 1px solid #eee;
    border-radius: 8px;
    display: none;
    padding: 1px;
    position: relative;
    text-align: left;
    width: 100%;
    margin-bottom: 14px;
    overflow: hidden;
}

.orders-page #progressbar {
    background-color: #ff9800;
    border-radius: 7px;
    height: 20px;
    width: 1%;
}

.orders-page #statustxt {
    color: #fff;
    display: inline-block;
    left: 50%;
    position: absolute;
    top: 0;
    line-height: 22px;
    font-size: 12px;
    transform: translateX(-50%);
}

/* Mobile */
@media (max-width: 767px) {
    .orders-page .order-list-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .orders-page .order-list-card__actions {
        width: 100%;
    }

    .orders-page .order-list-card__actions .btn {
        width: 100%;
    }

    .orders-page .order-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .orders-page .order-summary-grid {
        grid-template-columns: 1fr;
    }

    .orders-page .order-product-item {
        flex-direction: column;
    }

    .orders-page .order-product-item__image {
        width: 100%;
        text-align: center;
    }

    .orders-page .order-product-item__image img {
        max-width: 120px;
    }

    .orders-page .order-product-item__action {
        width: 100%;
    }

    .orders-page .order-product-item__action .btn {
        width: 100%;
    }

    .orders-page .order-info-list__label {
        width: 100%;
        margin-bottom: 2px;
    }

    .orders-page .order-progress-step {
        font-size: 10px;
        min-width: 50px;
    }

    .orders-page .order-ticket-msg__bubble {
        max-width: 100%;
    }

    .orders-page .account-balance {
        flex-direction: row-reverse;
    }
}

/* Checkout wallet card (productcheckout.php) */
.checkout-wallet-card {
    direction: rtl;
    text-align: right;
    padding: 20px 25px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
}

.checkout-wallet-card__header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.checkout-wallet-card__header .fa {
    margin-left: 8px;
    color: #f0ad4e;
}

.checkout-wallet-card__balance {
    margin-bottom: 12px;
    color: #555;
}

.checkout-wallet-card__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 8px;
}

.checkout-wallet-card__checkbox input {
    margin-top: 4px;
}

.checkout-wallet-card__hint {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.order-payment-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.order-payment-split__item {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 10px 12px;
}

.order-payment-split__label {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.order-payment-split__value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.order-repay-card__subamount {
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
    text-align: center;
}

/* User address cards (checkout + panel) */
.address-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    direction: rtl;
}

.addresses-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.address-card {
    position: relative;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    direction: rtl;
    text-align: right;
    min-height: 48px;
}

.address-card:hover {
    border-color: #d4a574;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.address-card.is-selected {
    border-color: #c8860a;
    box-shadow: 0 6px 18px rgba(200, 134, 10, 0.15);
    background: #fffdf8;
}

.address-card.is-selected::after {
    content: '\f00c';
    font-family: FontAwesome;
    position: absolute;
    top: 14px;
    left: 14px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: #c8860a;
    color: #fff;
    font-size: 13px;
}

.address-card--panel {
    cursor: default;
}

.address-card--panel.is-selected::after {
    display: none;
}

.address-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.address-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.address-card__badge {
    font-size: 11px;
    font-weight: 600;
    background: #f0ad4e;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.address-card__name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.address-card__line {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 4px;
}

.address-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 13px;
    color: #777;
}

.address-card__meta .fa {
    margin-left: 4px;
    color: #aaa;
}

.address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.address-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #777;
    direction: rtl;
}

.address-empty-state .fa {
    font-size: 42px;
    color: #ddd;
    margin-bottom: 12px;
}

.checkout-address-section {
    direction: rtl;
    text-align: right;
    padding: 0 10px 10px;
}

.checkout-address-section__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-right: 8px;
}

.checkout-new-address-toggle {
    margin: 16px 0;
}

.checkout-new-address-panel {
    display: none;
    border: 1px dashed #ddd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
}

.checkout-new-address-panel.is-open {
    display: block;
}

.checkout-shipping-card {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    direction: rtl;
    text-align: right;
    position: relative;
}

.checkout-shipping-card:hover {
    border-color: #d4a574;
}

.checkout-shipping-card.is-selected {
    border-color: #c8860a;
    background: #fffdf8;
    box-shadow: 0 4px 14px rgba(200, 134, 10, 0.12);
}

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

.checkout-shipping-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.checkout-shipping-card__desc {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.checkout-step-error {
    color: #a94442;
    font-size: 13px;
    margin: 8px 0 0;
    display: none;
}

.checkout-step-error.is-visible {
    display: block;
}

.form-wizard .wizard-tabs.checkout-wizard-tabs {
    margin-bottom: 20px;
}

.form-wizard .wizard-tabs.checkout-wizard-tabs .bwizard-steps {
    direction: rtl;
}

.address-form-row {
    direction: rtl;
}

.address-form-row > [class*="col-"] {
    float: right;
}

.address-form-row:after {
    content: '';
    display: table;
    clear: both;
}

.address-form .form-group.has-error .form-control,
.checkout-new-address-panel .form-group.has-error .form-control {
    border-color: #a94442;
}

.address-form label.error,
.checkout-new-address-panel label.error {
    color: #a94442;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* ========== Cart page ========== */
.cart-page .shopcartcontainer {
    position: relative;
    min-height: 120px;
}

.cart-page .loadingshop {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
}

.cart-page .loadingshop .text {
    margin-top: 12%;
    color: #555;
    font-size: 16px;
    direction: rtl;
    text-align: center;
}

.cart-page__toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    direction: rtl;
}

.cart-page__toolbar-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.cart-page__toolbar-link:hover,
.cart-page__toolbar-link:focus {
    color: #e65100;
    text-decoration: none;
}

.cart-page__toolbar-link .fa {
    margin-left: 4px;
}

.cart-page__layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
    direction: rtl;
}

.cart-product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-product-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    direction: rtl;
    text-align: right;
}

.cart-product-item__image {
    flex-shrink: 0;
    width: 100px;
}

.cart-product-item__image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #f5f5f5;
}

.cart-product-item__details {
    flex: 1;
    min-width: 0;
}

.cart-product-item__name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.cart-product-item__name a {
    color: #222;
    text-decoration: none;
}

.cart-product-item__name a:hover {
    color: #e65100;
}

.cart-product-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
}

.cart-product-item__meta .fa {
    margin-left: 4px;
    color: #bbb;
}

.cart-product-item__price {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

.cart-product-item__total {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.cart-product-item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cart-product-item__qty {
    width: auto;
    min-width: 110px;
    max-width: 140px;
    direction: rtl;
    text-align: right;
    height: 38px;
}

.cart-product-item__remove {
    border-radius: 8px;
}

.cart-summary {
    position: sticky;
    top: 20px;
}

.cart-summary .order-summary-total {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.cart-summary__words {
    font-size: 12px;
    color: #888;
    margin: 8px 0 16px;
}

.cart-summary__cta {
    min-height: 46px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 12px;
}

.cart-summary__hint {
    font-size: 12px;
    color: #888;
    margin: 0;
    line-height: 1.6;
}

/* ========== Checkout page ========== */
.checkout-page {
    direction: rtl;
    text-align: right;
}

.checkout-page .checkout-wizard.panel {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.checkout-page .checkout-wizard > .tab-content {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.checkout-page .checkout-address-section {
    padding: 0;
}

.checkout-page .checkout-address-section__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    padding: 0;
}

.checkout-mobile-steps {
    display: none;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #fff8f0;
    border: 1px solid #ffcc80;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #e65100;
    text-align: center;
}

.checkout-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.checkout-payment-grid__price,
.checkout-discount-card,
.checkout-wallet-order-card,
.checkout-payment-grid > .order-card:last-child {
    grid-column: span 1;
}

.checkout-wallet-order-card,
.checkout-payment-grid > .order-card:last-child {
    grid-column: 1 / -1;
}

.checkout-price-card {
    margin-bottom: 0;
}

.checkout-price-card .order-summary-total {
    margin-top: 14px;
}

.checkout-price-card__order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}

.checkout-price-card__words {
    margin: 10px 0 0;
    font-size: 12px;
    color: #888;
}

.checkout-discount__hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.checkout-discount__form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.checkout-discount__form .form-control {
    flex: 1;
    min-width: 140px;
}

.checkout-discount__form .btn {
    border-radius: 8px;
    white-space: nowrap;
}

.checkout-payment-card {
    display: block;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 18px;
    margin: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-weight: normal;
}

.checkout-payment-card.is-selected,
.checkout-payment-card:has(input:checked) {
    border-color: #c8860a;
    background: #fffdf8;
    box-shadow: 0 4px 14px rgba(200, 134, 10, 0.12);
}

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

.checkout-payment-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.checkout-payment-card__desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.checkout-payment-card__logo img {
    max-width: 180px;
}

.checkout-success-card__icon {
    font-size: 56px;
    color: #2e7d32;
    margin-bottom: 12px;
}

.checkout-success-card__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #222;
}

.checkout-success-card p {
    color: #555;
    margin-bottom: 18px;
}

.checkout-page .checkout-pager.panel-footer {
    background: transparent;
    border: none;
    padding: 16px 0 0;
    margin-top: 8px;
}

.checkout-page .checkout-pager ul.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checkout-page .checkout-pager ul.pager > li {
    float: none;
}

.checkout-page .checkout-pager ul.pager > li > a.bottop,
.checkout-page .checkout-pager ul.pager > li > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.checkout-page .checkout-pager ul.pager > li.previous > a.bottop,
.checkout-page .checkout-pager ul.pager > li.next > a.bottop {
    background: #fff;
    border: 1px solid #e8e8e8;
    color: #333;
}

.checkout-page .checkout-pager ul.pager > li.previous.disabled > a.bottop {
    opacity: 0.45;
    pointer-events: none;
}

.checkout-page .checkout-pager ul.pager > li.next > a.bottop,
.checkout-page .checkout-pager ul.pager > li.finish .btn {
    background: #e65100;
    border-color: #e65100;
    color: #fff;
}

.checkout-redirect-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(33, 33, 33, 0.55);
    direction: rtl;
    text-align: center;
}

.checkout-redirect-modal.is-visible {
    display: flex;
}

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

.checkout-redirect-modal__panel {
    width: 100%;
    max-width: 360px;
    padding: 32px 28px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.checkout-redirect-modal__spinner {
    margin-bottom: 18px;
    color: #e65100;
    font-size: 42px;
    line-height: 1;
}

.checkout-redirect-modal__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.checkout-redirect-modal__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}

body.checkout-redirect-locked {
    overflow: hidden;
}

.checkout-page .checkout-pager ul.pager > li.next > a.bottop:hover,
.checkout-page .checkout-pager ul.pager > li.finish .btn:hover {
    background: #bf360c;
    border-color: #bf360c;
    color: #fff;
}

.checkout-page .checkout-wallet-card__header .fa,
.checkout-wallet-order-card .order-card__header .fa {
    margin-left: 8px;
    color: #f0ad4e;
}

@media (max-width: 991px) {
    .cart-page__layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .checkout-payment-grid {
        grid-template-columns: 1fr;
    }

    .checkout-wallet-order-card,
    .checkout-payment-grid > .order-card:last-child {
        grid-column: auto;
    }
}

@media (max-width: 767px) {
    .address-card-grid {
        grid-template-columns: 1fr;
    }

    .form-wizard .wizard-tabs.checkout-wizard-tabs {
        display: none !important;
    }

    .checkout-mobile-steps {
        display: block;
    }

    .cart-product-item {
        flex-direction: column;
    }

    .cart-product-item__image {
        width: 100%;
        text-align: center;
    }

    .cart-product-item__image img {
        max-width: 140px;
    }

    .cart-product-item__actions {
        width: 100%;
    }

    .cart-product-item__qty,
    .cart-product-item__remove {
        flex: 1;
    }

    .cart-summary__cta {
        width: 100%;
    }

    .checkout-discount__form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ========== Add-to-cart modal ========== */
.basket-added-modal .modal-dialog {
    max-width: 480px;
    margin: 30px auto;
}

.basket-added-modal__content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
}

.basket-added-modal__close {
    position: absolute;
    top: 10px;
    left: 14px;
    z-index: 2;
    float: none;
    margin: 0;
    font-size: 24px;
    opacity: 0.45;
    background: transparent;
    border: none;
}

.basket-added-modal__close:hover {
    opacity: 0.85;
}

.basket-added-modal__body {
    direction: rtl;
    text-align: center;
    padding: 28px 24px 24px;
}

.basket-added-modal__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 120px;
    padding: 32px 16px;
    margin: 0 auto;
    color: #666;
    font-size: 14px;
    direction: rtl;
    text-align: center;
}

.basket-added-modal__loading .fa {
    display: block;
    font-size: 28px;
    color: #e65100;
}

.basket-added-modal__loading span {
    display: block;
    width: 100%;
    direction: rtl;
    text-align: center;
}

.basket-added-result__icon {
    margin: 0 auto 14px;
    line-height: 1;
    text-align: center;
}

.basket-added-result__image {
    display: block;
    margin: 0 auto;
    max-width: 180px;
}

.basket-added-result__title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px;
}

.basket-added-result__text {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 22px;
}

.basket-added-result__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.basket-added-result__actions .btn {
    min-width: 140px;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .basket-added-modal .modal-dialog {
        margin: 20px 12px;
        max-width: none;
    }

    .basket-added-result__actions {
        flex-direction: column;
    }

    .basket-added-result__actions .btn {
        width: 100%;
    }
}

/* User comments page */
.user-comments-page .user-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-comments-page .user-comment-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.user-comments-page .user-comment-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.user-comments-page .user-comment-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.user-comments-page .user-comment-card__source a {
    color: #1565c0;
    font-weight: 600;
}

.user-comments-page .user-comment-card__body {
    padding: 18px;
}

.user-comments-page .user-comment-card__title {
    font-size: 16px;
    margin: 0 0 10px;
    color: #222;
}

.user-comments-page .user-comment-card__text {
    color: #444;
    margin-bottom: 12px;
    line-height: 1.8;
}

.user-comments-page .user-comment-card__link {
    display: inline-block;
    font-size: 13px;
    color: #e65100;
    font-weight: 600;
}

.user-comments-page .user-comment-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.user-comments-page .user-comment-badge--sm {
    padding: 2px 8px;
    font-size: 11px;
}

.user-comments-page .user-comment-badge--approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.user-comments-page .user-comment-badge--pending {
    background: #fff3e0;
    color: #e65100;
}

.user-comments-page .user-comment-replies {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e0e0e0;
}

.user-comments-page .user-comment-replies__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.user-comments-page .user-comment-reply {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.user-comments-page .user-comment-reply:last-child {
    margin-bottom: 0;
}

.user-comments-page .user-comment-reply__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.user-comments-page .user-comment-reply__author {
    font-weight: 600;
    color: #222;
}

.user-comments-page .user-comment-reply__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.user-comments-page .user-comment-reply__date {
    color: #888;
    font-size: 12px;
}

.user-comments-page .user-comment-reply__text {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .user-comments-page .user-comment-card__header {
        flex-direction: column;
    }
}

/* ========== Checkout gift selection ========== */
.checkout-gift-step {
    direction: rtl;
    text-align: right;
}

.checkout-gift-step__intro {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-gift-step__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 16px rgba(253, 160, 133, 0.35);
}

.checkout-gift-step__title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
}

.checkout-gift-step__subtotal {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.checkout-gift-step__hint {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 10px;
    background: #fff8e8;
    border: 1px solid #f0d9a8;
    color: #8a6d3b;
    font-size: 13px;
    line-height: 1.6;
}

.checkout-gift-step__hint--ok {
    background: #f0fff4;
    border-color: #b7e4c7;
    color: #2d6a4f;
}

.checkout-gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.checkout-gift-card {
    position: relative;
    display: block;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    margin: 0;
    font-weight: normal;
}

.checkout-gift-card:hover {
    border-color: #e0b35a;
    box-shadow: 0 6px 18px rgba(200, 134, 10, 0.12);
}

.checkout-gift-card.is-selected {
    border-color: #c8860a;
    box-shadow: 0 6px 20px rgba(200, 134, 10, 0.22);
    background: #fffdf8;
}

.checkout-gift-card__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-gift-card__ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, #c8860a, #e0b35a);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(200, 134, 10, 0.35);
}

.checkout-gift-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f7f7f7;
}

.checkout-gift-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.checkout-gift-card__body {
    padding: 12px;
}

.checkout-gift-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.5;
    min-height: 42px;
}

.checkout-gift-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.checkout-gift-card__price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.checkout-gift-card__price-free {
    font-size: 13px;
    font-weight: 700;
    color: #c8860a;
}

.checkout-gift-card__threshold {
    font-size: 11px;
    color: #888;
}

.checkout-gift-card--skip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #fafafa;
    border-style: dashed;
}

.checkout-gift-card--skip .checkout-gift-card__body {
    text-align: center;
}

.checkout-gift-card__skip-icon {
    font-size: 32px;
    color: #bbb;
    margin-bottom: 10px;
}

.checkout-gift-card--locked {
    cursor: not-allowed;
}

.checkout-gift-card--locked .checkout-gift-card__image,
.checkout-gift-card--locked .checkout-gift-card__body {
    filter: grayscale(0.45) blur(0.3px);
    opacity: 0.72;
}

.checkout-gift-card__lock {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
    color: #5c4a1f;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 600;
}

.checkout-gift-card__lock .fa {
    font-size: 28px;
    color: #c8860a;
}

.order-product-item--gift {
    border-color: #e0b35a;
    background: #fffdf8;
}

.order-product-item__gift-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #c8860a, #e0b35a);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.order-product-item__price--gift-free {
    color: #2d6a4f;
    font-weight: 700;
}

@media (max-width: 767px) {
    .checkout-gift-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .checkout-gift-card--skip {
        min-height: 160px;
        grid-column: 1 / -1;
    }

    .checkout-gift-card__name {
        font-size: 12px;
        min-height: 36px;
    }

    .checkout-gift-card__lock {
        font-size: 11px;
        padding: 10px;
    }
}
