/* Order2 cart */
.order2-cart {
    width: 100%;
    box-sizing: border-box;
}

.order2-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.order2-cart-header h1 {
    margin: 0 0 6px;
}

.order2-cart-count {
    font-size: 14px;
    opacity: .75;
}

.order2-cart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
}

.order2-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-weight: 600;
}

.order2-select-all input,
.order2-item-check {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #64181c;
    cursor: pointer;
}

.order2-selected-count {
    color: #777;
    font-size: 13px;
}

.order2-bulk-remove-form {
    margin: 0;
}

.order2-bulk-delete-button,
.order2-delete-button {
    border: 0;
    background: transparent;
    color: #64181c;
    cursor: pointer;
}

.order2-bulk-delete-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.order2-bulk-delete-button:hover:not(:disabled) {
    background: #f7f1f1;
}

.order2-bulk-delete-button:disabled {
    color: #aaa;
    cursor: default;
    opacity: .7;
}

.order2-cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order2-cart-item {
    display: grid;
    grid-template-columns: 24px 96px minmax(220px, 1fr) 120px 130px 120px 42px;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.order2-cart-item:hover {
    border-color: #d4d4d4;
}

.order2-cart-item-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

.order2-product-image {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f3f5;
    box-sizing: border-box;
}

.order2-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.order2-product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #9a9da3;
    font-size: 12px;
    box-sizing: border-box;
}

.order2-product-placeholder-icon {
    font-size: 28px;
    line-height: 1;
}

.order2-cart-item-info {
    min-width: 0;
}

.order2-product-name {
    display: block;
    margin: 0 0 8px;
    color: #222;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.order2-product-name:hover {
    color: #64181c;
}

.order2-product-meta {
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.order2-product-details {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
}

.order2-cart-item-price,
.order2-cart-item-sum {
    text-align: right;
    white-space: nowrap;
}

.order2-cart-item-price strong,
.order2-cart-item-sum strong {
    font-size: 16px;
}

.order2-cart-item-quantity {
    display: flex;
    justify-content: center;
}

.order2-quantity-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.order2-quantity-button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    background: #fff;
    color: #64181c;
    font-size: 18px;
    line-height: 28px;
    cursor: pointer;
}

.order2-quantity-button:hover {
    background: #f7f1f1;
    border-color: #64181c;
}

.order2-quantity-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.order2-cart-item-sum-label {
    display: none;
}

.order2-cart-item-delete {
    display: flex;
    justify-content: center;
}

.order2-delete-button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px;
    font-size: 17px;
}

.order2-delete-button:hover {
    background: #f7f1f1;
}

.order2-trash-icon {
    line-height: 1;
}

.order2-cart-bottom {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 24px;
    margin-top: 18px;
    padding: 18px 0 0;
    border-top: 1px solid #ddd;
}

.order2-delivery-rules {
    color: #d00000;
    font-weight: 700;
}

.order2-cart-total-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.order2-cart-total-box strong {
    font-size: 20px;
}

.order2-cart-error {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid #e0b4b4;
    border-radius: 8px;
    background: #fff5f5;
    color: #8b1e24;
}

.order2-cart-empty {
    padding: 40px 25px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.order2-cart-empty-title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.order2-cart-empty-text {
    margin-bottom: 20px;
    color: #666;
}

/* Common Order2 buttons */
.order2-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 24px;
    box-sizing: border-box;
    border: 1px solid #64181c;
    border-radius: 6px;
    background: #64181c;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.order2-button:hover {
    background: #4f1216;
    border-color: #4f1216;
    color: #fff;
}

.order2-button:active {
    transform: translateY(1px);
}

.order2-button-secondary {
    background: #fff;
    border-color: #cfcfcf;
    color: #555;
    text-decoration: none;
}

.order2-button-secondary:hover {
    background: #fff;
    border-color: #64181c;
    color: #64181c;
}

/* Order2 checkout */
.order2-checkout {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 30px 20px 50px;
    box-sizing: border-box;
}

.order2-checkout-header {
    margin-bottom: 30px;
}

.order2-checkout-header h1 {
    margin: 0 0 8px;
}

.order2-checkout-header p {
    margin: 0;
    opacity: .75;
}

.order2-required-note {
    margin-top: 6px !important;
    font-size: 13px;
}

