add product site ui refresh
This commit is contained in:
1 parent
5ca7152011
commit
088d01b256
24 files changed
+1907
-2359
No files matched your search
@@ -5,25 +5,6 @@
|
||||
background: var(--theme-bg);
|
||||
}
|
||||
|
||||
.detail-page .navbar--light {
|
||||
position: fixed;
|
||||
top: clamp(0.75rem, 2.1vw, 1.4rem);
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 998;
|
||||
margin-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.detail-shell {
|
||||
width: var(--container-wide);
|
||||
margin: 0 auto;
|
||||
padding: 0 0 clamp(2.2rem, 6vw, 5rem);
|
||||
background: transparent;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.detail-topbar {
|
||||
position: fixed;
|
||||
top: clamp(0.75rem, 2.1vw, 1.4rem);
|
||||
@@ -63,7 +44,13 @@
|
||||
}
|
||||
|
||||
.back-link-arrow {
|
||||
line-height: 1;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
flex: 0 0 auto;
|
||||
background: currentColor;
|
||||
-webkit-mask: url("/icon-arrow-left.svg") center / contain no-repeat;
|
||||
mask: url("/icon-arrow-left.svg") center / contain no-repeat;
|
||||
}
|
||||
|
||||
.detail-topbar-meta {
|
||||
@@ -105,7 +92,7 @@
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
gap: var(--gap-md);
|
||||
align-items: center;
|
||||
min-height: 100svh;
|
||||
min-height: clamp(680px, 100svh, 940px);
|
||||
padding-block: 0;
|
||||
border-bottom: 0;
|
||||
isolation: isolate;
|
||||
@@ -116,13 +103,18 @@
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
align-items: center;
|
||||
min-height: inherit;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.product-hero-visual {
|
||||
position: relative;
|
||||
grid-column: 4 / 10;
|
||||
grid-row: 1;
|
||||
justify-self: center;
|
||||
align-self: center;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
@@ -140,7 +132,7 @@
|
||||
position: absolute;
|
||||
top: clamp(6.5rem, 11vw, 9rem);
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
z-index: 5;
|
||||
width: min(26vw, 390px);
|
||||
}
|
||||
|
||||
@@ -167,7 +159,7 @@
|
||||
.product-hero-image {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: min(36vw, 600px);
|
||||
width: min(100%, 600px);
|
||||
max-height: min(62svh, 700px);
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
@@ -198,7 +190,7 @@
|
||||
min-height: 44px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
@@ -222,25 +214,26 @@
|
||||
.thumb-btn img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hero-fact-grid {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
top: auto;
|
||||
bottom: clamp(4rem, 9svh, 7rem);
|
||||
z-index: 3;
|
||||
width: min(22vw, 310px);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--gap-md);
|
||||
margin-top: 0;
|
||||
transform: translateY(-42%);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.hero-fact-grid div,
|
||||
.character-facts div,
|
||||
.character-facts > div,
|
||||
.meta-card,
|
||||
.delivery-grid div {
|
||||
padding-top: 1rem;
|
||||
@@ -514,6 +507,14 @@
|
||||
line-height: 1.62;
|
||||
}
|
||||
|
||||
.story-copy .character-facts p {
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
color: var(--theme-text);
|
||||
font-size: var(--text-base);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.story-visual-panel {
|
||||
min-height: clamp(360px, 42vw, 620px);
|
||||
display: flex;
|
||||
@@ -529,21 +530,21 @@
|
||||
|
||||
.character-facts {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: var(--gap-sm);
|
||||
margin-top: clamp(1.4rem, 3vw, 2.4rem);
|
||||
max-width: 58rem;
|
||||
}
|
||||
|
||||
.character-facts div:last-child {
|
||||
grid-column: 1 / -1;
|
||||
.character-facts > div {
|
||||
min-height: 132px;
|
||||
}
|
||||
|
||||
.story-visual-panel > div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.story-visual-panel span:first-child {
|
||||
.story-visual-panel > div > span:first-child {
|
||||
display: block;
|
||||
margin-bottom: var(--gap-sm);
|
||||
color: var(--theme-text-muted);
|
||||
@@ -567,6 +568,8 @@
|
||||
background: rgba(255, 255, 255, 0.035);
|
||||
color: var(--theme-text);
|
||||
font-size: var(--text-sm);
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.product-structure-section,
|
||||
@@ -922,10 +925,8 @@
|
||||
}
|
||||
|
||||
.recommendation-heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
gap: var(--gap-lg);
|
||||
display: block;
|
||||
max-width: 74rem;
|
||||
}
|
||||
|
||||
.recommendation-grid {
|
||||
@@ -992,7 +993,6 @@
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
.product-hero,
|
||||
.product-story-grid,
|
||||
.product-meta-section,
|
||||
.detail-bottom-cta {
|
||||
@@ -1000,33 +1000,44 @@
|
||||
}
|
||||
|
||||
.product-hero {
|
||||
min-height: auto;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
|
||||
align-items: center;
|
||||
min-height: 100svh;
|
||||
padding-top: clamp(5.6rem, 9vw, 7.4rem);
|
||||
padding-bottom: clamp(1rem, 2vw, 1.6rem);
|
||||
}
|
||||
|
||||
.product-media-column,
|
||||
.product-purchase-panel {
|
||||
.product-media-column {
|
||||
grid-column: 1;
|
||||
grid-row: auto;
|
||||
grid-row: 1;
|
||||
}
|
||||
|
||||
.product-media-column {
|
||||
min-height: 0;
|
||||
display: block;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: auto minmax(0, 1fr) auto auto;
|
||||
gap: clamp(0.65rem, 1.4vw, 1rem);
|
||||
align-self: stretch;
|
||||
place-items: stretch;
|
||||
}
|
||||
|
||||
.product-hero-copy {
|
||||
position: static;
|
||||
width: min(100%, 720px);
|
||||
margin-bottom: var(--gap-md);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.product-hero-visual {
|
||||
min-height: clamp(520px, 66vw, 760px);
|
||||
grid-column: auto;
|
||||
grid-row: auto;
|
||||
min-height: 0;
|
||||
height: min(42svh, 420px);
|
||||
}
|
||||
|
||||
.product-hero-image {
|
||||
width: min(66vw, 640px);
|
||||
max-height: none;
|
||||
width: min(74%, 430px);
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.product-thumbs,
|
||||
@@ -1041,16 +1052,46 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.thumb-btn {
|
||||
width: clamp(3.6rem, 6vw, 4.8rem);
|
||||
height: clamp(3.6rem, 6vw, 4.8rem);
|
||||
}
|
||||
|
||||
.hero-fact-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: var(--gap-xs);
|
||||
}
|
||||
|
||||
.hero-fact-grid div {
|
||||
padding-top: 0.75rem;
|
||||
}
|
||||
|
||||
.hero-fact-grid span {
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.16em;
|
||||
}
|
||||
|
||||
.hero-fact-grid p {
|
||||
font-size: var(--text-sm);
|
||||
line-height: 1.38;
|
||||
}
|
||||
|
||||
.product-purchase-panel {
|
||||
position: static;
|
||||
justify-self: center;
|
||||
width: min(100%, 720px);
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
position: relative;
|
||||
justify-self: stretch;
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
gap: var(--gap-xs);
|
||||
}
|
||||
|
||||
.product-hero-copy h1 {
|
||||
max-width: 12ch;
|
||||
font-size: clamp(2.4rem, 5.5vw, 4.6rem);
|
||||
}
|
||||
|
||||
.structure-timeline,
|
||||
@@ -1064,13 +1105,8 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.detail-shell {
|
||||
width: var(--container-wide);
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.detail-topbar {
|
||||
top: clamp(4.65rem, 15vw, 5.5rem);
|
||||
top: clamp(4.35rem, 14vw, 5.05rem);
|
||||
z-index: 999;
|
||||
right: clamp(0.75rem, 4vw, 1rem);
|
||||
left: clamp(0.75rem, 4vw, 1rem);
|
||||
@@ -1083,20 +1119,30 @@
|
||||
}
|
||||
|
||||
.product-hero {
|
||||
padding-top: clamp(7.6rem, 25vw, 9rem);
|
||||
grid-template-columns: 1fr;
|
||||
align-content: start;
|
||||
gap: clamp(0.5rem, 1.8vw, 0.8rem);
|
||||
min-height: 100svh;
|
||||
padding-top: clamp(6.7rem, 20vw, 7.25rem);
|
||||
padding-bottom: clamp(0.75rem, 2.4vw, 1rem);
|
||||
}
|
||||
|
||||
.product-media-column,
|
||||
.product-purchase-panel {
|
||||
grid-column: 1;
|
||||
grid-row: auto;
|
||||
}
|
||||
|
||||
.product-hero-visual {
|
||||
min-height: clamp(390px, 102vw, 620px);
|
||||
height: min(29svh, 250px);
|
||||
min-height: 198px;
|
||||
}
|
||||
|
||||
.product-hero-image {
|
||||
width: min(88%, 560px);
|
||||
width: min(74%, 292px);
|
||||
}
|
||||
|
||||
.hero-fact-grid,
|
||||
.character-facts,
|
||||
.size-grid,
|
||||
.meta-grid,
|
||||
.delivery-grid,
|
||||
.comment-spotlight-grid,
|
||||
@@ -1105,6 +1151,99 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero-fact-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.hero-fact-grid div:last-child {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.size-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.product-hero-copy span {
|
||||
margin-bottom: 0.35rem;
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.16em;
|
||||
}
|
||||
|
||||
.product-hero-copy h1 {
|
||||
font-size: clamp(2rem, 10.4vw, 3rem);
|
||||
line-height: 0.9;
|
||||
}
|
||||
|
||||
.thumb-btn {
|
||||
width: clamp(2.8rem, 11vw, 3.25rem);
|
||||
height: clamp(2.8rem, 11vw, 3.25rem);
|
||||
}
|
||||
|
||||
.product-thumbs {
|
||||
margin-top: -0.6rem;
|
||||
}
|
||||
|
||||
.hero-fact-grid {
|
||||
gap: 0.45rem;
|
||||
}
|
||||
|
||||
.hero-fact-grid div {
|
||||
min-width: 0;
|
||||
padding-top: 0.45rem;
|
||||
}
|
||||
|
||||
.hero-fact-grid span {
|
||||
margin-bottom: 0.25rem;
|
||||
font-size: 0.58rem;
|
||||
letter-spacing: 0.09em;
|
||||
}
|
||||
|
||||
.hero-fact-grid p {
|
||||
font-size: 0.72rem;
|
||||
line-height: 1.22;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.product-purchase-panel {
|
||||
min-width: 0;
|
||||
gap: 0.48rem;
|
||||
}
|
||||
|
||||
.purchase-price-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.purchase-price-row strong {
|
||||
font-size: clamp(1.1rem, 5vw, 1.35rem);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.size-card {
|
||||
min-height: 62px;
|
||||
padding: 0.55rem 0.6rem;
|
||||
}
|
||||
|
||||
.size-title {
|
||||
margin-bottom: 0.25rem;
|
||||
font-size: 0.76rem;
|
||||
}
|
||||
|
||||
.size-card strong {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.size-card small,
|
||||
.purchase-discovery-note {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.buy-button,
|
||||
.restock-button {
|
||||
min-height: 38px;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.purchase-discovery-note,
|
||||
.reviews-heading,
|
||||
.recommendation-heading {
|
||||
@@ -1122,17 +1261,11 @@
|
||||
width: min(100%, 24rem);
|
||||
}
|
||||
|
||||
.purchase-discovery-note a,
|
||||
.buy-button,
|
||||
.restock-button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.purchase-price-row {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.review-score-block {
|
||||
justify-items: start;
|
||||
}
|
||||
@@ -1148,13 +1281,21 @@
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.product-hero-copy h1 {
|
||||
font-size: clamp(2.6rem, 15vw, 4rem);
|
||||
font-size: clamp(1.95rem, 10.2vw, 2.85rem);
|
||||
}
|
||||
|
||||
.hero-fact-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.product-thumbs {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.restock-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.review-detail-row {
|
||||
grid-template-columns: 1fr;
|
||||
align-items: start;
|
||||
|
||||
@@ -530,10 +530,10 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
<div className={`detail-page ${isTransitionArriving ? "is-transition-arriving" : ""}`}>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="detail-shell">
|
||||
<main className="shell">
|
||||
<div className="detail-topbar" data-product-transition-reveal>
|
||||
<button className="back-link" type="button" onClick={() => navigate("/")}>
|
||||
<span className="back-link-arrow">←</span>
|
||||
<span className="back-link-arrow" aria-hidden="true" />
|
||||
<span>Zurück zur Startseite</span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -11,11 +11,7 @@
|
||||
.product-transition__wash {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background:
|
||||
radial-gradient(circle at 50% 50%, rgba(var(--theme-accent-rgb) / 0.16), transparent 32rem),
|
||||
rgba(12, 12, 12, 0.78);
|
||||
backdrop-filter: blur(14px) saturate(0.9);
|
||||
-webkit-backdrop-filter: blur(14px) saturate(0.9);
|
||||
background: var(--theme-bg);
|
||||
}
|
||||
|
||||
.product-transition__image {
|
||||
@@ -23,6 +19,7 @@
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
max-width: none;
|
||||
object-fit: contain;
|
||||
transform-origin: 0 0;
|
||||
will-change: transform, opacity;
|
||||
|
||||
@@ -50,12 +50,21 @@ const getStageRect = (sourceRect) => {
|
||||
};
|
||||
};
|
||||
|
||||
const getTransformForRect = (rect, sourceRect) => ({
|
||||
x: rect.left,
|
||||
y: rect.top,
|
||||
scaleX: rect.width / sourceRect.width,
|
||||
scaleY: rect.height / sourceRect.height,
|
||||
});
|
||||
const getTransformForRect = (rect, sourceRect) => {
|
||||
const scale = Math.min(
|
||||
rect.width / sourceRect.width,
|
||||
rect.height / sourceRect.height
|
||||
);
|
||||
const width = sourceRect.width * scale;
|
||||
const height = sourceRect.height * scale;
|
||||
|
||||
return {
|
||||
x: rect.left + (rect.width - width) / 2,
|
||||
y: rect.top + (rect.height - height) / 2,
|
||||
scaleX: scale,
|
||||
scaleY: scale,
|
||||
};
|
||||
};
|
||||
|
||||
export function ProductTransitionProvider({ children }) {
|
||||
const navigate = useNavigate();
|
||||
@@ -171,9 +180,9 @@ export function ProductTransitionProvider({ children }) {
|
||||
.to(
|
||||
routeContent,
|
||||
{
|
||||
autoAlpha: 0.16,
|
||||
filter: "blur(10px)",
|
||||
scale: 0.985,
|
||||
autoAlpha: 0,
|
||||
filter: "none",
|
||||
scale: 1,
|
||||
duration: 0.62,
|
||||
ease: "power3.out",
|
||||
},
|
||||
@@ -277,7 +286,7 @@ export function ProductTransitionProvider({ children }) {
|
||||
duration: 0.82,
|
||||
stagger: 0.07,
|
||||
ease: "power4.out",
|
||||
clearProps: "transform,opacity,visibility",
|
||||
clearProps: "transform",
|
||||
},
|
||||
">-0.05"
|
||||
);
|
||||
|
||||
@@ -278,12 +278,48 @@
|
||||
/* --- Design System Refinement Start --- */
|
||||
|
||||
.chatbot-trigger {
|
||||
min-height: 48px;
|
||||
right: var(--page-x);
|
||||
bottom: var(--page-x);
|
||||
right: max(0.9rem, env(safe-area-inset-right));
|
||||
bottom: max(0.9rem, env(safe-area-inset-bottom));
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
min-height: 52px;
|
||||
min-width: 52px;
|
||||
padding: 0;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
font-size: 0;
|
||||
box-shadow: var(--theme-shadow-soft);
|
||||
}
|
||||
|
||||
.chatbot-trigger.is-open {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.chatbot-trigger-icon,
|
||||
.chatbot-close-icon {
|
||||
display: block;
|
||||
width: 1.45rem;
|
||||
height: 1.45rem;
|
||||
background: currentColor;
|
||||
-webkit-mask-position: center;
|
||||
mask-position: center;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-repeat: no-repeat;
|
||||
-webkit-mask-size: contain;
|
||||
mask-size: contain;
|
||||
}
|
||||
|
||||
.chatbot-trigger-icon {
|
||||
-webkit-mask-image: url("/icon-chat.svg");
|
||||
mask-image: url("/icon-chat.svg");
|
||||
}
|
||||
|
||||
.chatbot-trigger.is-open .chatbot-trigger-icon,
|
||||
.chatbot-close-icon {
|
||||
-webkit-mask-image: url("/icon-x.svg");
|
||||
mask-image: url("/icon-x.svg");
|
||||
}
|
||||
|
||||
.chatbot-trigger:hover,
|
||||
.chatbot-trigger:focus-visible {
|
||||
transform: translateY(-2px);
|
||||
@@ -338,8 +374,8 @@
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.chatbot-trigger {
|
||||
right: var(--page-x);
|
||||
bottom: var(--page-x);
|
||||
right: max(0.75rem, env(safe-area-inset-right));
|
||||
bottom: max(0.75rem, env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.chatbot-window {
|
||||
|
||||
@@ -216,7 +216,7 @@ function SupportChatbot() {
|
||||
onClick={() => setIsOpen((prev) => !prev)}
|
||||
aria-label={isOpen ? "Chat schliessen" : "Support Chat öffnen"}
|
||||
>
|
||||
{isOpen ? "×" : "Support"}
|
||||
<span className="chatbot-trigger-icon" aria-hidden="true" />
|
||||
</button>
|
||||
|
||||
{isOpen && (
|
||||
@@ -232,7 +232,7 @@ function SupportChatbot() {
|
||||
onClick={() => setIsOpen(false)}
|
||||
aria-label="Chat schliessen"
|
||||
>
|
||||
×
|
||||
<span className="chatbot-close-icon" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -341,4 +341,4 @@ function SupportChatbot() {
|
||||
);
|
||||
}
|
||||
|
||||
export default SupportChatbot;
|
||||
export default SupportChatbot;
|
||||
Reference in new issue
Block a user