Files
santeh-ray/static/css/style.css
Azimkin bb321dfa22
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
feat: add item images, product detail page, and gallery support in catalog
- Added `ItemImage` model with migration for image handling and metadata
- Implemented product gallery in `detail.html` with thumbnails for additional images
- Updated `Item` model to include `primary_image` property for gallery logic
- Enhanced `catalog/index.html` to support item thumbnails
- Updated `catalog.css` for responsive gallery and item list styling
- Extended catalog views to prefetch images for efficient queries
- Added comprehensive tests for catalog and detail views
- Configured Django to serve media files in development
- Updated admin with inline support for managing `ItemImage` entities
2026-04-26 21:55:32 +02:00

496 lines
8.8 KiB
CSS

/* ── FONTS ── */
@font-face {
font-family: 'BerlinType';
src: url('../fonts/BerlinTypeWeb-Regular.eot');
src: url('../fonts/BerlinTypeWeb-Regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/BerlinTypeWeb-Regular.woff2') format('woff2'),
url('../fonts/BerlinTypeWeb-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'BerlinType';
src: url('../fonts/BerlinTypeWeb-Bold.eot');
src: url('../fonts/BerlinTypeWeb-Bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/BerlinTypeWeb-Bold.woff2') format('woff2'),
url('../fonts/BerlinTypeWeb-Bold.woff') format('woff');
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noah';
src: url('../fonts/noah-regular.otf') format('opentype');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noah';
src: url('../fonts/noah-regularitalic.otf') format('opentype');
font-weight: 400;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: 'Noah';
src: url('../fonts/noah-bold.otf') format('opentype');
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noah';
src: url('../fonts/noah-bolditalic.otf') format('opentype');
font-weight: 700;
font-style: italic;
font-display: swap;
}
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--dark: #36213e;
--mid: #554971;
--blue-gray: #63768d;
--light-blue: #b8f3ff;
--white: #ffffff;
--bg: white;
}
body {
font-family: 'Noah', sans-serif;
color: var(--dark);
background: var(--bg);
overflow-x: hidden;
}
.site-toast-stack {
position: fixed;
top: 24px;
right: 24px;
z-index: 1200;
display: flex;
flex-direction: column;
gap: 12px;
width: min(420px, calc(100vw - 32px));
}
.site-toast {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
padding: 16px 18px;
border: 1px solid rgba(54, 33, 62, 0.14);
border-radius: 14px;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 18px 40px rgba(54, 33, 62, 0.18);
color: var(--dark);
backdrop-filter: blur(10px);
transform: translateY(0);
opacity: 1;
transition: opacity 0.22s ease, transform 0.22s ease;
}
.site-toast.is-hiding {
opacity: 0;
transform: translateY(-10px);
}
.site-toast--success {
border-color: rgba(79, 125, 79, 0.25);
}
.site-toast--error {
border-color: rgba(161, 75, 75, 0.25);
}
.site-toast--warning {
border-color: rgba(176, 133, 56, 0.25);
}
.site-toast__content {
font-size: 16px;
line-height: 1.45;
font-weight: 500;
}
.site-toast__close {
flex: 0 0 auto;
border: 0;
background: transparent;
color: var(--mid);
font-size: 26px;
line-height: 1;
cursor: pointer;
}
.site-toast__close:hover {
color: var(--dark);
}
h1, h2, h3, h4, h5, h6 {
font-family: 'BerlinType', serif;
}
@media (max-width: 640px) {
.site-toast-stack {
top: 12px;
right: 12px;
left: 12px;
width: auto;
}
}
/* Container to maintain consistent width */
.container {
max-width: 1160px;
margin: 0 auto;
width: 100%;
}
a {
text-decoration: none;
color: inherit;
}
/* --- LIB --- */
.flex-right {
display: flex;
justify-content: flex-end;
align-items: flex-end;
flex-direction: column;
width: 100%;
height: 100%;
}
.text-align-right {
text-align: right;
}
.active-page {
text-decoration: underline;
}
.full-page {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.center-wrapper {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* ── HEADER ── */
header {
position: sticky;
top: 0;
z-index: 100;
background: var(--bg);
border-bottom: 1px solid rgba(54, 33, 62, .08);
box-shadow: 0 2px 20px rgba(54, 33, 62, .06);
}
.header-top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
gap: 20px;
}
.logo {
font-family: 'BerlinType', serif;
font-size: 32px;
color: var(--dark);
white-space: nowrap;
letter-spacing: 1px;
a {
font-family: 'BerlinType', serif;
}
}
.search-wrap {
display: flex;
align-items: center;
justify-content: space-between;
border: 1px solid var(--dark);
flex: 1;
max-width: 420px;
margin: 0 24px;
}
.search-wrap select {
border: none;
border-right: 1px solid var(--dark);
padding: 10px 14px;
font-family: 'Inter', sans-serif;
font-size: 13px;
color: var(--mid);
background: transparent;
outline: none;
cursor: pointer;
}
.search-wrap input {
flex: 1;
border: none;
padding: 10px 5px 10px 10px;
font-size: 12px;
color: var(--mid);
outline: none;
background: transparent;
display: block;
}
.search-wrap input::placeholder {
color: var(--mid);
opacity: .6;
}
.search-wrap button {
border: none;
background: transparent;
padding: 10px 14px;
cursor: pointer;
display: flex;
align-items: center;
}
.search-wrap button svg {
width: 20px;
height: 20px;
}
.header-icons {
display: flex;
align-items: center;
gap: 18px;
}
.header-icons a {
display: flex;
align-items: center;
cursor: pointer;
color: var(--dark);
transition: opacity .2s;
}
.header-icons a:hover {
opacity: .6;
}
.header-icons svg {
width: 28px;
height: 28px;
}
.nav-bar {
display: flex;
align-items: center;
padding: 10px 0;
gap: 0;
border-top: 1px solid rgba(54, 33, 62, .07);
justify-content: space-between;
}
.nav-bar .catalog-btn {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--mid);
margin-right: 32px;
cursor: pointer;
font-weight: 400;
transition: color .2s;
}
.nav-bar .catalog-btn:hover {
color: var(--dark);
}
.nav-links {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 28px;
flex: 1;
}
.nav-links a {
font-size: 14px;
color: var(--mid);
transition: color .2s;
white-space: nowrap;
}
.nav-links a:hover {
color: var(--dark);
}
.nav-block {
width: 150px;
}
.phone-link {
display: flex;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--mid);
text-decoration: underline;
white-space: nowrap;
}
.breadcrumbs-container {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
margin-top: 16px;
}
.breadcrumbs-line > a {
font-weight: 400;
font-size: 16px;
text-align: left;
color: #554971;
}
/* ── FOOTER ── */
footer {
background: var(--blue-gray);
}
.footer-container {
padding: 50px 80px 40px;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 40px;
}
.footer-logo {
font-family: 'Playfair Display', serif;
font-size: 30px;
color: rgba(184, 243, 255, .85);
margin-bottom: 8px;
}
.footer-col h4 {
font-size: 16px;
font-weight: 600;
color: rgba(184, 243, 255, .85);
text-transform: uppercase;
letter-spacing: .5px;
margin-bottom: 16px;
}
.footer-col ul {
list-style: none;
display: flex;
flex-direction: column;
gap: 10px;
}
.footer-col ul li a, .footer-col ul li {
font-size: 16px;
color: rgba(184, 243, 255, .8);
transition: opacity .2s;
}
.footer-col ul li a:hover {
opacity: .65;
}
/* ── RESPONSIVE ── */
@media (max-width: 900px) {
header, .header-top, .nav-bar {
padding-left: 24px;
padding-right: 24px;
}
footer {
grid-template-columns: 1fr 1fr;
padding: 40px 24px;
}
}
@media (max-width: 700px) {
.header-top {
flex-wrap: wrap;
gap: 12px 16px;
}
.logo {
font-size: 30px;
}
.header-top form {
order: 3;
width: 100%;
}
.search-wrap {
width: 100%;
max-width: none;
margin: 0;
}
.search-wrap select {
flex: 0 0 132px;
max-width: none;
padding-left: 8px;
padding-right: 8px;
}
.header-icons {
margin-left: auto;
gap: 14px;
}
.header-icons svg {
width: 24px;
height: 24px;
}
.nav-bar {
justify-content: flex-start;
gap: 24px;
overflow-x: auto;
scrollbar-width: thin;
}
.nav-links {
flex: 0 0 auto;
gap: 22px;
}
.nav-block {
width: auto;
flex: 0 0 auto;
}
}