/* 购物车沿用站点橙色操作按钮与蓝色规格选中态，所有样式限定在本功能内。 */
.hc-spec-label {
    margin: 0 0 12px;
    color: #666;
    font-size: 14px;
}
.hc-spec[aria-pressed="true"] {
    border-color: #204995;
    background: #eef3fc;
    color: #204995;
    box-shadow: inset 0 0 0 1px #204995;
}
.pd-show .pd-show-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pd-show .hc-add {
    background: #ff6a00;
}
.hc-product-quantity {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0 0 24px;
    font-size: 14px;
}
.hc-product-status {
    min-height: 24px;
    margin: 12px 0 0;
    color: #805020;
    font-size: 14px;
}
.hc-stepper {
    display: inline-flex;
    align-items: stretch;
    height: 36px;
    border: 1px solid #d8dce3;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    color: #333;
}
.hc-stepper button {
    flex: 0 0 34px;
    width: 34px;
    padding: 0;
    border: 0;
    background: #f5f6f8;
    font-size: 18px;
    cursor: pointer;
}
.hc-stepper input {
    box-sizing: border-box;
    width: 68px;
    min-width: 0;
    margin: 0;
    padding: 4px;
    border: 0;
    border-right: 1px solid #e3e6ec;
    border-left: 1px solid #e3e6ec;
    border-radius: 0;
    background: #fff;
    color: #222;
    font-size: 16px;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}
.hc-stepper input::-webkit-inner-spin-button,
.hc-stepper input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.hc-cart-icon {
    position: relative;
}
.hc-cart-icon b {
    position: absolute;
    top: -8px;
    right: -14px;
    min-width: 16px;
    padding: 1px 4px;
    border-radius: 12px;
    background: #ff6a00;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}
.hc[hidden],
.hc [hidden],
.hc-toast[hidden],
[data-cart-count][hidden] {
    display: none !important;
}
body.hc-open {
    overflow: hidden;
}
.hc,
.hc * {
    box-sizing: border-box;
}
.hc {
    position: fixed;
    inset: 0;
    z-index: 1600;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    color: #222;
    font-size: 14px;
}
.hc-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, .4);
}
.hc-dialog {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    height: 100%;
    padding: 28px;
    background: #fff;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .12);
}
.hc-header {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #e6e8ed;
}
.hc-header h2 {
    margin: 0;
    color: #20242b;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}
.hc-header h2 span {
    margin-left: 8px;
    color: #ff6a00;
    font-size: 18px;
}
.hc-header p {
    margin: 6px 0 0;
    color: #777;
    font-size: 13px;
}
.hc-close {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.hc-status {
    flex: 0 0 auto;
    margin: 12px 0;
    color: #805020;
    font-size: 13px;
    line-height: 1.5;
}
.hc-status:empty {
    margin: 0;
}
.hc-status button {
    margin-left: 8px;
    border: 0;
    background: transparent;
    color: #204995;
    text-decoration: underline;
    cursor: pointer;
}
.hc-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}
.hc-empty {
    margin: 0;
    padding: 72px 20px;
    color: #777;
    line-height: 1.8;
    text-align: center;
}
.hc-item {
    display: grid;
    grid-template-columns: 18px 72px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid #eceef2;
}
.hc input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 3px 0 0;
    accent-color: #ff6a00;
    cursor: pointer;
}
.hc-item > img {
    width: 72px;
    height: 72px;
    padding: 4px;
    border: 1px solid #eceef2;
    border-radius: 6px;
    object-fit: contain;
}
.hc-item-body {
    grid-column: 3;
    min-width: 0;
}
.hc-item-title {
    color: #222;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.hc-item-title:hover {
    color: #204995;
}
.hc-item-spec {
    margin: 6px 0 14px;
    color: #777;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.hc-item.is-unavailable .hc-item-spec {
    color: #a14829;
}
.hc-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.hc-item-actions > button,
.hc-selection > button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 13px;
    cursor: pointer;
}
.hc-footer {
    flex: 0 0 auto;
    padding-top: 18px;
    border-top: 1px solid #e6e8ed;
    background: #fff;
}
.hc-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.hc-selection label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.hc-footer p {
    margin: 16px 0;
    color: #666;
}
.hc-footer strong {
    padding: 0 3px;
    color: #ff6a00;
    font-size: 19px;
}
.hc-continue {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: #ff6a00;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.hc-footer small {
    display: block;
    margin-top: 10px;
    color: #888;
    font-size: 12px;
    line-height: 1.6;
}
.hc button:disabled {
    color: #bbb;
    cursor: not-allowed;
}
.hc button:focus-visible,
.hc a:focus-visible,
.hc input:focus-visible,
.hc-spec:focus-visible {
    outline: 2px solid #204995;
    outline-offset: 2px;
}
.hc-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    z-index: 1700;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 12px 20px;
    border-radius: 6px;
    background: #25364e;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    transform: translateX(-50%);
    pointer-events: none;
}
.hc-toast.is-error {
    background: #8b412d;
}
@media (max-width: 767px) {
    .footer-fix ul {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .hc-desktop-entry {
        display: none;
    }
    .footer-fix li.hc-mobile-entry {
        display: block;
    }
    .hc-dialog {
        padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    }
    .hc-item {
        grid-template-columns: 18px 52px minmax(0, 1fr);
        gap: 10px;
        padding: 18px 0;
    }
    .hc-item > img {
        width: 52px;
        height: 52px;
    }
    .hc-item-actions {
        gap: 8px;
    }
    .hc-selection {
        gap: 12px;
    }
    .hc-footer {
        padding-top: 12px;
    }
}
@media (max-height: 550px) {
    .hc-dialog {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .hc-header {
        padding-bottom: 8px;
    }
    .hc-header p,
    .hc-footer small {
        display: none;
    }
    .hc-footer p {
        margin: 8px 0;
    }
    .hc-footer {
        padding-top: 8px;
    }
}
