diff --git a/assets/css/design.css b/assets/css/design.css new file mode 100644 index 0000000..4f6c140 --- /dev/null +++ b/assets/css/design.css @@ -0,0 +1,342 @@ +/* + * SewJoy Theme - Design Yours / Custom Design Flow Stylesheet + * + * Renders the "Custom Design Flow Light- Home" frame + * (design/homepage-wireframe.pen → M1SPz). Reuses home.css tokens for + * the cream surface + nav/footer + bond-card; adds the splash carousel, + * the three-series wrapper, and the Featured Designs card family. + * + * Design tokens mirrored 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 10px rgba(0, 0, 0, 0.06); + --shadow-hover: 0 8px 24px rgba(44, 36, 22, 0.08); +} + +/* ============================================ + DY SPLASH — 3-step carousel + ============================================ */ +.dy-splash { + position: relative; + width: 100%; + height: 480px; + background-color: var(--white); + overflow: hidden; +} + +.dy-splash__viewport { + position: relative; + width: 100%; + height: 100%; +} + +.dy-splash__slide { + position: absolute; + inset: 0; + opacity: 0; + transition: opacity 0.35s ease; + pointer-events: none; +} + +.dy-splash__slide.is-active { + opacity: 1; + pointer-events: auto; +} + +.dy-splash__image { + position: absolute; + inset: 0; + background-color: var(--slide-tone, #F0E8DC); +} + +.dy-splash__overlay { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 560px; + max-width: calc(100% - 80px); + display: flex; + flex-direction: column; + gap: 16px; + text-align: center; +} + +.dy-splash__eyebrow { + font-family: var(--font-body); + font-size: 11px; + font-weight: 600; + letter-spacing: 3px; + color: var(--accent); +} + +.dy-splash__title { + margin: 0; + font-family: var(--font-display); + font-size: clamp(36px, 5vw, 56px); + font-weight: 700; + line-height: 1.1; + color: var(--text-primary); +} + +.dy-splash__desc { + margin: 0; + font-family: var(--font-body); + font-size: 15px; + font-weight: 400; + line-height: 1.5; + color: var(--text-soft); +} + +/* Arrows */ +.dy-splash__arrow { + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 48px; + height: 48px; + border-radius: 50%; + background-color: rgba(255, 255, 255, 0.4); + border: 0; + color: var(--text-primary); + font-size: 32px; + font-weight: 700; + line-height: 1; + cursor: pointer; + transition: background-color 0.15s ease; + z-index: 2; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.dy-splash__arrow:hover { + background-color: rgba(255, 255, 255, 0.8); +} + +.dy-splash__arrow--prev { left: 32px; } +.dy-splash__arrow--next { right: 32px; } + +/* Dots */ +.dy-splash__dots { + position: absolute; + bottom: 22px; + left: 50%; + transform: translateX(-50%); + display: flex; + gap: 8px; + z-index: 2; +} + +.dy-splash__dot { + width: 8px; + height: 8px; + border-radius: 4px; + background-color: var(--border); + border: 0; + padding: 0; + cursor: pointer; + transition: background-color 0.15s ease, width 0.2s ease; +} + +.dy-splash__dot.is-active { + width: 32px; + background-color: var(--accent); +} + +/* ============================================ + DY THREE SERIES — reuses .bond-card* from home.css + ============================================ */ +.dy-three-series { + background-color: var(--cream); + padding: 56px 0; + display: flex; + flex-direction: column; + align-items: center; + gap: 28px; +} + +.dy-three-series__header { + text-align: center; + display: flex; + flex-direction: column; + gap: 6px; +} + +.dy-three-series__heading { + margin: 0; + font-family: var(--font-display); + font-size: clamp(26px, 3vw, 32px); + font-weight: 700; + letter-spacing: 3px; + color: var(--text-primary); +} + +.dy-three-series__subtitle { + margin: 0; + font-family: var(--font-body); + font-size: 13px; + color: var(--text-muted); +} + +.dy-three-series__cards { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 24px; + width: 100%; + padding: 0; /* matches home tailored-bond: align flush with page edges */ +} + +/* ============================================ + DY FEATURED DESIGNS — 4 hardcoded cards + ============================================ */ +.dy-featured { + background-color: var(--white); + padding: 64px; + display: flex; + flex-direction: column; + align-items: center; + gap: 32px; +} + +.dy-featured__header { + text-align: center; + display: flex; + flex-direction: column; + gap: 8px; +} + +.dy-featured__heading { + margin: 0; + font-family: var(--font-display); + font-size: clamp(28px, 3.5vw, 36px); + font-weight: 700; + color: var(--text-primary); +} + +.dy-featured__subhead { + margin: 0; + font-family: var(--font-body); + font-size: 14px; + font-weight: 400; + color: var(--text-muted); +} + +.dy-featured__row { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 24px; + width: 100%; +} + +.dy-feat-card { + background-color: var(--white); + border-radius: 8px; + overflow: hidden; + box-shadow: var(--shadow-card); + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.dy-feat-card:hover { + transform: translateY(-4px); + box-shadow: var(--shadow-hover); +} + +.dy-feat-card__media { + height: 220px; + background-color: var(--card-tone, #E8E0D5); +} + +.dy-feat-card__body { + display: flex; + flex-direction: column; + gap: 4px; + padding: 20px 24px; +} + +.dy-feat-card__title { + margin: 0; + font-family: var(--font-display); + font-size: 18px; + font-weight: 700; + color: var(--text-primary); + line-height: 1.3; +} + +.dy-feat-card__maker { + font-family: var(--font-body); + font-size: 11px; + font-weight: 400; + letter-spacing: 1px; + color: var(--text-muted); +} + +.dy-feat-card__cta { + display: inline-flex; + align-items: center; + gap: 6px; + padding-top: 10px; + font-family: var(--font-body); + font-size: 11px; + font-weight: 600; + letter-spacing: 1.5px; + color: var(--text-primary); + text-decoration: none; +} + +.dy-feat-card__cta:hover { + color: var(--accent); +} + +/* ============================================ + RESPONSIVE + ============================================ */ +@media screen and (max-width: 1024px) { + .dy-splash { height: 400px; } + .dy-splash__overlay { width: 480px; } + .dy-splash__arrow--prev { left: 16px; } + .dy-splash__arrow--next { right: 16px; } + + .dy-three-series__cards { + grid-template-columns: repeat(2, 1fr); + } + + .dy-featured { padding: 48px 32px; } + .dy-featured__row { + grid-template-columns: repeat(2, 1fr); + } +} + +@media screen and (max-width: 720px) { + .dy-splash { height: 380px; } + .dy-splash__overlay { + width: calc(100% - 80px); + gap: 12px; + } + .dy-splash__title { font-size: 32px; } + .dy-splash__desc { font-size: 14px; } + .dy-splash__arrow { width: 40px; height: 40px; font-size: 24px; } + .dy-splash__arrow--prev { left: 12px; } + .dy-splash__arrow--next { right: 12px; } + + .dy-three-series { padding: 40px 20px; } + .dy-three-series__cards { + grid-template-columns: 1fr; + } + + .dy-featured { padding: 36px 20px; } + .dy-featured__row { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/assets/css/shop.css b/assets/css/shop.css new file mode 100644 index 0000000..3c60c0a --- /dev/null +++ b/assets/css/shop.css @@ -0,0 +1,324 @@ +/* + * 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; + } +} \ No newline at end of file diff --git a/assets/js/design.js b/assets/js/design.js new file mode 100644 index 0000000..a2420f2 --- /dev/null +++ b/assets/js/design.js @@ -0,0 +1,67 @@ +/* + * SewJoy Theme - Custom Design Flow splash carousel + * + * Cycles .dy-splash__slide children via the .is-active class. Left/right + * arrows and the 3 dots at the bottom both drive navigation, with + * wrap-around at the ends. Keyboard arrow support when the carousel + * region has focus. + */ +(function ($) { + 'use strict'; + + $(function () { + var $splash = $('.dy-splash'); + if (!$splash.length) { + return; + } + + var $slides = $splash.find('.dy-splash__slide'); + var $dots = $splash.find('.dy-splash__dot'); + var count = $slides.length; + + if (count === 0) { + return; + } + + var current = 0; + + function go(target) { + // Wrap-around so negative indices and >= count both loop. + var next = ((target % count) + count) % count; + if (next === current) { + return; + } + $slides.removeClass('is-active').eq(next).addClass('is-active'); + $dots.removeClass('is-active').attr('aria-selected', 'false') + .eq(next).addClass('is-active').attr('aria-selected', 'true'); + current = next; + } + + $splash.on('click', '.dy-splash__arrow--prev', function () { + go(current - 1); + }); + + $splash.on('click', '.dy-splash__arrow--next', function () { + go(current + 1); + }); + + $splash.on('click', '.dy-splash__dot', function () { + var target = parseInt($(this).attr('data-go'), 10); + if (!isNaN(target)) { + go(target); + } + }); + + // Keyboard arrow support — only when the carousel region is focused + // or its descendants are. + $splash.on('keydown', function (event) { + if (event.key === 'ArrowLeft') { + event.preventDefault(); + go(current - 1); + } else if (event.key === 'ArrowRight') { + event.preventDefault(); + go(current + 1); + } + }); + }); +})(jQuery); \ No newline at end of file