Geizkragen/style.css
2026-01-22 22:45:32 +01:00

458 lines
9.5 KiB
CSS
Executable File

/* ==========================================================
RESET & BASIS
========================================================== */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg-main: #151923;
--bg-card: #ffffff;
--bg-header: #1f2937;
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-accent: #10b981;
--text-main: #151c2e;
--text-muted: #6b7280;
--text-invert: #ffffff;
--border-color: #e5e7eb;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 16px;
--shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
--shadow-md: 0 6px 20px rgba(0,0,0,0.08);
--transition-fast: 150ms ease;
--transition-normal: 250ms ease;
/* Gutter des Standard-Containers (für Navbar-Logo-Offset genutzt) */
--nav-gutter: 1.5rem;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, "Helvetica Neue", Arial, sans-serif;
background: var(--bg-main); !important;
color: var(--text-main); !important;
line-height: 1.45;
}
/* ==========================================================
CONTAINER (Wrapper)
========================================================== */
.container {
max-width: 1400px;
margin-inline: auto;
padding-inline: var(--nav-gutter);
}
/* ==========================================================
HEADER
========================================================== */
.header {
position: sticky;
top: 0;
z-index: 1000;
background: var(--bg-header);
box-shadow: 0 2px 10px rgba(0,0,0,0.15);
padding: 0;
}
/* Entferne die Padding-Änderung im Header nicht global auf .container.
(Das hat die Ausrichtung der rechten Elemente kaputt gemacht.) */
/* .header .container { padding-inline: 0; } */
/* ==========================================================
NAVBAR
========================================================== */
.nav {
min-height: 56px;
width: 100%;
display: flex;
align-items: center;
background: var(--bg-header);
}
/* Logo wirklich ganz links (ohne Tricks) */
.nav__logoLink {
display: inline-flex;
align-items: center;
padding-left: 0;
margin-left: 0; /* <-- wichtig: kein negatives Margin */
}
.nav__logo {
display: block;
margin: 0;
max-width: 150px;
height: auto;
}
/* Rechter Bereich: nimmt den restlichen Platz ein und richtet Inhalt rechts aus */
.nav__inner {
margin-right: 0;
flex: 1;
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
gap: 1.25rem;
}
/* Damit Menü + Icons wirklich bis ganz rechts können (trotz container max-width) */
.nav__inner.container {
margin-left: auto;
}
/* Desktop: Menü rechts */
.nav__menu {
display: flex;
align-items: center;
}
.nav__list {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav__link {
color: rgba(255,255,255,0.85);
font-size: 0.95rem;
font-weight: 500;
text-decoration: none;
transition: color var(--transition-normal);
}
.nav__link:hover {
color: var(--text-invert);
}
/* Action Icons rechts */
.nav__actions {
display: flex;
align-items: center;
gap: 1.2rem;
}
.nav__search,
.nav__login,
.nav__toggle,
.nav__close {
font-size: 1.3rem;
color: var(--text-invert);
cursor: pointer;
transition: color var(--transition-normal);
}
.nav__search:hover,
.nav__login:hover {
color: var(--color-primary);
}
/* ==========================================================
TOGGLE / CLOSE
========================================================== */
.nav__toggle {
display: none;
}
.nav__close {
display: none;
}
/* ==========================================================
MOBILE NAV
========================================================== */
@media (max-width: 900px) {
/* Logo bleibt links, Container rechts (Toggle) */
.nav__toggle {
display: block;
}
.nav__menu {
position: fixed;
top: 0;
right: -100%;
width: 280px;
height: 100%;
background: #111827;
padding: 4rem 2rem;
transition: right 300ms ease;
flex-direction: column;
align-items: flex-start;
gap: 2rem;
}
.nav__menu.show-menu {
right: 0;
}
.nav__list {
flex-direction: column;
gap: 1.5rem;
}
.nav__link {
font-size: 1.05rem;
color: #e5e7eb;
}
.nav__close {
display: block;
position: absolute;
top: 1.2rem;
right: 1.2rem;
}
}
/* ==========================================================
LAYOUT
========================================================== */
/*
WICHTIG:
`.container` ist jetzt nur noch ein Wrapper (max-width/padding).
Das Grid-Layout liegt in `.layout`, damit die Navbar (`.nav.container`)
nicht versehentlich zu einem Grid wird.
*/
.layout {
margin: 2rem auto;
padding: 0 2rem;
display: grid;
grid-template-columns: 260px 1fr;
gap: 2rem;
}
/* ==========================================================
FILTER / SIDEBAR
========================================================== */
.sidebar {
background: var(--bg-card);
border-radius: var(--radius-md);
padding: 1.2rem;
box-shadow: var(--shadow-sm);
}
.sidebar h3 {
font-size: 1rem;
margin-bottom: 1rem;
}
.filter-group {
margin-bottom: 1.2rem;
}
.filter-group label {
display: block;
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 0.3rem;
}
.filter-group input,
.filter-group select {
width: 100%;
padding: 0.45rem 0.6rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border-color);
font-size: 0.9rem;
}
/* ==========================================================
PRODUCT GRID
========================================================== */
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 1.6rem;
}
/* ==========================================================
PRODUCT CARD
========================================================== */
.product-card {
background: var(--bg-card);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
transition: transform var(--transition-normal),
box-shadow var(--transition-normal);
}
.product-card:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-md);
}
.product-image {
height: 180px;
background: #f1f5f9;
border-top-left-radius: var(--radius-lg);
border-top-right-radius: var(--radius-lg);
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
color: var(--text-muted);
}
.product-content {
padding: 1rem 1.1rem 1.2rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.product-title {
font-size: 0.95rem;
font-weight: 600;
}
.product-meta {
font-size: 0.8rem;
color: var(--text-muted);
}
.product-price {
margin-top: 0.6rem;
font-size: 1.4rem;
font-weight: 700;
color: var(--color-primary);
}
.product-actions {
margin-top: auto;
display: flex;
gap: 0.5rem;
}
.btn {
flex: 1;
padding: 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.85rem;
cursor: pointer;
border: none;
transition: background var(--transition-fast);
}
.btn-primary {
background: var(--color-primary);
color: #fff;
}
.btn-primary:hover {
background: var(--color-primary-hover);
}
.btn-secondary {
background: #f3f4f6;
color: var(--text-main);
}
.btn-secondary:hover {
background: #e5e7eb;
}
/* ==========================================================
BADGES
========================================================== */
.badge {
display: inline-block;
padding: 0.2rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.7rem;
font-weight: 600;
}
.badge-green {
background: #d1fae5;
color: #065f46;
}
/* ==========================================================
RESPONSIVE
========================================================== */
@media (max-width: 900px) {
.layout {
grid-template-columns: 1fr;
}
.sidebar {
order: 2;
}
}
.icon-user {
width: 24px;
height: 24px;
fill: currentColor; /* passt sich Textfarbe an */
}
/* ==========================================================
FOOTER
========================================================== */
.footer {
margin-top: 3rem;
background: var(--bg-header);
color: rgba(255, 255, 255, 0.85);
border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer .container {
padding-block: 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.footer p {
margin: 0;
font-size: 0.9rem;
}
.footer__nav {
display: flex;
align-items: center;
gap: 1rem;
}
.footer__nav a {
color: rgba(255, 255, 255, 0.85);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: color var(--transition-normal),
text-decoration-color var(--transition-normal);
text-decoration-thickness: 2px;
text-underline-offset: 4px;
text-decoration-color: transparent;
}
.footer__nav a:hover,
.footer__nav a:focus-visible {
color: var(--text-invert);
text-decoration-color: rgba(255, 255, 255, 0.65);
}
@media (max-width: 600px) {
.footer .container {
flex-direction: column;
align-items: flex-start;
}
}