Files
marketplaces/src/styles.scss

494 lines
12 KiB
SCSS
Raw Normal View History

2026-01-18 18:57:06 +04:00
/* Global Styles */
2026-02-26 21:54:21 +04:00
/* Google Fonts loaded via <link> in index.html for non-blocking rendering */
2026-02-14 00:45:17 +04:00
2026-01-18 18:57:06 +04:00
/* Default CSS Variables - will be overridden by theme files */
:root {
2026-02-14 02:34:11 +04:00
--primary-color: #497671;
--primary-hover: #3d635f;
--secondary-color: #a1b4b5;
--secondary-hover: #8da3a4;
--accent-color: #a7ceca;
--accent-hover: #91b9b5;
2026-01-18 18:57:06 +04:00
2026-02-14 02:34:11 +04:00
--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%);
2026-01-18 18:57:06 +04:00
2026-02-14 02:34:11 +04:00
--text-primary: #1e3c38;
--text-secondary: #667a77;
--text-light: #828e8d;
2026-01-18 18:57:06 +04:00
--bg-primary: #ffffff;
2026-02-14 02:34:11 +04:00
--bg-secondary: #f5f5f5;
--bg-tertiary: #f0f0f0;
2026-01-18 18:57:06 +04:00
--success-color: #10b981;
--warning-color: #f59e0b;
--error-color: #ef4444;
--info-color: #3b82f6;
2026-02-14 02:34:11 +04:00
--border-color: #d3dad9;
--border-dark: #677b78;
2026-01-18 18:57:06 +04:00
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
2026-02-14 02:34:11 +04:00
--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;
2026-01-18 18:57:06 +04:00
--radius-sm: 8px;
--radius-md: 12px;
2026-02-14 02:34:11 +04:00
--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;
2026-01-18 18:57:06 +04:00
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
*::before,
*::after {
box-sizing: inherit;
}
2026-01-18 18:57:06 +04:00
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);
2026-01-18 18:57:06 +04:00
color: var(--text-primary);
2026-02-14 02:34:11 +04:00
background: #f5f5f5;
2026-01-18 18:57:06 +04:00
min-height: 100vh;
2026-02-14 01:28:08 +04:00
overflow-x: hidden;
2026-02-14 02:59:26 +04:00
&.platform-menu-open {
2026-02-14 02:59:26 +04:00
overflow: hidden;
}
2026-01-18 18:57:06 +04:00
}
/* 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%;
}
2026-01-18 18:57:06 +04:00
/* Smooth Transitions */
a, button, input, textarea, select {
transition: all var(--transition-slow);
2026-01-18 18:57:06 +04:00
}
/* 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;
}
}
2026-01-18 18:57:06 +04:00
/* 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. */
2026-01-18 18:57:06 +04:00
.container {
max-width: 1280px;
2026-01-18 18:57:06 +04:00
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,
.catalog-product-card {
transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.product-card:hover,
.item-card:hover,
.catalog-product-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-primary {
background: var(--primary-color);
color: #fff;
border-color: var(--primary-color);
}
.btn-primary:hover {
background: var(--primary-hover);
border-color: var(--primary-hover);
}
.btn-secondary {
background: var(--secondary-color);
color: #fff;
border-color: var(--secondary-color);
}
.btn-secondary:hover {
background: var(--secondary-hover);
border-color: var(--secondary-hover);
}
.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;
}
2026-01-18 18:57:06 +04:00
}
.text-center {
text-align: center;
}
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
2026-01-18 18:57:06 +04:00
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
2026-01-18 18:57:06 +04:00
.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }
2026-01-18 18:57:06 +04:00
2026-02-20 10:44:03 +04:00
// ─── Shared Badge & Tag Styles (from backOffice integration) ───
.item-badges-overlay {
position: absolute;
top: 8px;
left: 8px;
display: flex;
flex-wrap: wrap;
gap: 4px;
z-index: 2;
}
.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);
2026-02-20 10:44:03 +04:00
text-transform: uppercase;
letter-spacing: 0.4px;
color: #fff;
line-height: var(--line-height-normal);
2026-02-20 10:44:03 +04:00
&.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);
2026-02-20 10:44:03 +04:00
color: var(--primary-color);
background: rgba(73, 118, 113, 0.08);
border: 1px solid rgba(73, 118, 113, 0.15);
}
.item-simple-desc {
font-size: var(--font-size-sm);
2026-02-20 10:44:03 +04:00
color: var(--text-secondary);
line-height: var(--line-height-normal);
2026-02-20 10:44:03 +04:00
margin: 2px 0 4px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
2026-06-21 23:42:39 +04:00
line-clamp: 2;
2026-02-20 10:44:03 +04:00
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}