/*
 * Vuetify 全局覆盖样式
 * 约定：
 * - 后续所有针对 Vuetify 组件的样式覆盖，统一维护在本文件
 * - 每块覆盖请按“组件/页面”分段注释，便于查找和维护
 */

/* 全站 Vuetify 使用 OpenSans，加粗时走 Bold 字重文件（勿用 *，避免覆盖图标字体） */
.v-application {
    font-family: var(--font-open-sans, "HarmonyOS_Sans_Regular", PingFang SC, Microsoft YaHei, sans-serif) !important;
}

/*
 * [ListProductModule.vue]
 * 计数器（v-number-input）强制样式覆盖
 * 目的：
 * 1) 覆盖 Vuetify v-number-input 默认样式，保证计数器视觉稳定
 * 2) 统一为设计稿风格（胶囊边框、左灰右白、数字居中）
 * 作用范围：
 * - 仅对 .ListProductModule 中的 .ListProductModuleQtyInput 生效
 */
.ListProductModule .ListProductModuleQtyInput{
    width: 100% !important;
    max-width: none !important;
}
.ListProductModule .ListProductModuleQtyInput .v-field {
    border-radius: 19px !important;
    border: none !important;
    background: #fff !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

.ListProductModule .ListProductModuleQtyInput .v-field__field,
.ListProductModule .ListProductModuleQtyInput .v-field__input {
    min-height: 38px !important;
    height: 38px !important;
}

.ListProductModule .ListProductModuleQtyInput .v-field__input input {
    text-align: center !important;
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.ListProductModule .ListProductModuleQtyInput .v-btn {
    width: 40px !important;
    min-width: 34px !important;
    height: 38px !important;
    border-radius: 0 !important;
    border-left: 1px solid #e6e6e6 !important;
    background: #fff !important;
    color: #222 !important;
    box-shadow: none !important;
}

.ListProductModule .v-btn--disabled .v-btn__overlay, .ListProductModule .v-btn--disabled .v-btn__overlay{
   opacity: 0.03 !important;
   background: #fff !important;
}

.ListProductModule .ListProductModuleQtyInput .v-btn:first-of-type {
    border-left: 0 !important;
    background: #fff !important;
}

.ListProductModule .ListProductModuleQtyInput .v-btn .v-icon {
    font-size: 16px !important;
    font-weight: 700 !important;
}

.ListProductModule  .v-field__outline{
    border: 1px solid #e6e6e6 !important;
}

.ListProductModule .v-field__outline__start{
    border: none !important;
}

.ListProductModule .v-field__outline__end{
    border: none !important;
}

@media (max-width: 980px) {
    .ListProductModule .ListProductModuleQtyInput .v-field {
        border-radius: 17px !important;
    }

    .ListProductModule .ListProductModuleQtyInput .v-field__field,
    .ListProductModule .ListProductModuleQtyInput .v-field__input {
        min-height: 34px !important;
        height: 34px !important;
    }

    .ListProductModule .ListProductModuleQtyInput .v-btn {
        height: 34px !important;
    }
}

/*
 * [cart.vue - PC]
 * 购物车表格内数量输入框
 */
.CartQtyModule:not(.CartQtyModule--h5) {
    --cart-qty-h: 35px;
    --cart-qty-btn: 35px;
    --cart-qty-mid: 80px;
    --cart-qty-border: #dcdcdc;
    --cart-qty-text: #333;
    --cart-qty-hover: #f7f7f7;
    display: inline-flex;
    justify-content: center;
    width: auto;
    margin: 0 auto;
}

.CartQtyModule .CartQtyInput {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto;
}

.CartQtyModule .CartQtyInput .v-input__control,
.CartQtyModule .CartQtyInput .v-input__details {
    min-height: 0 !important;
}

.CartQtyModule .CartQtyInput .v-field {
    width: auto !important;
    min-width: calc(var(--cart-qty-btn) * 2 + var(--cart-qty-mid)) !important;
    border-radius: calc(var(--cart-qty-h) / 2) !important;
    border: 1px solid var(--cart-qty-border) !important;
    background: #fff !important;
    overflow: hidden !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.CartQtyModule .CartQtyInput .v-field__overlay,
.CartQtyModule .CartQtyInput .v-field__underlay,
.CartQtyModule .CartQtyInput .v-field__outline {
    display: none !important;
}

.CartQtyModule .CartQtyInput .v-field__field {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    min-height: var(--cart-qty-h) !important;
    height: var(--cart-qty-h) !important;
    padding: 0 !important;
}

/* 隐藏 Vuetify 内置竖线，避免与自定义分隔线叠加 */
.CartQtyModule .CartQtyInput .v-divider--vertical {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
}

.CartQtyModule .CartQtyInput .v-btn {
    flex: 0 0 var(--cart-qty-btn) !important;
    width: var(--cart-qty-btn) !important;
    min-width: var(--cart-qty-btn) !important;
    height: var(--cart-qty-h) !important;
    min-height: var(--cart-qty-h) !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--cart-qty-text) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
}

.CartQtyModule .CartQtyInput .v-field__input {
    flex: 1 1 var(--cart-qty-mid) !important;
    min-width: var(--cart-qty-mid) !important;
    max-width: 56px !important;
    min-height: var(--cart-qty-h) !important;
    height: var(--cart-qty-h) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: #fff !important;
}

/* 单线分隔：数字区左侧、加号按钮左侧各一条（兼容中间 v-divider） */
.CartQtyModule .CartQtyInput .v-field__input {
    border-left: 1px solid var(--cart-qty-border) !important;
    border-right: 1px solid var(--cart-qty-border) !important;
}

.CartQtyModule .CartQtyInput .v-field__field > .v-btn:last-of-type {
    border-left: 1px solid var(--cart-qty-border) !important;
}

.CartQtyModule .CartQtyInput .v-field__input input {
    text-align: center !important;
    font-size: 15px !important;
    line-height: var(--cart-qty-h) !important;
    color: var(--cart-qty-text) !important;
    font-weight: 500 !important;
    padding: 0 4px !important;
    min-height: var(--cart-qty-h) !important;
    height: var(--cart-qty-h) !important;
    field-sizing: content;
}

.CartQtyModule .CartQtyInput .v-field__input input:focus {
    outline: none !important;
}

.CartQtyModule .CartQtyInput .v-btn .v-btn__overlay,
.CartQtyModule .CartQtyInput .v-btn .v-btn__underlay {
    opacity: 0 !important;
}

.CartQtyModule .CartQtyInput .v-btn:hover {
    background: var(--cart-qty-hover) !important;
}

.CartQtyModule .CartQtyInput .v-btn:hover .v-btn__overlay {
    opacity: 0 !important;
}

.CartQtyModule .CartQtyInput .v-btn:active {
    background: #efefef !important;
}

.CartQtyModule .CartQtyInput .v-btn--disabled {
    opacity: 0.4 !important;
    background: #ececec !important;
}

.CartQtyModule .CartQtyInput .v-btn .v-icon {
    font-size: 17px !important;
    font-weight: 300 !important;
    color: var(--cart-qty-text) !important;
    opacity: 0.85;
}

.CartQtyModule .CartQtyInput .v-field--focused {
    border-color: var(--cart-qty-border) !important;
    box-shadow: none !important;
}

.cart-table .col-qty .CartQtyModule:not(.CartQtyModule--h5) {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.cart-table hr{
    display: none;
}

/*
 * [cart.vue - H5]
 * 移动端购物车累加器：全宽胶囊，左右窄按钮 + 中间宽数字
 * 作用范围：.CartQtyModule--h5 .CartMbQtyInput
 */
.CartQtyModule--h5 {
    --h5-qty-h: 42px;
    --h5-qty-btn: 42px;
    --h5-qty-border: #e0e0e0;
    --h5-qty-icon: #bdbdbd;
    --h5-qty-num: #333;
    display: block;
    width: 100%;
}

.CartQtyModule--h5 .CartMbQtyInput {
    width: 100%;
}

.CartQtyModule--h5 .CartMbQtyInput .v-input__control,
.CartQtyModule--h5 .CartMbQtyInput .v-input__details {
    min-height: 0 !important;
    width: 100% !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field {
    width: 100% !important;
    min-width: 0 !important;
    height: var(--h5-qty-h) !important;
    min-height: var(--h5-qty-h) !important;
    padding: 0 !important;
    border: 1px solid var(--h5-qty-border) !important;
    border-radius: 8px !important;
    background: #fff !important;
    overflow: hidden !important;
    box-shadow: none !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__overlay,
.CartQtyModule--h5 .CartMbQtyInput .v-field__underlay,
.CartQtyModule--h5 .CartMbQtyInput .v-field__outline {
    display: none !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__field {
    display: flex !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: var(--h5-qty-h) !important;
    min-height: var(--h5-qty-h) !important;
    padding: 0 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-divider--vertical {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn {
    flex: 0 0 var(--h5-qty-btn) !important;
    width: var(--h5-qty-btn) !important;
    min-width: var(--h5-qty-btn) !important;
    max-width: var(--h5-qty-btn) !important;
    height: var(--h5-qty-h) !important;
    min-height: var(--h5-qty-h) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn .v-btn__overlay,
.CartQtyModule--h5 .CartMbQtyInput .v-btn .v-btn__underlay {
    opacity: 0 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn:hover {
    background: #fafafa !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn:active {
    background: #f0f0f0 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn--disabled {
    opacity: 0.45 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-btn .v-icon {
    font-size: 18px !important;
    font-weight: 300 !important;
    color: var(--h5-qty-icon) !important;
    opacity: 1 !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--h5-qty-h) !important;
    min-height: var(--h5-qty-h) !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-left: 1px solid var(--h5-qty-border) !important;
    border-right: 1px solid var(--h5-qty-border) !important;
    background: #fff !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__field > .v-btn:last-of-type {
    border-left: 1px solid var(--h5-qty-border) !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__input input {
    width: 100% !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: var(--h5-qty-h) !important;
    color: var(--h5-qty-num) !important;
    padding: 0 8px !important;
    min-height: var(--h5-qty-h) !important;
    height: var(--h5-qty-h) !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field__input input:focus {
    outline: none !important;
}

.CartQtyModule--h5 .CartMbQtyInput .v-field--focused {
    border-color: var(--h5-qty-border) !important;
    box-shadow: none !important;
}
