diff --git a/parfum-shop/src/components/CartToast.jsx b/parfum-shop/src/components/CartToast.jsx index a7ec7ba..8901970 100644 --- a/parfum-shop/src/components/CartToast.jsx +++ b/parfum-shop/src/components/CartToast.jsx @@ -22,14 +22,23 @@ function CartToast() { }; return ( -
- {cartToast.title}

{cartToast.message}

{cartToast.actionLabel && ( - )} diff --git a/parfum-shop/src/components/ProductDetailPage.css b/parfum-shop/src/components/ProductDetailPage.css index 89352da..2946939 100644 --- a/parfum-shop/src/components/ProductDetailPage.css +++ b/parfum-shop/src/components/ProductDetailPage.css @@ -362,67 +362,9 @@ color: #fff; } -.purchase-discovery-note a { - display: inline-flex; - align-items: center; - justify-content: center; - min-height: 44px; - padding: 0 1rem; - border-radius: var(--radius-lg); - background: var(--theme-accent-fill); - color: var(--theme-accent-contrast); - text-decoration: none; - white-space: nowrap; - font-size: var(--text-sm); - transition: - transform var(--duration-med) var(--ease-out), - box-shadow var(--duration-med) var(--ease-out); -} - -.purchase-discovery-note a:hover { - transform: translateY(-2px); - box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24); -} - -.buy-button, -.restock-button, -.detail-bottom-actions button, -.review-toggle, -.review-write-button { - min-height: 48px; - border: 1px solid var(--theme-border); - border-radius: var(--radius-lg); - cursor: pointer; - text-transform: uppercase; - letter-spacing: 0.12em; - transition: - transform var(--duration-med) var(--ease-out), - border-color var(--duration-med) var(--ease-out), - background-color var(--duration-med) var(--ease-out), - box-shadow var(--duration-med) var(--ease-out); -} - -.buy-button { - border-color: var(--theme-accent-fill); - background: var(--theme-accent-fill); - color: var(--theme-accent-contrast); -} - -.restock-button { - background: transparent; - color: var(--theme-text); -} - -.buy-button:hover, -.restock-button:hover, -.detail-bottom-actions button:hover { - transform: translateY(-2px); - box-shadow: var(--theme-shadow-soft); -} - -.restock-button:hover { - border-color: rgba(var(--theme-accent-rgb) / 0.68); -} +/* Buy / restock / discovery / review CTAs use the global .atmos-btn system + (see src/style/buttons.css). The .restock-button class is kept on the + element only as a hook for the mobile breakpoint that hides it. */ .product-story-grid, .product-meta-section { @@ -834,21 +776,7 @@ margin-top: var(--gap-sm); } -.review-toggle { - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - gap: var(--gap-sm); - padding: 0.9rem 1rem; - background: transparent; - color: var(--theme-text); -} - -.review-toggle:hover { - border-color: rgba(var(--theme-accent-rgb) / 0.6); -} - +/* .review-toggle is rendered as `.atmos-btn--outline --block --split`. */ .review-toggle-icon { font-size: 1.2rem; line-height: 1; @@ -896,12 +824,6 @@ background: var(--theme-accent); } -.review-write-button { - background: var(--theme-paper); - color: var(--theme-text-muted); - cursor: not-allowed; -} - .detail-bottom-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; @@ -926,29 +848,9 @@ } .detail-bottom-actions { - display: flex; - flex-wrap: wrap; - gap: var(--gap-xs); justify-content: flex-end; } -.detail-bottom-actions button { - padding: 0 clamp(1rem, 2vw, 1.35rem); - border: 0; - border-radius: var(--radius-lg); - background: #fff; - color: var(--theme-accent-fill-strong); - box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18); - font-size: var(--text-sm); - letter-spacing: 0; - text-transform: none; - white-space: nowrap; -} - -.detail-bottom-actions button:active { - transform: translateY(0) scale(0.98); -} - .recommendation-heading { display: block; max-width: 74rem; @@ -1250,7 +1152,7 @@ display: none; } - .buy-button, + .purchase-actions .atmos-btn, .restock-button { min-height: 38px; font-size: 0.72rem; @@ -1273,11 +1175,6 @@ width: min(100%, 24rem); } - .buy-button, - .restock-button { - width: 100%; - } - .review-score-block { justify-items: start; } diff --git a/parfum-shop/src/components/ProductDetailPage.jsx b/parfum-shop/src/components/ProductDetailPage.jsx index e5794cb..061bfae 100644 --- a/parfum-shop/src/components/ProductDetailPage.jsx +++ b/parfum-shop/src/components/ProductDetailPage.jsx @@ -119,7 +119,7 @@ function ProductPurchasePanel({
- Zum Set + + Zum Set +
); @@ -429,7 +434,7 @@ function ProductReviews({
))} - @@ -466,7 +475,7 @@ function ProductReviews({ function ProductTestingCTA({ perfume, addToCart }) { return ( -
+
Lieber erst testen?

Sample oder Discovery Set.

@@ -477,22 +486,24 @@ function ProductTestingCTA({ perfume, addToCart }) {

-
+
diff --git a/parfum-shop/src/components/ShopDrawer.css b/parfum-shop/src/components/ShopDrawer.css index 1795e1a..a4c96c9 100644 --- a/parfum-shop/src/components/ShopDrawer.css +++ b/parfum-shop/src/components/ShopDrawer.css @@ -1,3 +1,13 @@ +/** + * ShopDrawer + CartToast — visually aligned with Landing/Product surfaces. + * + * Buttons inside the drawer use the global `.atmos-btn` system. This file + * only owns layout, the form-field skin, and the surface look of inner + * cards (cart item, payment card, requirements, orders, etc.). + */ + +/* ----- Backdrop & shell -------------------------------------------------- */ + .drawer-backdrop { position: fixed; inset: 0; @@ -5,10 +15,10 @@ background: rgba(0, 0, 0, 0.58); opacity: 0; pointer-events: none; - transition: opacity 0.22s ease; + transition: opacity var(--duration-med) var(--ease-out); } -.drawer-backdrop.open { +.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; } @@ -20,481 +30,676 @@ z-index: 90; width: min(560px, 100%); height: 100vh; - padding: 22px; + height: 100dvh; + padding: clamp(1rem, 3vw, 1.4rem); overflow-y: auto; background: var(--theme-surface); border-left: 1px solid var(--theme-border); color: var(--theme-text); + box-shadow: var(--theme-shadow); transform: translateX(100%); - transition: transform 0.24s ease; + transition: transform var(--duration-med) var(--ease-out); } -.shop-drawer.open { +.shop-drawer.is-open { transform: translateX(0); } -.drawer-top, -.profile-section-header, -.drawer-actions { +/* ----- Top bar ----------------------------------------------------------- */ + +.drawer-top { display: flex; align-items: center; justify-content: space-between; - gap: 14px; -} - -.drawer-top { - padding-bottom: 18px; + gap: var(--gap-sm); + padding-bottom: var(--gap-sm); + margin-bottom: var(--gap-md); border-bottom: 1px solid var(--theme-border); - margin-bottom: 18px; - font-size: 12px; - letter-spacing: 0.24em; } -.drawer-top button, -.cart-toast-close { - width: 34px; - height: 34px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); - color: var(--theme-text); - cursor: pointer; +.drawer-top .atmos-btn--icon { + font-size: 1.1rem; + line-height: 1; } -.drawer-stack, -.auth-panel, -.cart-items, -.order-list, -.requirements, -.sample-credit-list, -.subscription-list { +/* ----- Sections ---------------------------------------------------------- */ + +.drawer-stack { display: flex; flex-direction: column; - gap: 14px; + gap: var(--gap-sm); } .drawer-section { - padding: 18px; - background: var(--theme-surface-soft); + display: flex; + flex-direction: column; + gap: var(--gap-xs); + padding: clamp(1rem, 2.4vw, 1.4rem); border: 1px solid var(--theme-border); + background: + linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)), + var(--theme-surface-soft); } -.drawer-section h2, -.drawer-section h3, -.drawer-section p { - margin-top: 0; +.drawer-section-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--gap-sm); } -.drawer-kicker { +.drawer-eyebrow { display: block; - margin-bottom: 12px; - font-size: 10px; - letter-spacing: 0.22em; + margin: 0; color: var(--theme-text-muted); + font-size: var(--text-xs); + letter-spacing: 0.22em; + text-transform: uppercase; } +.drawer-heading { + margin: 0; + color: var(--theme-text); + font-size: clamp(1.4rem, 3vw, 1.8rem); + font-weight: 300; + line-height: 1.05; + letter-spacing: 0; + text-transform: uppercase; +} + +.drawer-muted { + margin: 0; + color: var(--theme-text-muted); + font-size: var(--text-sm); + line-height: 1.5; +} + +.drawer-form { + display: flex; + flex-direction: column; + gap: var(--gap-xs); +} + +/* ----- Form fields ------------------------------------------------------- */ + .drawer-grid { display: grid; - gap: 12px; + gap: var(--gap-xs); } -.drawer-grid--two, -.profile-read-grid, -.toggle-grid, -.payment-grid { - display: grid; +.drawer-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 12px; } -.shop-field { +.drawer-field { display: flex; flex-direction: column; - gap: 7px; - font-size: 11px; - letter-spacing: 0.08em; - text-transform: uppercase; - color: var(--theme-text-muted); + gap: 0.4rem; } -.shop-field input { +.drawer-field > span { + color: var(--theme-text-muted); + font-size: var(--text-xs); + letter-spacing: 0.18em; + text-transform: uppercase; +} + +.drawer-field input { width: 100%; - min-height: 42px; + min-height: 44px; + padding: 0 0.75rem; border: 1px solid var(--theme-control-border); - border-radius: 0; background: var(--theme-control-bg); - padding: 10px 11px; color: var(--theme-text); font: inherit; letter-spacing: 0; text-transform: none; + transition: + border-color var(--duration-med) var(--ease-out), + background-color var(--duration-med) var(--ease-out); } -.shop-field input:hover { +.drawer-field input:hover { border-color: var(--theme-control-border-hover); } -.shop-field input:focus { +.drawer-field input:focus { border-color: var(--theme-control-border-focus); outline: 2px solid var(--theme-focus-ring); outline-offset: 2px; } -.drawer-primary, -.drawer-secondary, -.cart-remove, -.pref-toggle, -.payment-card, -.cart-controls button, -.cart-toast button { - border-radius: 0; - cursor: pointer; - font: inherit; -} +/* ----- Cart -------------------------------------------------------------- */ -.drawer-primary { - width: 100%; - min-height: 46px; - border: 1px solid #1f1f1f; - background: #1f1f1f; - color: #fff; - text-transform: uppercase; - letter-spacing: 0.12em; -} - -.drawer-primary:disabled { - opacity: 0.45; - cursor: not-allowed; -} - -.drawer-secondary { - min-height: 38px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); - color: var(--theme-text); - padding: 0 13px; -} - -.drawer-link-primary { - display: inline-flex; - align-items: center; - justify-content: center; - text-decoration: none; -} - -.cart-item, -.order-card, -.read-block, -.status-box, -.requirement-row { - background: var(--theme-surface-soft); - border: 1px solid var(--theme-border); +.cart-items { + display: flex; + flex-direction: column; + gap: var(--gap-xs); + margin-top: var(--gap-2xs); } .cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; - gap: 12px; align-items: center; - padding: 14px; + gap: var(--gap-sm); + padding: clamp(0.85rem, 2vw, 1.1rem); + border: 1px solid var(--theme-border); + background: var(--theme-paper); } -.cart-item h3 { - margin-bottom: 4px; - font-size: 14px; +.cart-item-info h3 { + margin: 0 0 0.25rem; + color: var(--theme-text); + font-size: var(--text-base); + font-weight: 400; + line-height: 1.2; + letter-spacing: 0; + text-transform: none; } -.cart-item p, -.drawer-muted, -.order-card p { +.cart-item-info p { margin: 0; color: var(--theme-text-muted); - font-size: 13px; - line-height: 1.45; + font-size: var(--text-sm); + line-height: 1.4; } .cart-controls { display: grid; - grid-template-columns: 32px 32px 32px; + grid-template-columns: 36px 36px 36px; align-items: center; border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); + background: var(--theme-surface); } .cart-controls button { - width: 32px; - height: 32px; + width: 36px; + height: 36px; border: 0; background: transparent; + color: var(--theme-text); + font-size: var(--text-base); + cursor: pointer; + transition: + background-color var(--duration-med) var(--ease-out), + color var(--duration-med) var(--ease-out); +} + +.cart-controls button:hover { + background: rgba(var(--theme-accent-rgb) / 0.12); + color: var(--theme-accent); } .cart-controls span { text-align: center; + font-size: var(--text-sm); } -.cart-remove { - min-height: 34px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); - padding: 0 10px; +/* ----- Payment ----------------------------------------------------------- */ + +.payment-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: var(--gap-xs); + margin-top: var(--gap-2xs); } .payment-card { + position: relative; display: flex; align-items: center; - gap: 10px; + gap: var(--gap-xs); min-height: 60px; + padding: var(--gap-xs); border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); - padding: 12px; + background: var(--theme-paper); + color: var(--theme-text); + cursor: pointer; + isolation: isolate; + transition: + border-color var(--duration-med) var(--ease-out), + background-color var(--duration-med) var(--ease-out); } -.payment-card span { +.payment-card::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 2px; + background: var(--theme-accent); + transform: scaleX(0); + transform-origin: left center; + transition: transform var(--duration-med) var(--ease-out); +} + +.payment-card:hover { + border-color: rgba(var(--theme-accent-rgb) / 0.55); +} + +.payment-card.is-active { + border-color: var(--theme-accent); + background: rgba(var(--theme-accent-rgb) / 0.08); +} + +.payment-card.is-active::before { + transform: scaleX(1); +} + +.payment-card__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 28px; - background: #1f1f1f; - color: #fff; - font-size: 10px; - letter-spacing: 0.08em; + background: var(--theme-text); + color: var(--theme-bg); + font-size: var(--text-xs); + letter-spacing: 0.12em; } -.payment-card.active { - border-color: var(--theme-accent); - background: rgba(var(--theme-accent-rgb) / 0.12); +.payment-card strong { + color: var(--theme-text); + font-size: var(--text-sm); + font-weight: 400; } -.totals-box { - display: flex; - flex-direction: column; - gap: 10px; +/* ----- Totals ------------------------------------------------------------ */ + +.drawer-totals { + gap: var(--gap-xs); } -.totals-box > div, -.requirement-row { +.drawer-totals__row { display: flex; justify-content: space-between; - gap: 12px; + gap: var(--gap-sm); + font-size: var(--text-sm); + color: var(--theme-text); } -.totals-box .discount-explainer { - display: block; - padding: 12px; +.drawer-totals__row span { + color: var(--theme-text-muted); + font-size: var(--text-xs); + letter-spacing: 0.16em; + text-transform: uppercase; +} + +.drawer-totals__row--total { + margin-top: var(--gap-xs); + padding-top: var(--gap-xs); + border-top: 1px solid var(--theme-border); + font-size: var(--text-lg); +} + +.drawer-totals__row--total span { + color: var(--theme-text); + font-size: var(--text-xs); +} + +.drawer-totals__explainer { + display: flex; + flex-direction: column; + gap: 0.5rem; + padding: var(--gap-xs); border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); + background: var(--theme-paper); } -.discount-explainer span { - display: block; - margin-bottom: 8px; -} - -.discount-explainer p { +.drawer-totals__explainer p { margin: 0; color: var(--theme-text); - font-size: 13px; + font-size: var(--text-sm); line-height: 1.45; } -.discount-explainer p + p { - margin-top: 6px; +.drawer-totals__explainer strong { + color: var(--theme-accent); + font-weight: 400; } -.total-row { - padding-top: 10px; - border-top: 1px solid var(--theme-border); - font-size: 18px; -} +/* ----- Error ------------------------------------------------------------- */ .drawer-error { margin: 0; - padding: 12px 14px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); + padding: var(--gap-xs); + border: 1px solid var(--theme-accent); + background: rgba(var(--theme-accent-rgb) / 0.08); color: var(--theme-text); + font-size: var(--text-sm); + line-height: 1.5; } -.drawer-error { - border-color: var(--theme-accent); +/* ----- Profile ----------------------------------------------------------- */ + +.drawer-profile-head { + flex-direction: row; + align-items: center; + justify-content: space-between; + gap: var(--gap-sm); } -.profile-head { - display: grid; - gap: 8px; -} - -.profile-head h2 { - margin-bottom: 0; +.drawer-profile-head > div { + display: flex; + flex-direction: column; + gap: 0.35rem; } .profile-read-grid { - margin-top: 14px; + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: var(--gap-xs); + margin-top: var(--gap-2xs); } -.read-block { - padding: 13px; +.drawer-read-block { display: flex; flex-direction: column; - gap: 7px; + gap: 0.4rem; + padding: var(--gap-xs); + border: 1px solid var(--theme-border); + background: var(--theme-paper); } -.read-block span, -.requirement-row span, -.totals-box span { +.drawer-read-block span { color: var(--theme-text-muted); - font-size: 11px; - letter-spacing: 0.08em; + font-size: var(--text-xs); + letter-spacing: 0.16em; text-transform: uppercase; } -.status-box { - padding: 14px; - font-weight: 700; +.drawer-read-block strong { + color: var(--theme-text); + font-size: var(--text-sm); + font-weight: 400; + line-height: 1.4; + word-break: break-word; } -.sample-credit-list { - margin-top: 12px; -} +/* ----- Status box -------------------------------------------------------- */ -.sample-credit-list span { - padding: 10px; - background: var(--theme-surface-soft); +.drawer-status-box { + padding: var(--gap-xs); border: 1px solid var(--theme-border); - font-size: 13px; + background: var(--theme-paper); + color: var(--theme-text); + font-size: var(--text-base); + line-height: 1.4; } -.pref-toggle { - min-height: 58px; - padding: 12px; +.drawer-credit-list { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + margin-top: var(--gap-2xs); +} + +.drawer-credit-list span { + display: inline-flex; + align-items: center; + padding: 0.4rem 0.7rem; border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); + background: var(--theme-paper); + color: var(--theme-text); + font-size: var(--text-xs); + letter-spacing: 0.05em; +} + +/* ----- Toggles ----------------------------------------------------------- */ + +.drawer-toggle-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: var(--gap-xs); +} + +.drawer-toggle { + position: relative; display: flex; flex-direction: column; align-items: flex-start; - gap: 6px; + gap: 0.35rem; + min-height: 64px; + padding: var(--gap-xs); + border: 1px solid var(--theme-border); + background: var(--theme-paper); + color: var(--theme-text); + cursor: pointer; + isolation: isolate; + transition: + border-color var(--duration-med) var(--ease-out), + background-color var(--duration-med) var(--ease-out); } -.pref-toggle.active { +.drawer-toggle::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 2px; + background: var(--theme-accent); + transform: scaleX(0); + transform-origin: left center; + transition: transform var(--duration-med) var(--ease-out); +} + +.drawer-toggle:hover { + border-color: rgba(var(--theme-accent-rgb) / 0.55); +} + +.drawer-toggle.is-active { border-color: var(--theme-accent); - background: rgba(var(--theme-accent-rgb) / 0.12); + background: rgba(var(--theme-accent-rgb) / 0.08); } -.subscription-list { - margin-top: 16px; - padding-top: 16px; - border-top: 1px solid var(--theme-border); +.drawer-toggle.is-active::before { + transform: scaleX(1); } -.subscription-list-title { +.drawer-toggle span { color: var(--theme-text-muted); - font-size: 10px; - letter-spacing: 0.18em; + font-size: var(--text-xs); + letter-spacing: 0.16em; text-transform: uppercase; } -.subscription-row { - display: grid; - grid-template-columns: minmax(0, 1fr) auto; - gap: 12px; - align-items: center; - padding: 12px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); -} - -.subscription-row div { - display: flex; - flex-direction: column; - gap: 4px; -} - -.subscription-row span { - color: var(--theme-text-muted); - font-size: 12px; -} - -.subscription-row button { - min-height: 34px; - border: 1px solid var(--theme-border); - border-radius: 0; - background: var(--theme-surface-soft); +.drawer-toggle strong { color: var(--theme-text); - padding: 0 12px; - cursor: pointer; + font-size: var(--text-sm); + font-weight: 400; } -.subscription-row button:hover { - border-color: var(--theme-accent); -} - -.requirement-row { - padding: 12px; -} - -.requirement-row strong.met { +.drawer-toggle.is-active strong { color: var(--theme-accent); } -.order-card { - padding: 14px; +/* ----- Subscriptions ----------------------------------------------------- */ + +.drawer-subscription-list { + display: flex; + flex-direction: column; + gap: var(--gap-xs); + margin-top: var(--gap-sm); + padding-top: var(--gap-sm); + border-top: 1px solid var(--theme-border); } -.order-card div { +.drawer-subscription-row { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + align-items: center; + gap: var(--gap-sm); + padding: var(--gap-xs); + border: 1px solid var(--theme-border); + background: var(--theme-paper); +} + +.drawer-subscription-row > div { + display: flex; + flex-direction: column; + gap: 0.2rem; + min-width: 0; +} + +.drawer-subscription-row strong { + color: var(--theme-text); + font-size: var(--text-sm); + font-weight: 400; +} + +.drawer-subscription-row span { + color: var(--theme-text-muted); + font-size: var(--text-xs); +} + +/* ----- Requirements ------------------------------------------------------ */ + +.drawer-requirements { + display: flex; + flex-direction: column; + gap: 0.4rem; + margin-top: var(--gap-2xs); +} + +.drawer-requirement { + position: relative; display: flex; justify-content: space-between; - gap: 12px; - margin-bottom: 10px; + gap: var(--gap-sm); + padding: var(--gap-xs); + border: 1px solid var(--theme-border); + background: var(--theme-paper); + isolation: isolate; } +.drawer-requirement::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 2px; + background: var(--theme-accent); + transform: scaleX(0); + transform-origin: left center; + transition: transform var(--duration-med) var(--ease-out); +} + +.drawer-requirement.is-met::before { + transform: scaleX(1); +} + +.drawer-requirement span { + color: var(--theme-text-muted); + font-size: var(--text-xs); + letter-spacing: 0.16em; + text-transform: uppercase; +} + +.drawer-requirement strong { + color: var(--theme-text); + font-size: var(--text-sm); + font-weight: 400; +} + +.drawer-requirement.is-met strong { + color: var(--theme-accent); +} + +/* ----- Orders ------------------------------------------------------------ */ + +.drawer-order-list { + display: flex; + flex-direction: column; + gap: var(--gap-xs); + margin-top: var(--gap-2xs); +} + +.drawer-order-card { + display: flex; + flex-direction: column; + gap: 0.4rem; + padding: var(--gap-xs); + border: 1px solid var(--theme-border); + background: var(--theme-paper); +} + +.drawer-order-card header { + display: flex; + justify-content: space-between; + gap: var(--gap-sm); +} + +.drawer-order-card header span { + color: var(--theme-text-muted); + font-size: var(--text-xs); +} + +.drawer-order-card p { + margin: 0; + color: var(--theme-text-muted); + font-size: var(--text-sm); + line-height: 1.45; +} + +.drawer-order-card__total { + align-self: flex-end; + color: var(--theme-text); + font-size: var(--text-base); + font-weight: 400; +} + +/* ----- Cart Toast -------------------------------------------------------- */ + .cart-toast { position: fixed; - right: 22px; - bottom: 22px; + right: var(--page-x); + bottom: var(--page-x); z-index: 100; - width: min(360px, calc(100vw - 44px)); - padding: 18px; + width: min(360px, calc(100vw - (var(--page-x) * 2))); + display: flex; + flex-direction: column; + gap: var(--gap-xs); + padding: clamp(1rem, 2.4vw, 1.25rem); border: 1px solid var(--theme-border); background: var(--theme-surface); color: var(--theme-text); - box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22); + box-shadow: var(--theme-shadow); +} + +.cart-toast strong { + color: var(--theme-text); + font-size: var(--text-base); + font-weight: 400; + line-height: 1.2; } .cart-toast p { - margin: 8px 38px 14px 0; + margin: 0 var(--gap-md) 0 0; color: var(--theme-text-muted); -} - -.cart-toast > button:last-child { - min-height: 40px; - width: 100%; - border: 1px solid #1f1f1f; - background: #1f1f1f; - color: #fff; -} - -.cart-toast > button.cart-toast-close:last-child { - width: 34px; - min-height: 34px; - border: 1px solid var(--theme-border); - background: var(--theme-surface-soft); - color: var(--theme-text); + font-size: var(--text-sm); + line-height: 1.5; } .cart-toast-close { position: absolute; - top: 12px; - right: 12px; + top: 0.55rem; + right: 0.55rem; } +/* ----- Responsive -------------------------------------------------------- */ + @media (max-width: 640px) { .shop-drawer { - padding: 16px; + width: 100%; } .drawer-grid--two, .profile-read-grid, - .toggle-grid, + .drawer-toggle-grid, .payment-grid { grid-template-columns: 1fr; } @@ -502,92 +707,19 @@ .cart-item { grid-template-columns: 1fr; } -} - -/* --- Design System Refinement Start --- */ - -.shop-drawer { - width: min(560px, 100%); - min-width: 0; - padding: clamp(1rem, 3vw, 1.4rem); - box-shadow: var(--theme-shadow); -} - -.drawer-top button, -.cart-toast-close, -.cart-controls button, -.subscription-row button { - min-width: 44px; - min-height: 44px; -} - -.drawer-section, -.cart-item, -.order-card, -.read-block, -.status-box, -.requirement-row, -.drawer-error, -.payment-card, -.pref-toggle, -.subscription-row, -.totals-box .discount-explainer, -.cart-toast, -.shop-field input { - border-radius: var(--radius-lg); -} - -.drawer-primary, -.drawer-secondary, -.cart-remove, -.cart-controls, -.cart-controls button, -.cart-toast button, -.subscription-row button { - border-radius: var(--radius-lg); -} - -.drawer-primary, -.cart-toast > button:last-child { - min-height: 48px; -} - -.drawer-primary, -.drawer-secondary, -.cart-remove, -.payment-card, -.pref-toggle, -.subscription-row button { - transition: - transform var(--duration-med) var(--ease-out), - border-color var(--duration-med) var(--ease-out), - background-color var(--duration-med) var(--ease-out), - box-shadow var(--duration-med) var(--ease-out); -} - -.drawer-primary:hover:not(:disabled), -.drawer-secondary:hover, -.cart-remove:hover, -.payment-card:hover, -.pref-toggle:hover, -.subscription-row button:hover { - transform: translateY(-1px); - border-color: rgba(var(--theme-accent-rgb) / 0.55); -} - -@media (max-width: 640px) { - .shop-drawer { - width: 100%; - } - - .cart-toast { - right: var(--page-x); - bottom: var(--page-x); - width: calc(100vw - (var(--page-x) * 2)); + .drawer-profile-head { + flex-direction: column; + align-items: flex-start; } } -/* --- Design System Refinement End --- */ - - +@media (prefers-reduced-motion: reduce) { + .shop-drawer, + .drawer-backdrop, + .payment-card::before, + .drawer-toggle::before, + .drawer-requirement::before { + transition: none; + } +} diff --git a/parfum-shop/src/components/ShopDrawer.jsx b/parfum-shop/src/components/ShopDrawer.jsx index be38df2..ba5f844 100644 --- a/parfum-shop/src/components/ShopDrawer.jsx +++ b/parfum-shop/src/components/ShopDrawer.jsx @@ -5,8 +5,8 @@ import { useShop } from "../shop/useShop"; import "./ShopDrawer.css"; const paymentMethods = [ - { key: "Bill", badge: "BILL", label: "Bill" }, - { key: "Card", badge: "CARD", label: "Card" }, + { key: "Bill", badge: "BILL", label: "Rechnung" }, + { key: "Card", badge: "CARD", label: "Karte" }, { key: "Twint", badge: "TW", label: "Twint" }, { key: "PayPal", badge: "PP", label: "PayPal" }, ]; @@ -38,7 +38,7 @@ function Field({ const fieldId = id || `shop-field-${fieldName}-${generatedId}`; return ( -