/* 商城组件样式 */
.shop-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 400px;
    max-width: 1200px;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* 添加此行 */
    flex-grow: 1;
    position: relative;
}

/* h1 rule removed as it was empty */

.shop-box h1 {
    font-size: 3em;
    color: rgba(0, 123, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    text-align: center;
    margin-bottom: 20px;
    animation: simpleGlow 1.5s ease-in-out infinite alternate;
    /* 这里可能有特定的商城标题样式 */
}

.shop-item-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 320px 20px 20px; /* 右边距从300px调整到320px */
    width: 100%;
    box-sizing: border-box;
}

.shop-item-box {
    position: relative;
    width: 150px;
    height: 220px; /* 设置固定高度 */
    padding: 10px;
    margin: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* 添加此行 */
    text-align: center;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.shop-item-box {
    -webkit-backdrop-filter: blur(8px); /* 添加此行 */
    backdrop-filter: blur(8px);
}

.shop-item-box form {
    width: 100%;
    position: absolute; /* 绝对定位 */
    bottom: 10px; /* 距离底部10px */
    left: 0; /* 左对齐 */
    padding: 0 10px; /* 左右内边距 */
    box-sizing: border-box;
}

.shop-item-box img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 5px;
}

.shop-item-box img:hover {
    transform: scale(1.1);
}

.shop-item-box button {
    padding: 8px 15px;
    background: rgba(40, 167, 69, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.shop-item-box button:hover {
    background: rgba(33, 136, 56, 0.9);
}

.shop-item-box .add-to-cart-btn {
    display: none; /* 隐藏多余的添加购物车按钮 */
}

.shop-item-box .add-to-cart-btn:hover {
    background: rgba(255, 193, 7, 0.9);
}

.shop-item-box h3 {
    margin: 5px 0;
    font-size: 14px;
    /* 修改为支持两行文本显示 */
    max-width: 100%;
    height: 40px; /* 设置固定高度为两行 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 显示两行 */
    line-clamp: 2; /* 显示两行 */
    -webkit-box-orient: vertical;
    word-break: break-all;
    line-height: 1.4; /* 行高适中 */
    position: relative; /* 用于悬停提示 */
}

/* 添加悬停提示样式 */
.shop-item-box h3:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

.shop-item-box p {
    margin: 2px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0 5px;
}

.shop-item-description {
    display: none;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translate(-50%, 0);
    width: 200px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.shop-item-description.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.search-box {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-box form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box button {
    padding: 10px 20px;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: rgba(0, 86, 179, 0.9);
}

.search-box select {
    padding: 10px;
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.search-box input {
    padding: 10px;
    width: 200px;
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.8);
}

/* 添加通用标题样式类 */
.shop-title {
    font-size: 3em;
    color: rgba(0, 123, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    text-align: center;
    margin-bottom: 20px;
    animation: simpleGlow 1.5s ease-in-out infinite alternate;
}

/* 如果animations.css中没有定义simpleGlow动画，需要添加 */
@keyframes simpleGlow {
    from {
        text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
    }
}

/* 在小屏幕上调整布局 */
@media (max-width: 768px) {
    .shop-item-container {
        padding: 20px;
        padding-bottom: 220px;
    }
}

/* ... 其他商城相关样式 ... */
