/* shop-category-page.css */

/* 商店页面通用样式 */
.shop-category-page-caption {
    position: absolute;
    bottom: 50px; /* 默认设置，适用于PC和平板 */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 10px;
    text-align: center;
    max-width: 90%; /* 默认最大宽度 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px;
}

.shop-category-page-caption h1,
.shop-category-page-caption p {
    margin: 0;
    padding: 5px 10px;
}

.shop-category-page-caption a {
    display: inline-block;
    margin-top: auto; /* 将按钮推到容器底部 */
    background-color: white; /* 设置按钮为白色 */
    color: black;
    border-radius: 50px; /* 药丸效果 */
    padding: 10px 20px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease; /* 添加过渡效果 */
}

.shop-category-page-caption a:hover {
    background-color: #e0e0e0; /* 悬停时背景颜色 */
    transform: scale(1.05); /* 悬停时缩放 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
}


/* 移动端样式调整 */
@media (max-width: 768px) {
    .shop-category-page-caption {
        top: 50%; /* 定位在垂直居中 */
        left: 50%;
        transform: translate(-50%, -50%); /* 完全居中 */
        width: 250px;
        height: 300px;
        padding: 15px;
    }

    .shop-category-page-caption h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .shop-category-page-caption p {
        font-size: 1rem;
        line-height: 1.2;
    }

    .shop-category-page-caption a {
        padding: 8px 16px;
        margin-top: 10px;
    }
}

.shop-category-page .text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    color: white;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.shop-category-page .text-overlay h1, 
.shop-category-page .breadcrumb {
    margin: 0;
    color: white; /* 设置路径文字为白色 */
}

.breadcrumb-container.shop-category-page {
    margin-top: 20px; /* 根据需要调整间距 */
    padding: 10px; /* 可选：添加内边距 */
    background-color: transparent; /* 可选：添加背景颜色 */
    text-align: left; /* 确保文本左对齐 */
}

.breadcrumb {
    color: #333; /* 路径文本颜色 */
}

.breadcrumb a {
    color: #007bff; /* 链接颜色 */
}

.breadcrumb a:hover {
    color: #0056b3; /* 链接悬停颜色 */
}

.shop-category-page .card-img-top {
    width: 100%; /* 确保图片宽度自适应 */
    height: auto; /* 保持图片比例 */
    object-fit: contain; /* 使图片完整显示 */
}

/* 调整产品标题样式 */
.shop-category-page .card-title {
    font-weight: bold; /* 保持加粗 */
    font-size: 1.2em; /* 调整字体大小，可按需设置 */
    line-height: 1.5; /* 行高调整，如果需要 */
}

.shop-category-page .price {
    color: rgb(235, 11, 11); /* 价格颜色 */
    margin: 10px 0; /* 增加上下边距以提升可读性 */
}

.category-card-body {
    padding: 15px; /* 根据需要设置内边距 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

/* 保留原有的卡片样式 */
.shop-category-page .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* 确保卡片伸展至容器高度 */
    transition: transform 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shop-category-page .card:hover {
    transform: scale(1.05);
}

.shop-category-page .d-flex {
    display: flex; /* 确保子元素在同一行并对齐 */
    justify-content: space-between; /* 在水平方向两端对齐 */
    align-items: center; /* 垂直居中 */
}

.shop-category-page .card-body {
    flex-grow: 1;
}

@media (max-width: 768px) {
    .shop-category-page .card {
        margin-bottom: 20px; /* 微调卡片底部边距 */
    }
}
