杂务:更新 YumiNail 工作区

This commit is contained in:
xiaowang
2026-05-29 13:30:56 +08:00
parent 1d077d4089
commit 31cd06b5c9
16498 changed files with 10330586 additions and 2340 deletions
+477 -291
View File
@@ -1,38 +1,50 @@
<template>
<div class="mobile-container">
<header class="header">
<a-button class="back-btn" type="text" @click="handleBackClick">
<LeftOutlined :style="{ fontSize: '20px' }" />
<div class="mobile-container product-list-page">
<header class="gallery-header">
<a-button class="icon-btn" type="text" aria-label="返回首页" @click="handleBackClick">
<MenuOutlined />
</a-button>
<h1 v-if="!showSearch">作品列表</h1>
<div v-else class="search-input-container">
<a-input-search
v-model:value="searchKeyword"
placeholder="搜索标题、标签或描述"
class="search-input"
enter-button
@search="handleSearch"
/>
<div class="brand-lockup" aria-label="YumiNail 作品列表">
<span class="brand-kicker">Nail Gallery</span>
<h1>YumiNail</h1>
</div>
<a-button class="search-btn" type="text" @click="toggleSearch">
<SearchOutlined :style="{ fontSize: '20px' }" />
<a-button class="icon-btn icon-btn--bag" type="text" aria-label="前往购物车" @click="router.push('/cart')">
<ShoppingOutlined />
<span class="bag-dot" aria-hidden="true"></span>
</a-button>
</header>
<div class="main-content">
<div class="category-sidebar">
<button
class="category-item"
:class="{ active: selectedCategory === '全部' }"
type="button"
@click="handleCategoryClick('全部')"
>
全部
</button>
<div v-for="group in filterGroups" :key="group.groupName" class="filter-group">
<span class="filter-group__title">{{ group.groupName }}</span>
<main class="gallery-content">
<section class="search-panel" aria-label="作品搜索与筛选">
<div class="search-field">
<SearchOutlined class="search-field__icon" />
<input
v-model="searchKeyword"
class="search-field__input"
type="search"
placeholder="搜索美甲款式..."
@keydown.enter="handleSearch"
/>
<button
v-for="tag in group.tags"
type="button"
class="search-field__action"
@click="handleSearch"
>
搜索
</button>
</div>
<div class="category-rail" aria-label="作品分类">
<button
class="category-item"
:class="{ active: selectedCategory === '全部' }"
type="button"
@click="handleCategoryClick('全部')"
>
全部风格
</button>
<button
v-for="tag in allTags"
:key="tag.id"
class="category-item"
:class="{ active: selectedTagId === String(tag.id) }"
@@ -42,47 +54,60 @@
{{ tag.displayName || tag.tagName }}
</button>
</div>
</section>
<div v-if="activeBannerText" class="page-banner" role="status">
{{ activeBannerText }}
</div>
<div class="product-section">
<a-alert
v-if="activeBannerText"
class="page-banner"
type="info"
show-icon
:message="activeBannerText"
/>
<section class="product-section" aria-label="作品列表">
<div class="product-grid">
<a-card
<article
v-for="item in products"
:key="item.id"
class="product-card"
:body-style="{ padding: '12px' }"
hoverable
role="button"
tabindex="0"
@click="handleProductClick(item)"
@keydown.enter="handleProductClick(item)"
@keydown.space.prevent="handleProductClick(item)"
>
<div class="product-img">
<img
v-if="getProductImages(item).length > 0"
:src="getProductImages(item)[0]"
:alt="item.title || item.name"
class="product-image"
/>
<div v-else class="product-img-placeholder">
<span>{{ (item.title || item.name)?.[0] || '作' }}</span>
<div class="product-media">
<div class="product-img">
<img
v-if="getProductImages(item).length > 0"
:src="getProductImages(item)[0]"
:alt="item.title || item.name"
class="product-image"
loading="lazy"
decoding="async"
/>
<div v-else class="product-img-placeholder">
<span>{{ (item.title || item.name)?.[0] || '作' }}</span>
</div>
</div>
</div>
<div class="product-info">
<p class="name">{{ item.title || item.name }}</p>
<p v-if="item.shopName" class="shop-name">所属店铺:{{ item.shopName }}</p>
<div class="product-meta">
<span class="duration">{{ item.approximateDuration || '时长待定' }}</span>
<div class="stats">
<span>{{ item.likeCount || 0 }} 点赞</span>
<span>{{ item.collectCount || 0 }} 收藏</span>
<div class="product-head">
<div class="product-title-block">
<h2 class="name">{{ item.title || item.name }}</h2>
<p v-if="item.shopName" class="shop-name">{{ item.shopName }}</p>
<div class="duration">
<ClockCircleOutlined />
<span>{{ item.approximateDuration || '时长待定' }}</span>
</div>
</div>
<button
class="cart-btn"
:class="{ 'cart-btn-in-cart': item.inCart }"
type="button"
:aria-label="item.inCart ? '购物车已有' : `加入购物车:${item.title || item.name || '作品'}`"
@click.stop="handleAddToCart(item)"
>
<CheckOutlined v-if="item.inCart" />
<PlusOutlined v-else />
</button>
</div>
<div class="product-tags">
@@ -94,36 +119,26 @@
:style="{
marginRight: '4px',
marginBottom: '4px',
color: tag.textColor || '#333',
backgroundColor: tag.bgColor || '#f0f0f0',
borderColor: tag.borderColor || '#f0f0f0'
color: tag.textColor || 'var(--text-primary)',
backgroundColor: tag.bgColor || 'var(--theme-primary-soft)',
borderColor: tag.borderColor || 'var(--theme-border)'
}"
>
{{ tag.tagName }}
</a-tag>
</template>
<a-tag v-else size="small" color="default">暂无标签</a-tag>
<a-tag v-else size="small" color="default">精选款式</a-tag>
</div>
<div class="price-row">
<div class="card-foot">
<p class="price">¥{{ Number(item.price || 0).toFixed(2) }}</p>
<div class="cart-action">
<span v-if="item.inCart" class="cart-note">购物车已有</span>
<a-button
:type="item.inCart ? 'default' : 'primary'"
size="small"
shape="circle"
class="cart-btn"
:class="{ 'cart-btn-in-cart': item.inCart }"
@click.stop="handleAddToCart(item)"
>
<CheckOutlined v-if="item.inCart" />
<ShoppingCartOutlined v-else />
</a-button>
<div class="stats">
<span><HeartOutlined />{{ item.likeCount || 0 }}</span>
<span><StarOutlined />{{ item.collectCount || 0 }}</span>
</div>
</div>
</div>
</a-card>
</article>
</div>
<div v-if="products.length === 0 && !loading" class="empty-state">
@@ -135,8 +150,8 @@
<div v-if="loading" class="loading-state">
<a-spin />
</div>
</div>
</div>
</section>
</main>
</div>
</template>
@@ -147,7 +162,16 @@
*/
import { onMounted, ref, watch, inject, computed } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { CheckOutlined, LeftOutlined, SearchOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import {
CheckOutlined,
ClockCircleOutlined,
HeartOutlined,
MenuOutlined,
PlusOutlined,
SearchOutlined,
ShoppingOutlined,
StarOutlined
} from '@ant-design/icons-vue'
import { message } from 'ant-design-vue'
/**
* Purpose: ProductVO supports ProductListView.vue by holding or executing the product vo page or API role.
@@ -160,9 +184,9 @@ import { productApi, type ProductVO } from '@/api/product'
*/
import { tagApi, type TagFilterGroupVO, type TagVO } from '@/api/tag'
import { cartApi } from '@/api/cart'
import { fileApi } from '@/api/file'
import { runWithGlobalLoading } from '@/utils/action-loading'
import { fetchCartProductIdSet, hasCartProduct, withAddedCartProduct } from '@/utils/cart-state'
import { getCachedSignedImageUrls, getCachedSignedImageUrlsSync, parseImageFileIds } from '@/utils/signed-image-cache'
/**
* Purpose: ProductListItem supports ProductListView.vue by holding or executing the product list item page or API role.
@@ -207,11 +231,6 @@ const loading = ref(false)
const showSearch = ref(false)
/** searchKeyword is a reactive state variable used by the template and event handlers. */
const searchKeyword = ref('')
/**
* Purpose: imageIdCache supports ProductListView.vue by holding or executing the image id cache page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const imageIdCache = ref<Record<string, string>>({})
/**
* Purpose: imageUrls supports ProductListView.vue by holding or executing the image urls page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
@@ -262,26 +281,16 @@ const loadImageUrls = async (productList: ProductVO[]) => {
continue
}
const ids = product.imageFileIds.split(',').map(id => id.trim()).filter(Boolean)
const urls: string[] = []
for (const id of ids) {
try {
if (!imageIdCache.value[id]) {
imageIdCache.value[id] = await fileApi.getSignedUrl(id) as unknown as string
}
if (imageIdCache.value[id]) {
urls.push(imageIdCache.value[id])
}
} catch (error) {
console.error('获取作品图片失败:', error)
}
const ids = parseImageFileIds(product.imageFileIds)
const cachedUrls = getCachedSignedImageUrlsSync(ids)
if (cachedUrls.length) {
imageUrls.value[String(product.id)] = cachedUrls
}
const urls = await getCachedSignedImageUrls(ids, DEFAULT_PRODUCT_IMAGE)
imageUrls.value[String(product.id)] = urls.length ? urls : [DEFAULT_PRODUCT_IMAGE]
}
}
/** getProductImages is a local helper used by this page script. */
const getProductImages = (product: ProductVO): string[] => imageUrls.value[String(product.id)] || [DEFAULT_PRODUCT_IMAGE]
@@ -430,19 +439,6 @@ const handleSearch = () => {
})
}
/** toggleSearch is a local helper used by this page script. */
const toggleSearch = () => {
showSearch.value = !showSearch.value
if (!showSearch.value) {
searchKeyword.value = ''
useGlobalLoadingForNextRouteSync = true
router.replace({
path: '/products',
query: selectedTagId.value ? { tag: selectedCategory.value, tagId: selectedTagId.value } : {}
})
}
}
/** resetFilters is a local helper used by this page script. */
const resetFilters = () => {
selectedCategory.value = '全部'
@@ -468,318 +464,508 @@ onMounted(async () => {
</script>
<style scoped>
.mobile-container {
padding-top: 58px;
.product-list-page {
--gallery-header-height: 64px;
--gallery-gutter: 20px;
--gallery-surface: color-mix(in srgb, var(--theme-card-bg) 76%, transparent);
--gallery-surface-strong: color-mix(in srgb, var(--theme-card-bg) 90%, transparent);
--gallery-border: color-mix(in srgb, var(--theme-border) 72%, var(--theme-card-bg));
--gallery-muted: color-mix(in srgb, var(--text-secondary) 78%, var(--theme-card-bg));
--gallery-shadow: 0 18px 44px color-mix(in srgb, var(--theme-neutral) 11%, transparent);
--gallery-soft-shadow: 0 10px 30px color-mix(in srgb, var(--theme-primary) 14%, transparent);
min-height: 100vh;
padding: var(--gallery-header-height) 0 calc(104px + env(safe-area-inset-bottom, 0px));
color: var(--text-primary);
background:
linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.92)),
var(--theme-background-image),
var(--theme-page-bg);
background-size: cover, cover, auto;
background-position: center top;
radial-gradient(circle at 18% 5%, color-mix(in srgb, var(--theme-secondary) 22%, transparent) 0, transparent 30%),
radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--theme-primary) 26%, transparent) 0, transparent 34%),
linear-gradient(180deg, color-mix(in srgb, var(--theme-tertiary) 96%, var(--theme-card-bg)) 0%, var(--theme-page-bg) 62%, var(--theme-primary-soft) 100%);
}
.header {
.gallery-header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
height: 58px;
padding: 9px 15px;
border-bottom: 1px solid var(--theme-border);
background: rgba(255, 255, 255, 0.94);
background: color-mix(in srgb, var(--theme-card-bg) 92%, transparent);
box-shadow: 0 10px 28px rgba(122, 67, 88, 0.08);
backdrop-filter: blur(16px);
justify-content: space-between;
width: 100%;
height: var(--gallery-header-height);
padding: 0 var(--gallery-gutter);
border-bottom: 1px solid var(--gallery-border);
background: color-mix(in srgb, var(--theme-tertiary) 86%, transparent);
box-shadow: 0 12px 36px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
backdrop-filter: blur(20px);
}
.header h1 {
margin: 0;
font-size: 18px;
.brand-lockup {
display: grid;
place-items: center;
min-width: 0;
}
.brand-kicker {
color: var(--theme-primary-action);
font-size: 10px;
font-weight: 700;
color: var(--text-primary);
line-height: 1;
letter-spacing: 0;
text-transform: uppercase;
}
.brand-lockup h1 {
margin: 3px 0 0;
color: var(--theme-primary-action);
font-family: "Playfair Display", "Times New Roman", serif;
font-size: 28px;
font-weight: 700;
line-height: 1;
letter-spacing: 0;
}
.back-btn,
.search-btn {
width: 40px;
height: 40px;
display: flex;
.icon-btn {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 999px;
color: var(--theme-primary);
background: var(--theme-primary-soft);
color: var(--theme-primary-action);
background: color-mix(in srgb, var(--theme-card-bg) 72%, transparent);
box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-primary) 12%, transparent);
}
.back-btn:hover,
.search-btn:hover,
.back-btn:focus,
.search-btn:focus {
.icon-btn:hover,
.icon-btn:focus {
color: var(--theme-accent);
background: var(--theme-primary-soft);
}
.search-input-container {
flex: 1;
margin: 0;
.icon-btn :deep(.anticon) {
font-size: 20px;
}
.search-input :deep(.ant-input),
.search-input :deep(.ant-input-group-addon .ant-btn) {
height: 38px;
.bag-dot {
position: absolute;
top: 10px;
right: 9px;
width: 7px;
height: 7px;
border: 1px solid var(--theme-card-bg);
border-radius: 999px;
background: var(--theme-secondary);
}
.search-input :deep(.ant-input) {
border-color: var(--theme-border);
.gallery-content {
padding: 0 var(--gallery-gutter);
}
.search-panel {
display: grid;
gap: 16px;
margin-bottom: 16px;
}
.search-field {
display: grid;
grid-template-columns: 22px minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
min-height: 56px;
padding: 8px 8px 8px 17px;
border: 1px solid var(--gallery-border);
border-radius: 999px;
background: var(--gallery-surface-strong);
box-shadow: var(--gallery-soft-shadow);
backdrop-filter: blur(16px);
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.search-field:focus-within {
border-color: var(--theme-primary);
box-shadow: var(--theme-focus-shadow), var(--gallery-soft-shadow);
transform: translateY(-1px);
}
.search-field__icon {
color: var(--theme-primary-action);
font-size: 19px;
}
.search-field__input {
min-width: 0;
border: 0;
outline: 0;
color: var(--text-primary);
background: transparent;
font-size: 15px;
line-height: 1.4;
}
.search-input :deep(.ant-input:hover),
.search-input :deep(.ant-input:focus) {
border-color: var(--theme-primary);
box-shadow: var(--theme-focus-shadow);
.search-field__input::placeholder {
color: var(--gallery-muted);
}
.search-input :deep(.ant-input-group-addon .ant-btn) {
border-color: var(--theme-primary);
background: var(--theme-gradient);
box-shadow: none;
.search-field__action {
min-width: 58px;
height: 38px;
padding: 0 14px;
border: 1px solid color-mix(in srgb, var(--theme-primary) 54%, var(--theme-card-bg));
border-radius: 999px;
color: var(--theme-primary-action);
background: color-mix(in srgb, var(--theme-primary) 18%, var(--theme-card-bg));
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.main-content {
.search-field__action:hover,
.search-field__action:focus {
color: var(--theme-card-bg);
background: var(--theme-primary-action);
}
.search-field__action:active {
transform: scale(0.96);
}
.category-rail {
display: flex;
flex-direction: column;
min-height: calc(100vh - 58px);
}
.category-sidebar {
position: sticky;
top: 58px;
z-index: 20;
display: flex;
gap: 8px;
width: 100%;
padding: 10px 14px 11px;
gap: 10px;
overflow-x: auto;
overflow-y: hidden;
background: rgba(255, 255, 255, 0.88);
background: color-mix(in srgb, var(--theme-card-bg) 86%, transparent);
border-bottom: 1px solid var(--theme-border);
box-shadow: 0 8px 22px rgba(122, 67, 88, 0.06);
backdrop-filter: blur(16px);
padding: 1px 0 7px;
scroll-snap-type: x proximity;
scrollbar-width: none;
}
.category-sidebar::-webkit-scrollbar {
.category-rail::-webkit-scrollbar {
display: none;
}
.category-item {
flex: 0 0 auto;
padding: 8px 15px;
min-height: 36px;
padding: 0 18px;
border: 1px solid var(--gallery-border);
border-radius: 999px;
font-size: 13px;
font-weight: 600;
color: var(--theme-accent);
text-align: center;
cursor: pointer;
transition: all 0.2s ease;
background: var(--theme-primary-soft);
border: 1px solid var(--theme-border);
}
.filter-group {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
gap: 8px;
}
.filter-group__title {
flex: 0 0 auto;
color: var(--text-secondary);
font-size: 12px;
background: var(--gallery-surface-strong);
font-size: 13px;
font-weight: 700;
letter-spacing: 0;
cursor: pointer;
scroll-snap-align: start;
transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.category-item:hover {
color: var(--theme-primary);
.category-item:hover,
.category-item:focus {
color: var(--theme-primary-action);
border-color: var(--theme-primary);
transform: translateY(-1px);
}
.category-item.active {
color: #ffffff;
background: var(--theme-gradient);
color: var(--theme-card-bg);
border-color: transparent;
font-weight: 700;
background: var(--theme-primary-action);
box-shadow: var(--theme-button-shadow);
}
.product-section {
flex: 1;
padding: 16px;
overflow-y: auto;
.page-banner {
display: inline-flex;
align-items: center;
max-width: 100%;
min-height: 34px;
margin-bottom: 14px;
padding: 0 14px;
border: 1px solid color-mix(in srgb, var(--theme-secondary) 36%, var(--theme-border));
border-radius: 999px;
color: var(--theme-primary-action);
background: color-mix(in srgb, var(--theme-secondary) 16%, var(--theme-card-bg));
font-size: 12px;
font-weight: 700;
line-height: 1.35;
}
.page-banner {
margin-bottom: 16px;
border-radius: 14px;
.product-section {
min-height: 50vh;
}
.product-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
column-count: 2;
column-gap: 10px;
}
.product-card {
border-radius: 18px;
display: inline-block;
width: 100%;
margin: 0 0 10px;
overflow: hidden;
border: 1px solid color-mix(in srgb, var(--theme-card-bg) 70%, var(--theme-border));
border-radius: 24px;
color: inherit;
background: var(--gallery-surface);
box-shadow: var(--gallery-shadow);
backdrop-filter: blur(16px);
cursor: pointer;
break-inside: avoid;
transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.product-card:hover,
.product-card:focus {
border-color: color-mix(in srgb, var(--theme-primary) 58%, var(--theme-border));
box-shadow: 0 22px 52px color-mix(in srgb, var(--theme-primary) 18%, transparent);
transform: translateY(-2px);
outline: 0;
}
.product-media {
padding: 8px 8px 0;
}
.product-img {
width: 100%;
aspect-ratio: 1;
aspect-ratio: 3 / 4;
overflow: hidden;
border-radius: 14px;
background: var(--theme-primary-soft);
border-radius: 20px;
background:
linear-gradient(145deg, var(--theme-primary-soft), color-mix(in srgb, var(--theme-secondary) 18%, var(--theme-card-bg)));
}
.product-card:nth-child(4n + 2) .product-img {
aspect-ratio: 4 / 5;
}
.product-card:nth-child(4n + 3) .product-img {
aspect-ratio: 1 / 1;
}
.product-card:nth-child(4n) .product-img {
aspect-ratio: 3 / 5;
}
.product-image {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.55s ease;
}
.product-card:hover .product-image,
.product-card:focus .product-image {
transform: scale(1.045);
}
.product-img-placeholder {
display: grid;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 40px;
place-items: center;
color: color-mix(in srgb, var(--theme-primary-action) 30%, transparent);
font-family: "Playfair Display", "Times New Roman", serif;
font-size: 42px;
font-weight: 700;
color: rgba(0, 0, 0, 0.18);
}
.product-info {
display: grid;
gap: 10px;
padding: 12px 12px 14px;
}
.product-head {
display: grid;
grid-template-columns: minmax(0, 1fr) 32px;
align-items: start;
gap: 8px;
}
.product-title-block {
min-width: 0;
}
.name {
margin: 12px 0 6px;
font-size: 14px;
font-weight: 700;
color: #1f1f1f;
white-space: nowrap;
display: -webkit-box;
min-width: 0;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.back-btn {
opacity: 0;
pointer-events: none;
color: var(--text-primary);
font-size: 15px;
font-weight: 800;
line-height: 1.28;
letter-spacing: 0;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.shop-name {
margin: 0 0 6px;
font-size: 12px;
color: var(--text-secondary);
white-space: nowrap;
margin: 5px 0 0;
overflow: hidden;
color: var(--gallery-muted);
font-size: 11px;
line-height: 1.3;
text-overflow: ellipsis;
}
.product-meta {
display: flex;
justify-content: space-between;
gap: 8px;
font-size: 12px;
color: #8b8b9a;
white-space: nowrap;
}
.duration {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: 999px;
background: var(--theme-primary-soft);
max-width: 100%;
margin-top: 7px;
color: var(--gallery-muted);
font-size: 11px;
line-height: 1.2;
white-space: nowrap;
}
.stats {
display: flex;
gap: 8px;
.duration :deep(.anticon) {
flex: 0 0 auto;
margin-right: 5px;
color: var(--theme-secondary);
font-size: 13px;
}
.cart-btn {
display: inline-grid;
width: 32px;
height: 32px;
place-items: center;
border: 0;
border-radius: 999px;
color: var(--theme-primary-action);
background: color-mix(in srgb, var(--theme-primary) 28%, var(--theme-card-bg));
box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-primary) 22%, transparent);
cursor: pointer;
transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.cart-btn:hover,
.cart-btn:focus {
color: var(--theme-card-bg);
background: var(--theme-primary-action);
outline: 0;
}
.cart-btn:active {
transform: scale(0.92);
}
.cart-btn-in-cart {
color: var(--theme-primary-action);
background: color-mix(in srgb, var(--theme-secondary) 28%, var(--theme-card-bg));
box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-secondary) 22%, transparent);
}
.product-tags {
margin: 10px 0;
min-height: 26px;
min-height: 24px;
max-height: 54px;
overflow: hidden;
}
.price-row {
.product-tags :deep(.ant-tag) {
max-width: 100%;
border-radius: 999px;
font-size: 11px;
line-height: 20px;
}
.card-foot {
display: flex;
align-items: flex-end;
justify-content: space-between;
align-items: center;
gap: 12px;
gap: 8px;
}
.price {
margin: 0;
font-size: 18px;
font-weight: 700;
color: var(--theme-accent);
}
.cart-action {
display: inline-flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
.cart-note {
font-size: 12px;
color: #8c8c8c;
color: var(--theme-primary-action);
font-size: 15px;
font-weight: 800;
line-height: 1;
white-space: nowrap;
}
.cart-btn {
flex-shrink: 0;
.stats {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 6px;
min-width: 0;
color: var(--gallery-muted);
font-size: 11px;
line-height: 1;
}
.cart-btn-in-cart {
color: var(--theme-primary);
border-color: var(--theme-border);
background: var(--theme-primary-soft);
.stats span {
display: inline-flex;
align-items: center;
gap: 3px;
white-space: nowrap;
}
.stats :deep(.anticon) {
color: var(--theme-secondary);
font-size: 12px;
}
.empty-state,
.loading-state {
padding: 56px 0;
padding: 58px 0;
text-align: center;
}
@media (min-width: 992px) {
.main-content {
max-width: var(--frontend-content-max-width);
margin: 0 auto;
width: 100%;
.empty-state :deep(.ant-empty-description) {
color: var(--text-secondary);
}
.empty-state :deep(.ant-btn-primary) {
border-color: transparent;
background: var(--theme-primary-action);
box-shadow: var(--theme-button-shadow);
}
@media (max-width: 360px) {
.product-list-page {
--gallery-gutter: 14px;
}
.category-sidebar {
width: 100%;
border-radius: 0;
.search-field {
grid-template-columns: 20px minmax(0, 1fr) auto;
gap: 7px;
padding-left: 14px;
}
.product-section {
padding: 24px;
.search-field__action {
min-width: 50px;
padding: 0 11px;
}
.product-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
column-gap: 8px;
}
.product-info {
padding-right: 10px;
padding-left: 10px;
}
}
@media (min-width: 768px) {
.gallery-header {
top: 0;
left: 50%;
width: min(100%, var(--frontend-page-max-width), calc(100vw - 48px));
border-top-left-radius: 32px;
border-top-right-radius: 32px;
transform: translateX(-50%);
}
}
</style>