/* ZENCANG 自定义样式：购物车侧栏、Toast、结算表单、移动端 */

/* ===== 移动端抽屉 ===== */
.mobile-drawer {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-item:hover {
    color: #15803d;
}
.mobile-nav-item i {
    transition: color 0.15s;
}
.mobile-nav-item:hover i {
    color: #15803d;
}

/* ===== 移动端横向滚动分类 tab ===== */
.mobile-cat-tabs::-webkit-scrollbar {
    display: none;
}
.mobile-cat-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

/* ===== 防止 iOS 输入框聚焦时页面自动缩放 ===== */
/* viewport 已设 initial-scale=1.0，这里补全 */
input, select, textarea {
    font-size: 16px !important;
}

/* ===== 购物车侧栏 ===== */
.cart-sidebar {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滚动条美化（购物车列表） */
.cart-scroll::-webkit-scrollbar {
    width: 4px;
}
.cart-scroll::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 2px;
}
.cart-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* Toast */
#toast {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 结算表单 */
.co-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.co-input:focus {
    border-color: #15803d;
    box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}
.co-input::placeholder {
    color: #9ca3af;
}

/* 空购物车 */
.empty-cart-icon {
    color: #d1d5db;
}

/* 购物车徽章 */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    font-weight: 700;
    text-align: center;
}

/* 行点击反馈 */
.admin-row {
    cursor: pointer;
    transition: background-color 0.15s;
}
.admin-row:hover {
    background-color: #f9fafb;
}

/* 表单按钮 disabled 状态 */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 商品卡片统一规格（首页热门 / 分类页 / 今日特价通用）===== */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card .product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f3f4f6;
    overflow: hidden;
}
.product-card .product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-card .product-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1rem;
}
.product-card .product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}
.product-card .product-spec {
    min-height: 1.25em;
}
.product-card .product-price-row {
    margin-top: auto;
}
.product-card .btn-add-cart {
    margin-top: 0.75rem;
}