324 lines
6.7 KiB
CSS
324 lines
6.7 KiB
CSS
/*
|
|
* SewJoy Theme - Shop / Product List Stylesheet
|
|
*
|
|
* Renders the Basic Shopping Flow frame (design/homepage-wireframe.pen →
|
|
* OsAkV → BSF Product Grid Light). Reuses home.css tokens for the cream
|
|
* surface + nav/footer; adds the filter bar, product card family, layout
|
|
* switcher, and pagination.
|
|
*
|
|
* Design tokens mirror home.css for self-sufficiency.
|
|
*/
|
|
|
|
:root {
|
|
--cream: #F8F5F0;
|
|
--dark: #1A1A1A;
|
|
--white: #FFFFFF;
|
|
--accent: #C8956C;
|
|
--text-primary: #1A1A1A;
|
|
--text-muted: #8C7B6E;
|
|
--text-soft: #3D3530;
|
|
--border: #E8E0D5;
|
|
--font-display: 'Playfair Display', Georgia, serif;
|
|
--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
--shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
--shadow-hover: 0 8px 24px rgba(44, 36, 22, 0.08);
|
|
}
|
|
|
|
/* ============================================
|
|
SHOP SECTION (lives inside .home)
|
|
============================================ */
|
|
.shop {
|
|
background-color: var(--cream);
|
|
}
|
|
|
|
/* ============================================
|
|
FILTER BAR / TOOLBAR
|
|
============================================ */
|
|
.shop__toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
height: 72px;
|
|
padding: 20px 64px;
|
|
background-color: var(--cream);
|
|
border-top: 1px solid transparent;
|
|
}
|
|
|
|
.shop__filters,
|
|
.shop__sort-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.shop__spacer {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
/* Filter pill (used for Style / Fabric / Sort / search input) */
|
|
.filter-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 14px;
|
|
background-color: var(--white);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
color: var(--text-primary);
|
|
font-family: inherit;
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
transition: border-color 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
.filter-pill:hover {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.filter-pill__caret {
|
|
font-size: 10px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.filter-pill--search {
|
|
width: 280px;
|
|
color: #B8A99A;
|
|
cursor: text;
|
|
}
|
|
|
|
.filter-pill--search::placeholder {
|
|
color: #B8A99A;
|
|
opacity: 1;
|
|
}
|
|
|
|
.filter-pill--search:hover {
|
|
color: var(--text-primary);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
/* Layout switcher (segmented control: Waterfall / Grid / List) */
|
|
.shop-layout {
|
|
display: flex;
|
|
align-items: center;
|
|
background-color: var(--white);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.shop-layout__btn {
|
|
padding: 10px 12px;
|
|
background-color: var(--white);
|
|
border: 0;
|
|
color: var(--text-muted);
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
transition: background-color 0.15s ease, color 0.15s ease;
|
|
}
|
|
|
|
.shop-layout__btn + .shop-layout__btn {
|
|
border-left: 1px solid var(--border);
|
|
}
|
|
|
|
.shop-layout__btn:hover {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.shop-layout__btn.is-active,
|
|
.shop-layout__btn.is-active:hover {
|
|
background-color: var(--dark);
|
|
color: var(--white);
|
|
}
|
|
|
|
/* ============================================
|
|
PRODUCT GRID (CSS columns waterfall)
|
|
============================================ */
|
|
.shop__grid {
|
|
display: block; /* reset from any inherited flex/grid */
|
|
padding: 24px 64px 32px;
|
|
columns: 3;
|
|
column-gap: 24px;
|
|
}
|
|
|
|
.product-card {
|
|
break-inside: avoid;
|
|
-webkit-column-break-inside: avoid;
|
|
page-break-inside: avoid;
|
|
display: block;
|
|
width: 100%;
|
|
margin: 0 0 24px;
|
|
background-color: var(--white);
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-card);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.product-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: var(--shadow-hover);
|
|
}
|
|
|
|
.product-card__media {
|
|
display: block;
|
|
width: 100%;
|
|
height: var(--card-media-h, 400px);
|
|
background-color: var(--card-tone, #E8E0D5);
|
|
}
|
|
|
|
.product-card__body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.product-card__title {
|
|
margin: 0;
|
|
font-family: var(--font-display);
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.product-card__price {
|
|
font-family: var(--font-body);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--accent);
|
|
}
|
|
|
|
/* ============================================
|
|
PAGINATION
|
|
============================================ */
|
|
.shop__pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
padding: 24px 64px 40px;
|
|
background-color: var(--cream);
|
|
}
|
|
|
|
.shop__results {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.shop__pager {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.shop__page-link {
|
|
font-family: var(--font-body);
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
color: var(--text-muted);
|
|
text-decoration: none;
|
|
padding: 4px 8px;
|
|
border-radius: 3px;
|
|
transition: color 0.15s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.shop__page-link:hover {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.shop__page-link.is-current,
|
|
.shop__page-link.is-current:hover {
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
cursor: default;
|
|
}
|
|
|
|
.shop__page-link--nav {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.shop__page-link--nav:hover {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.shop__page-link--ellipsis {
|
|
cursor: default;
|
|
padding: 4px 4px;
|
|
}
|
|
|
|
/* ============================================
|
|
RESPONSIVE
|
|
============================================ */
|
|
@media screen and (max-width: 1024px) {
|
|
.shop__toolbar {
|
|
padding: 20px 32px;
|
|
flex-wrap: wrap;
|
|
height: auto;
|
|
gap: 10px;
|
|
}
|
|
|
|
.shop__spacer {
|
|
flex-basis: 100%;
|
|
flex-grow: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.shop__grid {
|
|
padding: 24px 32px;
|
|
columns: 2;
|
|
column-gap: 20px;
|
|
}
|
|
|
|
.shop__pagination {
|
|
padding: 20px 32px 32px;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 720px) {
|
|
.shop__toolbar {
|
|
padding: 16px 20px;
|
|
}
|
|
|
|
.shop__filters,
|
|
.shop__sort-group {
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.filter-pill--search {
|
|
width: 100%;
|
|
}
|
|
|
|
.shop-layout {
|
|
display: none; /* hide layout switcher on mobile */
|
|
}
|
|
|
|
.shop__grid {
|
|
padding: 16px 20px 24px;
|
|
columns: 1;
|
|
column-gap: 0;
|
|
}
|
|
|
|
.product-card {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.shop__pagination {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
padding: 16px 20px 28px;
|
|
}
|
|
|
|
.shop__pager {
|
|
flex-wrap: wrap;
|
|
}
|
|
} |