@charset "utf-8";

.batch-cart {
    --batch-ink: #252b35;
    --batch-muted: #606976;
    --batch-line: #e7e9ed;
    --batch-paper: #fff;
    --batch-accent: #b54708;
    padding: 26px 16px 34px;
    color: var(--batch-ink);
    background: #f8f8f8;
}

.batch-cart [hidden] {
    display: none !important;
}

.batch-cart-content,
.batch-cart-action-content {
    max-width: 1200px;
    margin: 0 auto;
}

.batch-cart-input,
.batch-cart-table-wrap,
.batch-cart-actions {
    border: 1px solid var(--batch-line);
    border-radius: 8px;
    background: var(--batch-paper);
}

.batch-cart-input {
    padding: 20px;
}

.batch-cart-input label,
.batch-cart-results-heading h2 {
    font-size: 17px;
    font-weight: 700;
}

.batch-cart-input p,
.batch-cart-meta {
    color: var(--batch-muted);
}

.batch-cart-input textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.6;
}

.batch-cart-input-actions,
.batch-cart-submit-actions,
.batch-cart-results-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.batch-cart-input-actions {
    margin-top: 12px;
    justify-content: flex-end;
}

.batch-cart-results-heading {
    margin: 23px 0 10px;
    justify-content: space-between;
}

.batch-cart-results-heading h2 {
    margin: 0;
}

.batch-cart .batch-cart-edit-input,
.batch-cart-cell-label {
    display: none;
}

.batch-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.batch-cart-table th,
.batch-cart-table td {
    padding: 12px;
    vertical-align: middle;
    text-align: left;
}

.batch-cart-table th {
    color: var(--batch-muted);
    font-weight: 600;
}

.batch-cart-table td {
    border-top: 1px solid var(--batch-line);
}

.batch-cart-table .batch-cart-check {
    width: 1%;
    white-space: nowrap;
}

.batch-cart-table .batch-cart-remove {
    width: 145px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.batch-cart-remove .btn-link + .btn-link {
    margin-left: 8px;
}

.batch-cart-table .batch-cart-quantity {
    width: 130px;
}

.batch-cart-table .batch-cart-stock,
.batch-cart-table .batch-cart-price {
    width: 135px;
}

.batch-cart-table .batch-cart-quantity input {
    width: 100%;
    max-width: 110px;
}

.batch-cart input[type="checkbox"] {
    margin: 0;
    vertical-align: -2px;
}

.batch-cart-product-name,
.batch-cart-meta,
.batch-cart-warning {
    display: block;
    overflow-wrap: anywhere;
}

.batch-cart-meta {
    font-size: 12px;
}

.batch-cart-warning,
.batch-cart-message.is-error {
    color: #9e321d;
}

.batch-cart-message {
    margin: 12px 0 0;
    padding: 9px 12px;
    border-left: 3px solid currentColor;
    background: var(--batch-paper);
}

.batch-cart .btn-link {
    padding-right: 0;
    padding-left: 0;
}

.batch-cart-actions {
    max-width: 1200px;
    padding: 12px 16px;
    margin: 12px auto 0;
}

.batch-cart-action-content,
.batch-cart-selection {
    display: flex;
    align-items: center;
    gap: 12px;
}

.batch-cart-action-content {
    justify-content: space-between;
}

.batch-cart-selection label {
    flex: none;
    margin: 0;
    font-weight: 400;
}

.batch-cart-desktop .batch-cart-query-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 400px);
    align-items: start;
    gap: 10px;
    margin-bottom: 14px;
}

.batch-cart-desktop .batch-cart-input {
    padding: 0;
    border: 0;
    background: transparent;
}

.batch-cart-desktop .batch-cart-input textarea {
    min-height: 152px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    resize: none;
    box-shadow: none;
}

.batch-cart-desktop .batch-cart-input-actions {
    min-height: 38px;
    margin-top: 8px;
    justify-content: space-between;
}

.batch-cart-desktop .batch-cart-input-actions p {
    margin: 0;
}

.batch-cart-desktop .batch-cart-input-actions .btn {
    min-width: 88px;
}

