/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

/* ============================================================
   P7. 甜美展示 (Sweet Showcase) — 全色系集合 / 网格拼贴
   设计：色号标注 + 爆炸标签 + 奶油色块底
   ============================================================ */
.sweet-showcase-module .sweet-section-icon {
}
.sweet-showcase-module {
    background: transparent;
    position: relative;
    margin-bottom: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.sweet-showcase-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 12px var(--macaron-padding-x) 22.5px;
    align-items: start;
}
/* 通用卡片基础：默认两列 */
.sweet-showcase-card {
    flex: 0 0 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 6px;
    overflow: visible;
    box-shadow: 0 4px 16px rgba(244, 143, 177, 0.06);
    border: 1px solid var(--macaron-border);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

/* 双数布局：全部两列 (默认即是) */
.sweet-showcase-grid.layout-even .sweet-showcase-card {
    flex: 0 0 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
}

/* 单数布局：全部使用三列的大小 (除非只有1个) */
.sweet-showcase-grid.layout-odd .sweet-showcase-card {
    flex: 0 0 calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
}

/* 如果单数布局只有 1 个时，特殊处理为占满 */
.sweet-showcase-grid.items-1 .sweet-showcase-card {
    flex: 0 0 100%;
    max-width: 100%;
}

.sweet-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(244, 143, 177, 0.15);
}

.sweet-showcase-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, rgba(248, 187, 208, 0.15), rgba(209, 196, 233, 0.12));
    overflow: hidden;
    z-index: 1;
    border-radius: 8px;
}

.sweet-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sweet-showcase-placeholder {
    width: 100%;
    height: 100%;
}

.sweet-showcase-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;  
    background: var(--macaron-hot-pink);
    color: #ffffff;
    font-size: calc(17px * var(--scale-factor, 1));
    font-weight: normal;
    font-family: 'AiDianQuYaYuan', sans-serif !important;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(244, 143, 177, 0.3);
    white-space: nowrap;
    z-index: 2;
}

.sweet-showcase-info {
    padding: 10px 4px 6px;
    text-align: center;
}

.sweet-showcase-name {
    font-size: calc(32px * var(--scale-factor, 1));
    font-weight: normal;
    color: var(--macaron-text);
    font-family: 'AiDianQuYaYuan', sans-serif !important;
}

.sweet-showcase-price {
    font-size: calc(17px * var(--scale-factor, 1));
    font-weight: normal;
    font-family: 'AiDianQuYaYuan', sans-serif !important;
    color: var(--macaron-hot-pink);
    margin-top: 5px;
    letter-spacing: 0.5px;
}

/* 兼容移动端 */
@media (max-width: 600px) {
    .sweet-showcase-grid { 
        gap: 8px;
        padding: 16px 12px 30px;
    }
    /* 移动端同样遵循此逻辑，但调整间距 */
    .sweet-showcase-grid.layout-even .sweet-showcase-card {
        flex: 0 0 calc((100% - 8px) / 2);
        max-width: calc((100% - 8px) / 2);
    }
    .sweet-showcase-grid.layout-odd .sweet-showcase-card {
        flex: 0 0 calc((100% - 16px) / 3);
        max-width: calc((100% - 16px) / 3);
    }
    .sweet-showcase-grid.items-1 .sweet-showcase-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