.order2-required-note span,
.order2-required {
    color: #c62828;
}

.order2-checkout-error {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid #e0b4b4;
    border-radius: 8px;
    background: #fff5f5;
    color: #8b1e24;
}

.order2-checkout-section {
    margin-bottom: 28px;
    padding: 22px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #fff;
}

.order2-checkout-section h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.order2-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.order2-checkout-grid label,
.order2-checkout-full {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.order2-checkout-grid label span,
.order2-checkout-full span {
    font-size: 14px;
    font-weight: 600;
}

.order2-checkout input,
.order2-checkout select,
.order2-checkout textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.order2-checkout-full {
    grid-column: 1 / -1;
}

.order2-field-error {
    margin-top: 5px;
    color: #c62828;
    font-size: 13px;
    line-height: 1.3;
}

.order2-email-login-link {
    margin-top: 2px;
    color: #8b0000;
    font-size: 14px;
    font-weight: 600;
}

body.order2-login-prompt-open {
    overflow: hidden;
}

.order2-login-prompt {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.order2-login-prompt__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .48);
}

.order2-login-prompt__dialog {
    position: relative;
    width: min(100%, 500px);
    padding: 32px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .28);
}

.order2-login-prompt__dialog h2 {
    margin: 0 36px 14px 0;
    font-size: 23px;
}

.order2-login-prompt__dialog p {
    margin: 0;
    line-height: 1.5;
}

.order2-login-prompt__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f0f0f0;
    color: #555;
    font-size: 27px;
    line-height: 30px;
    cursor: pointer;
}

.order2-login-prompt__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.order2-field-invalid > span {
    color: #c62828;
}

.order2-field-invalid input,
.order2-field-invalid select,
.order2-field-invalid textarea {
    border-color: #c62828;
}

.order2-field-invalid input:focus,
.order2-field-invalid select:focus,
.order2-field-invalid textarea:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, .10);
}

.order2-checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