.batch-cart-ad {
    width: 100%;
    max-width: 400px;
    max-height: 200px;
    aspect-ratio: 2 / 1;
    min-width: 0;
    overflow: hidden;
}

.batch-cart-ad ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.batch-cart-ad img {
    display: block;
    width: 100%;
    max-height: 200px;
    aspect-ratio: 2 / 1;
    object-fit: contain;
}

.batch-cart-ad .bx-wrapper {
    margin-bottom: 0;
}

.batch-cart-ad .bx-viewport {
    left: 0;
    border: 0;
    box-shadow: none;
}

.batch-cart-desktop .batch-cart-results-heading {
    height: 0;
    margin: 0;
}

.batch-cart-desktop .batch-cart-table-wrap,
.batch-cart-desktop .batch-cart-actions {
    border: 0;
    border-radius: 0;
}

.batch-cart-desktop .batch-cart-table th label {
    margin: 0;
    font-weight: 400;
}

.batch-cart-desktop .batch-cart-table .batch-cart-number {
    width: 50px;
    white-space: nowrap;
}

.batch-cart-desktop .batch-cart-table .batch-cart-price {
    width: 105px;
}

.batch-cart-desktop .batch-cart-table .batch-cart-total {
    width: 130px;
}

.batch-cart-product {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.batch-cart-thumbnail {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border: 1px solid #e5e5e5;
    background: #fff;
}

.batch-cart-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.batch-cart-product-details {
    min-width: 0;
}

.batch-cart-product-details .product-card-name {
    margin-top: 0;
}

.batch-cart-quantity-input {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
}

.batch-cart-desktop .batch-cart-quantity-input input {
    width: 65px;
    text-align: center;
}

.batch-cart-quantity-stepper {
    display: flex;
    flex-direction: column;
}

.batch-cart-quantity-stepper button {
    flex: 1;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-left: 0;
    background: #f8f8f8;
    font-size: 9px;
    line-height: 1;
}

.batch-cart-quantity-stepper button + button {
    border-top: 0;
}

.batch-cart-desktop .batch-cart-actions {
    margin-top: 20px;
    padding: 0;
}

.batch-cart-desktop .batch-cart-action-content {
    column-gap: 0;
}

.batch-cart-desktop .batch-cart-selection {
    flex: 1;
    justify-content: space-between;
}

.batch-cart-desktop .batch-cart-clear {
    min-width: 90px;
    min-height: 41px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: inherit;
    border-radius: 0;
}

.batch-cart-desktop #batchCartSummary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    text-align: right;
}

.batch-cart-desktop .batch-cart-submit-actions .btn {
    min-width: 155px;
    border-radius: 0;
}

.batch-cart-retry {
    margin: 8px 0;
}

.batch-cart-submit-actions {
    flex-wrap: wrap;
}

.batch-cart-submit-actions .batch-cart-login-action {
    border-style: dashed;
}

.batch-cart-login-hint {
    flex: 0 0 100%;
    margin: 0;
    color: var(--batch-muted);
    font-size: 12px;
    text-align: center;
}

.batch-cart-options {
    display: grid;
    gap: 8px;
}

.batch-cart-correction {
    margin-bottom: 12px;
}

.batch-cart-option {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--batch-line);
    border-radius: 6px;
    background: var(--batch-paper);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.batch-cart-option:disabled {
    color: var(--batch-muted);
    background: #f7f7f7;
}

.batch-cart-option[aria-pressed="true"] {
    border-color: var(--batch-accent);
}

.batch-cart-option:not(:disabled):hover,
.batch-cart-option:not(:disabled):focus {
    border-color: var(--batch-accent);
    background: #fff8f1;
}

.batch-cart-mobile {
    padding: 14px var(--mobile-v2-gutter);
    padding-bottom: calc(16px + var(--batch-cart-footer-height, 110px+ env(safe-area-inset-bottom, 0px)));
}

.batch-cart-mobile .batch-cart-input {
    padding: 14px;
}

/* iOS 聚焦小字号文本框时会自动缩放页面，手机端输入和纠错都使用 16px。 */
.batch-cart-mobile .batch-cart-input textarea,
.batch-cart-mobile .batch-cart-correction input {
    font-size: 16px;
}

.batch-cart-mobile .batch-cart-input-actions {
    align-items: flex-start;
}

