Files
santeh-ray/static/css/style.css
Azimkin 52cbc1c2b3
All checks were successful
Build and Push Docker Image / build (push) Successful in 42s
feat: implement shopping cart feature with user authentication support
- Added `Cart` and `CartItem` models with migrations for managing user-specific carts and items
- Developed services for cart-related operations: adding, removing, and updating cart items
- Built specialized templates (`cart.html`) and styled them with new CSS assets (`cart.css`)
- Enabled real-time UI updates via AJAX in shopping cart interactions (`cart.js`)
- Modified header to dynamically display cart link with user authentication awareness
- Added Leaflet-based interactive map to the contacts page and integrated CSS/JS dependencies
- Expanded tests for cart functionality, item detail page cart integration, and contacts page maps
2026-05-15 23:18:16 +02:00

623 lines
11 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-select-wrap {
position: relative;
flex: 0 0 154px;
width: 154px;
border-right: 1px solid var(--dark);
min-width: 0;
box-sizing: border-box;
}
.search-category-dropdown {
position: relative;
width: 100%;
min-width: 0;
box-sizing: border-box;
}
.search-category-trigger {
width: 100%;
min-width: 0;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
padding: 10px 34px 10px 14px;
border: 0;
background: transparent;
color: var(--mid);
font-family: 'Inter', sans-serif;
font-size: 13px;
line-height: 1.2;
text-align: left;
cursor: pointer;
box-sizing: border-box;
}
.search-category-trigger:focus-visible {
outline: none;
}
.search-category-label {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.search-select-arrow {
position: absolute;
top: 50%;
right: 12px;
transform: translateY(-50%);
color: var(--mid);
pointer-events: none;
transition: transform .2s ease;
}
.search-category-dropdown.is-open .search-select-arrow {
transform: translateY(-50%) rotate(180deg);
}
.search-category-menu {
display: none;
position: absolute;
top: calc(100% + 8px);
left: 0;
z-index: 30;
width: max(100%, 290px);
max-height: 340px;
overflow: auto;
padding: 8px 0 10px;
border: 1px solid rgba(54, 33, 62, .16);
background: #ffffff;
box-shadow: 0 16px 36px rgba(54, 33, 62, .14);
}
.search-category-dropdown.is-open .search-category-menu {
display: block;
}
.search-category-option {
display: block;
width: 100%;
border: 0;
background: transparent;
padding: 0;
cursor: pointer;
text-align: left;
font-family: 'Inter', sans-serif;
transition: background-color .15s ease, color .15s ease;
}
.search-category-option:hover,
.search-category-option:focus-visible {
background: rgba(99, 118, 141, 0.08);
outline: none;
}
.search-category-option--all {
padding: 10px 14px 11px;
font-size: 13px;
line-height: 1.25;
font-weight: 600;
color: var(--mid);
}
.search-category-group {
padding-top: 6px;
}
.search-category-sublist {
display: flex;
flex-direction: column;
}
.search-category-option--category {
padding: 9px 14px 9px 22px;
font-size: 13px;
line-height: 1.25;
font-weight: 600;
color: var(--dark);
}
.search-category-option--subcategory {
padding: 7px 14px 7px 34px;
font-size: 12px;
line-height: 1.25;
color: var(--mid);
}
.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: 'BerlinType', 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-container {
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-select-wrap {
flex: 0 0 132px;
max-width: none;
width: 132px;
}
.search-category-trigger {
padding-left: 8px;
padding-right: 28px;
}
.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;
}
.footer-container {
grid-template-columns: 1fr;
gap: 28px;
}
}