RC PERF-01 asset audit (images/fonts/SVG/CSS), follow-up to 61a5714/4bf0666. Removed from src/styles.scss - zero references (literal and hyphen-safe) in any .html/.ts across the repo, and no dynamic class-string construction found for the utility classes: - .btn-primary / .btn-secondary (+ :hover) - unused button variants - .catalog-product-card - unused selector in a shared comma group with .product-card/.item-card, which stay - .item-badges-overlay, .item-simple-desc - unused component helpers - .text-center, .mt-1..4, .mb-1..4, .p-1..4 - fully unused spacing utilities styles-*.css: 9.60 kB -> 8.41 kB raw (2.22 kB -> 1.99 kB transfer), -12%. No other category needed a code change: - Images: <img> tags already have loading="lazy"/decoding="async" on storefront grids/galleries (product-card, catalog, category-grid, cart, item-detail) from prior polish passes; CLS is already handled via CSS aspect-ratio on those containers rather than width/height attrs, so none were added. Payment-logo <img>s already have explicit width/height. Flagged, not fixed: a handful of single-image admin/ editor previews (page-editor, brand-overview, asset-details-drawer) lack loading="lazy" - low traffic, negligible impact, left alone to avoid unnecessary diff. - Fonts: index.html preconnects to fonts.gstatic.com/googleapis.com and loads DM Sans 400/500/600/700 via Google Fonts CSS2 (display=swap already in the URL). All 4 loaded weights are used in app CSS - no dead weight to drop. Flagged, not fixed: 800/900 are used in several component styles but never loaded, so the browser faux-bolds those - a pre-existing rendering quirk, out of scope (changing loaded weights risks visible text changes). - SVG: icon-registry.ts centralizes all icons via @lucide/angular (no inline SVG path duplication). Checked SVGs under public/ for editor cruft (metadata/inkscape/sodipodi comments) - found none, already clean. Flagged, not fixed: mastercard-logo.min.svg, dexar-logo*.svg, dexar-favicon.svg, novo-logo.svg, novo-favicon.svg appear unreferenced in src/public manifests - left in place since deletion is out of this task's scope and they may be used by backend-driven tenant branding. Verified: npx tsc --noEmit clean, npm run build green (initial bundle unchanged at 1.12 MB, this pass only touched global CSS).
426 lines
10 KiB
SCSS
426 lines
10 KiB
SCSS
/* Global Styles */
|
|
|
|
/* Google Fonts loaded via <link> in index.html for non-blocking rendering */
|
|
|
|
/* Default CSS Variables - will be overridden by theme files */
|
|
:root {
|
|
--primary-color: #497671;
|
|
--primary-hover: #3d635f;
|
|
--secondary-color: #a1b4b5;
|
|
--secondary-hover: #8da3a4;
|
|
--accent-color: #a7ceca;
|
|
--accent-hover: #91b9b5;
|
|
|
|
--gradient-primary: linear-gradient(360deg, #497671 0%, #a7ceca 100%);
|
|
--gradient-secondary: linear-gradient(135deg, #a1b4b5 0%, #677b78 100%);
|
|
--gradient-hero: linear-gradient(360deg, #497671 0%, #a7ceca 100%);
|
|
|
|
--text-primary: #1e3c38;
|
|
--text-secondary: #667a77;
|
|
--text-light: #828e8d;
|
|
|
|
--bg-primary: #ffffff;
|
|
--bg-secondary: #f5f5f5;
|
|
--bg-tertiary: #f0f0f0;
|
|
|
|
--success-color: #10b981;
|
|
--warning-color: #f59e0b;
|
|
--error-color: #ef4444;
|
|
--info-color: #3b82f6;
|
|
|
|
--border-color: #d3dad9;
|
|
--border-dark: #677b78;
|
|
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
--shadow-lg: 0 12px 32px rgba(73, 118, 113, 0.2);
|
|
|
|
--space-xs: 4px;
|
|
--space-sm: 8px;
|
|
--space-md: 16px;
|
|
--space-lg: 24px;
|
|
--space-xl: 32px;
|
|
--space-2xl: 48px;
|
|
--space-3xl: 64px;
|
|
|
|
--radius-sm: 8px;
|
|
--radius-md: 12px;
|
|
--radius-lg: 13px;
|
|
--radius-xl: 22px;
|
|
|
|
--transition-fast: 120ms ease;
|
|
--transition-normal: 180ms ease;
|
|
--transition-slow: 300ms ease;
|
|
|
|
/* Typography scale (RC design-system finalization).
|
|
Steps chosen to match the sizes already in wide use across the app
|
|
(button/input sm|md|lg = sm|md|lg here) so most components can adopt
|
|
the tokens by substitution rather than a visual redesign. */
|
|
--font-size-xs: 0.75rem; /* 12px — captions, badges, meta/helper text */
|
|
--font-size-sm: 0.8125rem; /* 13px — secondary text, table cells, sm controls */
|
|
--font-size-base: 0.875rem; /* 14px — dense body copy, form labels */
|
|
--font-size-md: 0.9375rem; /* 15px — default body copy, md controls */
|
|
--font-size-lg: 1rem; /* 16px — emphasized body, lg controls */
|
|
--font-size-xl: 1.125rem; /* 18px — card/section titles */
|
|
--font-size-2xl: 1.25rem; /* 20px — subsection headings */
|
|
--font-size-3xl: 1.5rem; /* 24px — page/section headings */
|
|
--font-size-4xl: 2rem; /* 32px — hero / display headings */
|
|
|
|
--font-weight-normal: 400;
|
|
--font-weight-medium: 500;
|
|
--font-weight-semibold: 600;
|
|
--font-weight-bold: 700;
|
|
|
|
--line-height-tight: 1.2;
|
|
--line-height-normal: 1.5;
|
|
--line-height-relaxed: 1.6;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
*::before,
|
|
*::after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
html {
|
|
font-size: 16px;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
body {
|
|
font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
font-size: var(--font-size-md);
|
|
font-weight: var(--font-weight-normal);
|
|
line-height: var(--line-height-relaxed);
|
|
color: var(--text-primary);
|
|
background: #f5f5f5;
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
|
|
&.platform-menu-open {
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
/* Heading scale — page title (h1) down to card/section title (h6). Individual
|
|
pages may still override size for hero/display treatments via the
|
|
--font-size-* tokens directly rather than arbitrary px/rem literals. */
|
|
h1 {
|
|
font-size: var(--font-size-4xl);
|
|
font-weight: var(--font-weight-bold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
h2 {
|
|
font-size: var(--font-size-3xl);
|
|
font-weight: var(--font-weight-bold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
h3 {
|
|
font-size: var(--font-size-2xl);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
h4 {
|
|
font-size: var(--font-size-xl);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
h5 {
|
|
font-size: var(--font-size-lg);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
h6 {
|
|
font-size: var(--font-size-base);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: var(--line-height-tight);
|
|
}
|
|
|
|
p {
|
|
font-size: var(--font-size-md);
|
|
line-height: var(--line-height-normal);
|
|
}
|
|
|
|
small {
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
img,
|
|
svg,
|
|
video,
|
|
canvas {
|
|
display: block;
|
|
max-width: 100%;
|
|
}
|
|
|
|
/* Smooth Transitions */
|
|
a, button, input, textarea, select {
|
|
transition: all var(--transition-slow);
|
|
}
|
|
|
|
/* Responsive Typography */
|
|
@media (max-width: 768px) {
|
|
html {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
/* Scrollbar Styling */
|
|
::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--gradient-primary);
|
|
border-radius: 10px;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--gradient-secondary);
|
|
}
|
|
|
|
/* Focus Styles */
|
|
*:focus-visible {
|
|
outline: 2px solid var(--primary-color);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Spinner rotation for app-icon name="spinner" used as a loading indicator */
|
|
@keyframes app-icon-spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.spin {
|
|
animation: app-icon-spin 1s linear infinite;
|
|
}
|
|
|
|
/* Consistent, animated expander chevron for every native <details>/<summary>
|
|
disclosure in the app, replacing the browser's default triangle marker
|
|
(which renders differently per browser). Matches the Lucide ChevronDown
|
|
path used everywhere else via app-icon, so expanders use the same icon
|
|
family as the rest of the UI without touching every call site. */
|
|
details > summary {
|
|
list-style: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
|
|
&::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
&::after {
|
|
content: '';
|
|
flex-shrink: 0;
|
|
width: 16px;
|
|
height: 16px;
|
|
background-color: currentColor;
|
|
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
|
|
mask-repeat: no-repeat;
|
|
mask-position: center;
|
|
mask-size: contain;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
}
|
|
|
|
details[open] > summary::after {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
details > summary::after {
|
|
transition: none;
|
|
}
|
|
}
|
|
|
|
/* Respect OS-level reduced-motion preference globally: neutralizes hover
|
|
transforms, card-entrance/skeleton-shimmer animations, and smooth-scroll
|
|
everywhere in one place rather than requiring every component to opt in
|
|
individually (a few already did this locally, e.g. shared/ui/skeleton). */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
scroll-behavior: auto !important;
|
|
}
|
|
}
|
|
|
|
/* Utility Classes */
|
|
.page-container {
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
padding: var(--space-lg) var(--space-md);
|
|
width: 100%;
|
|
}
|
|
|
|
/* Backward-compatible alias while foundation migration is in progress. */
|
|
.container {
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
padding: var(--space-lg) var(--space-md);
|
|
width: 100%;
|
|
}
|
|
|
|
.section {
|
|
margin: 0;
|
|
padding-block: clamp(16px, 2.5vw, 32px);
|
|
animation: section-fade-in 320ms ease-out both;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.card {
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-sm);
|
|
transition: transform var(--transition-normal), box-shadow var(--transition-normal);
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.product-card,
|
|
.item-card {
|
|
transition: transform var(--transition-normal), box-shadow var(--transition-normal);
|
|
}
|
|
|
|
.product-card:hover,
|
|
.item-card:hover {
|
|
transform: translateY(-2px) scale(1.01);
|
|
}
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-sm);
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-md);
|
|
padding: 0.625rem var(--space-md);
|
|
font-size: var(--font-size-md);
|
|
font-weight: var(--font-weight-semibold);
|
|
line-height: var(--line-height-tight);
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
|
|
}
|
|
|
|
.btn:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: var(--text-primary);
|
|
border-color: var(--border-color);
|
|
}
|
|
|
|
.btn-ghost:hover {
|
|
background: rgba(73, 118, 113, 0.08);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
@keyframes section-fade-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(6px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.grid-2 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.grid-3 {
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
}
|
|
|
|
.grid-4 {
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.grid-4 {
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.grid-3,
|
|
.grid-4 {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.grid-2,
|
|
.grid-3,
|
|
.grid-4 {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
// ─── Shared Badge & Tag Styles (from backOffice integration) ───
|
|
|
|
.item-badge {
|
|
display: inline-block;
|
|
padding: 2px var(--space-xs);
|
|
border-radius: var(--radius-xs);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: var(--font-weight-semibold);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.4px;
|
|
color: #fff;
|
|
line-height: var(--line-height-normal);
|
|
|
|
&.badge-new { background: #4caf50; }
|
|
&.badge-sale { background: #f44336; }
|
|
&.badge-exclusive { background: #9c27b0; }
|
|
&.badge-hot { background: #ff5722; }
|
|
&.badge-limited { background: #ff9800; }
|
|
&.badge-bestseller { background: #2196f3; }
|
|
&.badge-featured { background: #607d8b; }
|
|
&.badge-custom { background: #78909c; }
|
|
}
|
|
|
|
.item-tag {
|
|
display: inline-block;
|
|
padding: 2px var(--space-xs);
|
|
border-radius: var(--radius-full);
|
|
font-size: var(--font-size-xs);
|
|
color: var(--primary-color);
|
|
background: rgba(73, 118, 113, 0.08);
|
|
border: 1px solid rgba(73, 118, 113, 0.15);
|
|
}
|
|
|