.batch-cart-mobile .batch-cart-input-actions p {
    flex: 1;
    margin: 0;
}

.batch-cart-mobile .batch-cart-results-heading {
    margin-top: 0;
}

.batch-cart-mobile .batch-cart-card-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.batch-cart-mobile .batch-cart-card {
    display: grid;
    grid-template-columns: 18px 80px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--batch-line);
    border-radius: 10px;
    background: var(--batch-paper);
}

.batch-cart-mobile .batch-cart-card .batch-cart-thumbnail {
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
}

.batch-cart-mobile .batch-cart-card .batch-cart-thumbnail a {
    display: block;
    height: 100%;
}

.batch-cart-mobile .batch-cart-card .product-card-name {
    margin: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.batch-cart-mobile .batch-cart-card .batch-cart-product-details {
    display: grid;
    gap: 5px;
}

.batch-cart-mobile .batch-cart-card-purchase {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 4px 8px;
}

.batch-cart-mobile .batch-cart-card .batch-cart-price {
    overflow-wrap: anywhere;
}

.batch-cart-mobile .batch-cart-card .product-card-price {
    display: inline;
    font-size: inherit;
    line-height: inherit;
}

.batch-cart-mobile .batch-cart-quantity .spinner.input-group-sm {
    /* 按购物车宽度固定三列，避免旧输入组的浮动把输入框挤到减号左边。 */
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 25px;
    width: 85px;
}

.batch-cart-mobile .batch-cart-quantity .spinner.input-group-sm input {
    float: none;
    padding-right: 0;
    padding-left: 0;
}

.batch-cart-mobile .batch-cart-card-purchase > .batch-cart-warning {
    grid-column: 1 / -1;
}

.batch-cart-mobile .batch-cart-card .batch-cart-remove {
    text-align: right;
}

.batch-cart-mobile .batch-cart-card .batch-cart-remove .btn + .btn {
    margin-left: 8px;
}

.batch-cart-mobile .batch-cart-card.is-unresolved {
    grid-template-columns: minmax(0, 1fr);
}

.batch-cart-mobile .is-unresolved .batch-cart-card-purchase {
    grid-template-columns: minmax(0, 1fr);
}

.batch-cart-mobile .batch-cart-cell-label {
    display: inline-block;
    margin-right: 4px;
    color: var(--batch-muted);
    font-size: 12px;
}

.batch-cart-mobile .batch-cart-actions {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none;
    padding: 5px 0;
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
}

.batch-cart-mobile .batch-cart-action-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    max-width: none;
}

.batch-cart-mobile .batch-cart-selection {
    padding: 0 8px;
}

.batch-cart-mobile #batchCartSummary {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 8px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.batch-cart-mobile .batch-cart-submit-actions {
    display: grid;
    /* 与货品详情页一致，左半放三个快捷入口，右半放两个购买按钮。 */
    grid-template-columns: repeat(3, minmax(0, 2fr)) repeat(2, minmax(0, 3fr));
    gap: 0;
}

.batch-cart-mobile .batch-cart-submit-actions .btn-block {
    justify-self: center;
    width: calc(100% - 8px);
    min-width: 0;
}

/* 有待核对操作且未登录时，继续添加可能隐藏，购买按钮仍在原来的右侧两列。 */
.batch-cart-mobile .batch-cart-submit-actions [data-batch-submit="cart"] {
    grid-column: 4;
}

.batch-cart-mobile .batch-cart-submit-actions [data-batch-submit="checkout"] {
    grid-column: 5;
}

.batch-cart-mobile .batch-cart-submit-actions .batch-cart-login-action {
    border-width: 1px;
}

.batch-cart-mobile .batch-cart-submit-actions .mobile-product-action-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 18px;
    white-space: nowrap;
}

.batch-cart-mobile .batch-cart-submit-actions .mobile-product-action-shortcut:disabled {
    opacity: 0.65;
}

.batch-cart-mobile .batch-cart-picker .modal-dialog {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
}

.batch-cart-mobile .batch-cart-picker .modal-content {
    border-radius: 14px 14px 0 0;
}

.batch-cart-mobile .batch-cart-picker .modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
}
