body {
    background-color: #ffffff;
}

/* ==================== 商品卡片 ==================== */
.f-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    border-radius: 6px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.f-product-card img {
    transition: transform 0.3s ease;
}

/* 卡片悬停：背景与阴影 */
.f-product-card:hover {
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* 改为：鼠标在图片上才放大 */
.f-product-card img:hover {
    transform: scale(1.08);
}

.f-product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==================== 分类卡片 ==================== */
.f-category-card {
    position: relative;
    overflow: hidden;
}

.f-category-card img {
    transition: transform 0.3s ease;
}

.f-category-card:hover img {
    transform: scale(1.05);
}

/* ==================== 文章卡片 ==================== */
.f-article-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 2px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #dbdbdb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.f-article-card:hover {
    transform: translateY(-5px);
}


/* ==================== Checkout 页 （多处使用）====================  */
.selector-item {
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
}

.selector-item:hover {
    background-color: #f7f7f7;
}

.selector-item.active {
    background-color: #efefef;
}

/* ==================== ProductDetail 页（多处使用） ====================  */
.quantity-decrease {
    margin-left: 10px;
    padding: 8px;
    background-color: #dbdbdb;
}

.quantity-increase {
    padding: 8px;
    background-color: #dbdbdb;
}

.quantity-input {
    width: 50px;
    padding: 8px;
    border: 0;
    text-align: center;
    background-color: transparent;
}

/* ==================== 响应式显示工具类 ====================
   xs: width < 600px
   sm: 600px <= width < 960px
   md: 960px <= width < 1280px
   lg: 1280px <= width < 1920px
   xl: width >= 1920px（沿用原文件定义，无 xxl 分组）
   AndDown：当前断点及以下；AndUp：当前断点及以上。
   使用范围语法避免小数像素断点空隙。
   ========================================================== */

/* 超小屏幕 (xs): 0px - 599px */
@media (width < 600px) {
    .XsOnly-hidden {
        display: none;
    }
}

/* 小屏幕 (sm): 600px - 959px */
@media (width < 960px) {
    .SmAndDown-hidden {
        display: none;
    }
}

@media (min-width: 600px) {
    .SmAndUp-hidden {
        display: none;
    }
}

/* 中屏幕 (md): 960px - 1279px */
@media (width < 1280px) {
    .MdAndDown-hidden {
        display: none;
    }
}

@media (min-width: 960px) {
    .MdAndUp-hidden {
        display: none;
    }
}

/* 大屏幕 (lg): 1280px - 1919px */
@media (width < 1920px) {
    .LgAndDown-hidden {
        display: none;
    }
}

@media (min-width: 1280px) {
    .LgAndUp-hidden {
        display: none;
    }
}

/* xl 为当前定义中的最高断点，因此 AndDown 覆盖所有宽度。 */
.XlAndDown-hidden {
    display: none;
}

/* 超大屏幕 (xl): 1920px 及以上 */

@media (min-width: 1920px) {
    .XlAndUp-hidden {
        display: none;
    }
}

/* 额外添加：仅在某些断点显示 */
@media (min-width: 600px) and (width < 960px) {
    .SmOnly-hidden {
        display: none;
    }
}

@media (min-width: 960px) and (width < 1280px) {
    .MdOnly-hidden {
        display: none;
    }
}

@media (min-width: 1280px) and (width < 1920px) {
    .LgOnly-hidden {
        display: none;
    }
}

/* ==================== 大屏幕五列布局（lg+） ==================== */
@media (min-width: 1280px) {
    .responsive-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px !important;
        padding: 0;
        margin: 0 auto;
    }

    .lg-5cols {
        flex-grow: 0;
        flex-shrink: 0;
        max-width: calc((100% - 20px) / 5) !important; /* 假设父容器 gap 为 5px */
        flex-basis: calc((100% - 20px) / 5) !important; /* 五列之间共四个间隔 */
        width: 100%;
    }
}

/* ==================== 无障碍：减少动画 ==================== */
@media (prefers-reduced-motion: reduce) {
    .f-product-card,
    .f-product-card img,
    .f-category-card img,
    .f-article-card {
        transition: none;
    }

    .f-product-card img:hover,
    .f-category-card:hover img,
    .f-article-card:hover {
        transform: none;
    }
}
