Загрузка данных
:root {
--dark: #17171b;
--red: #c73737;
--light: #f4f4f4;
--white: #ffffff;
--gray: #777777;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, sans-serif; color: var(--dark); background: var(--light); }
.container { width: min(1200px, 92%); margin: 0 auto; }
.header { background: var(--dark); color: var(--white); }
.header-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 12px 0; }
.logo { color: var(--white); text-decoration: none; font-size: 24px; font-weight: 700; }
.nav { display: flex; gap: 15px; }
.nav a { color: var(--white); text-decoration: none; padding: 8px; transition: .2s; }
.nav a:hover { color: #ff7777; }
.hero { padding: 55px 0; background: #25252b; color: var(--white); text-align: center; }
.hero h1 { margin-top: 0; font-size: 36px; }
.button, .card button, .subscribe button { border: 0; background: var(--red); color: var(--white); padding: 10px 16px; border-radius: 5px; cursor: pointer; text-decoration: none; transition: .2s; }
.button:hover, .card button:hover, .subscribe button:hover { background: #9e2929; }
.catalog { padding: 40px 0; display: grid; grid-template-columns: 1fr; gap: 25px; }
.filters { background: var(--white); padding: 20px; border: 1px solid #ddd; border-radius: 8px; }
.filters h2 { margin-top: 0; }
fieldset { border: 1px solid #ddd; margin-bottom: 15px; padding: 12px; }
fieldset label { display: block; margin: 8px 0; }
input { max-width: 100%; padding: 8px; border: 1px solid #bbb; border-radius: 4px; }
input:focus { outline: 2px solid #e66; }
.products-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }
.products-top h2 { margin-top: 0; }
.search { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.card { background: var(--white); border: 1px solid #ddd; border-radius: 8px; overflow: hidden; transition: .2s; cursor: pointer; display: block; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.card-content { padding: 15px; }
.card-content h3 { margin-top: 0; }
.card-content p { color: var(--gray); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.about { padding: 20px 0 50px; }
.advantages { display: grid; grid-template-columns: 1fr; gap: 15px; }
.advantages div { background: var(--white); padding: 20px; border: 1px solid #ddd; border-radius: 8px; }
.footer { background: var(--dark); color: var(--white); padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 25px; flex-wrap: wrap; }
.footer h2 { margin-top: 0; }
.subscribe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* ---- Модальное окно на чистом CSS ---- */
/* Скрываем сами чекбоксы */
.card-toggle { display: none; }
/* По умолчанию модалка скрыта */
.modal { display: none; }
/* Открываем модалку, когда соответствующий чекбокс включён.
Чекбокс и модалка — соседние элементы внутри .product-grid. */
.card-toggle:checked ~ .modal {
display: flex;
position: fixed;
inset: 0;
z-index: 1000;
align-items: center;
justify-content: center;
padding: 20px;
}
.modal-overlay {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, .6);
backdrop-filter: blur(2px);
cursor: pointer;
}
.modal-window {
position: relative;
background: var(--white);
border-radius: 10px;
max-width: 560px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
animation: modal-in .25s ease;
}
@keyframes modal-in {
from { opacity: 0; transform: translateY(20px) scale(.97); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
position: absolute;
top: 8px;
right: 12px;
background: transparent;
border: 0;
font-size: 30px;
line-height: 1;
color: var(--white);
text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
cursor: pointer;
z-index: 1;
}
.modal-close:hover { color: #ff7777; }
.modal-img {
width: 100%;
height: 240px;
object-fit: cover;
display: block;
}
.modal-body { padding: 20px; }
.modal-body h2 { margin-top: 0; }
.modal-hero {
color: var(--red);
font-weight: 700;
margin: 0 0 10px;
}
.modal-desc {
color: var(--gray);
line-height: 1.5;
}
.modal-bottom {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
margin-top: 20px;
}
.modal-bottom strong { font-size: 20px; }
@media (min-width: 600px) {
.product-grid { grid-template-columns: repeat(2, 1fr); }
.advantages { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
.catalog { grid-template-columns: 210px 1fr; }
.product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1250px) {
.product-grid { grid-template-columns: repeat(4, 1fr); }
}