@media (max-width: 900px) {
    .order2-cart-item {
        grid-template-columns: 24px 86px minmax(0, 1fr) 110px 42px;
    }

    .order2-product-image {
        width: 86px;
        height: 86px;
    }

    .order2-cart-item-price {
        grid-column: 3;
        grid-row: 2;
        text-align: left;
    }

    .order2-cart-item-quantity {
        grid-column: 4;
        grid-row: 2;
    }

    .order2-cart-item-sum {
        grid-column: 3;
        grid-row: 3;
        text-align: left;
    }

    .order2-cart-item-delete {
        grid-column: 5;
        grid-row: 2 / span 2;
    }

    .order2-cart-bottom {
        grid-template-columns: 1fr auto;
    }

    .order2-delivery-rules {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .order2-cart-header,
    .order2-cart-toolbar {
        align-items: flex-start;
    }

    .order2-cart-header {
        flex-direction: column;
    }

    .order2-cart-item {
        grid-template-columns: 24px 80px minmax(0, 1fr) 38px;
        gap: 12px;
        padding: 14px;
    }

    .order2-product-image {
        width: 80px;
        height: 80px;
    }

    .order2-cart-item-price,
    .order2-cart-item-quantity,
    .order2-cart-item-sum,
    .order2-cart-item-delete {
        grid-column: auto;
        grid-row: auto;
    }

    .order2-cart-item-price {
        grid-column: 3;
        text-align: left;
    }

    .order2-cart-item-quantity {
        grid-column: 3;
        justify-content: flex-start;
    }

    .order2-cart-item-sum {
        grid-column: 3;
        text-align: left;
    }

    .order2-cart-item-delete {
        grid-column: 4;
        grid-row: 4 / span 2;
    }

    .order2-cart-item-sum-label {
        display: inline;
        margin-right: 5px;
        color: #777;
        font-size: 13px;
    }

    .order2-cart-bottom {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .order2-checkout-button {
        width: 100%;
    }

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

    .order2-checkout-full {
        grid-column: auto;
    }

    .order2-checkout-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .order2-button {
        width: 100%;
    }
}

/* Order2 — order history inside Users account */
.order2-account-orders {
    width: 100%;
    box-sizing: border-box;
}

.order2-account-orders__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-bottom: 1px solid #ddd;
}

.order2-account-orders__header h2 {
    margin: 0 0 5px;
    font-size: 28px;
    line-height: 1.2;
}

.order2-account-orders__header p {
    margin: 0;
    color: #777;
    font-size: 16px;
}

.order2-account-orders__empty {
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.order2-account-orders__empty h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.order2-account-orders__empty p {
    margin: 0;
    color: #777;
}

.order2-account-orders__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order2-account-order {
    overflow: hidden;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
}

.order2-account-order__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 24px;
    padding: 16px 18px;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
}

.order2-account-order__label {
    display: block;
    margin-bottom: 3px;
    color: #64181c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.order2-account-order__top strong {
    font-size: 19px;
    line-height: 1.2;
}

.order2-account-order__date {
    color: #777;
    font-size: 14px;
    white-space: nowrap;
}

.order2-account-order__total {
    color: #111;
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
}

.order2-account-order__items {
    padding: 0 18px;
}

.order2-account-order__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 20px;
    min-height: 48px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.order2-account-order__item:last-child {
    border-bottom: 0;
}

.order2-account-order__item-name {
    min-width: 0;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .order2-account-orders__header {
        display: block;
    }

    .order2-account-order__top {
        grid-template-columns: 1fr auto;
        gap: 8px 16px;
    }

    .order2-account-order__date {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .order2-account-order__total {
        grid-column: 2;
        grid-row: 1;
    }

    .order2-account-order__item {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px 12px;
    }

    .order2-account-order__item span:last-child {
        grid-column: 2;
        grid-row: 1;
    }
}

/* --------------------------------------------------------------------------
 * Users account navigation — same visual language as Catalog2
 * -------------------------------------------------------------------------- */
.users-account__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.users-account__nav a {
    display: inline-block;
    box-sizing: border-box;
    padding: 9px 16px;
    border: 1px solid #a90000;
    border-radius: 5px;
    background: #fff;
    color: #8b0000;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: .2s;
}

.users-account__nav a:hover {
    background: #f5f5f5;
    border-color: #a90000;
    color: #a90000;
    text-decoration: none;
}

.users-account__nav a.is-active,
.users-account__nav a.is-active:hover {
    background: #a90000;
    border-color: #a90000;
    color: #fff;
}


/* Cart controls */
.order2-quantity-form[data-cart-quantity-control] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}
.order2-quantity-form[data-cart-quantity-control][aria-busy="true"] { opacity: .6; pointer-events: none; }
.order2-quantity-button:disabled { opacity: .45; cursor: default; }

/* Removal modal — same burgundy/white visual language, no blue controls. */
body.order2-modal-open { overflow: hidden; }
.order2-modal[hidden] { display: none; }
.order2-modal { position: fixed; inset: 0; z-index: 99999; }
.order2-modal__backdrop { position: absolute; inset: 0; background: rgba(30,30,30,.35); }
.order2-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(466px, calc(100vw - 28px));
    margin: 10vh auto 0;
    padding: 28px 34px 32px;
    box-sizing: border-box;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 12px 45px rgba(0,0,0,.22);
}
.order2-modal__dialog h2 { margin: 0 0 18px; color: #111; font-size: 21px; }
.order2-modal__dialog p { margin: 0 0 24px; color: #333; line-height: 1.45; }
.order2-modal__close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border: 0; border-radius: 50%;
    background: #edf2f6; color: #66717b; font-size: 24px; line-height: 30px; cursor: pointer;
}
.order2-modal__actions { display: flex; justify-content: flex-start; }
.order2-modal__confirm { min-height: 40px; background: #a90000; border-color: #a90000; }
.order2-modal__confirm:hover { background: #8b0000; border-color: #8b0000; }

/* Removal confirmation uses the shared System/UI Modal component. */
.order2-existing-remove-modal {
    width: min(100%, 520px);
    box-sizing: border-box;
    padding: 32px 36px 34px;
}

.order2-existing-remove-modal h2 {
    margin: 0 0 18px;
    color: #111;
    font-size: 22px;
}

.order2-existing-remove-modal p {
    margin: 0 0 24px;
    color: #333;
    line-height: 1.45;
}

.order2-existing-remove-modal__actions {
    display: flex;
    justify-content: flex-start;
}

.order2-existing-remove-modal .order2-modal__confirm {
    min-height: 40px;
    background: #a90000;
    border-color: #a90000;
    color: #fff;
}
