html, body {
    height: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    color: #f5f5f5;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.75)
        ),
        url("/assets/images/photo_2026-03-30_22-50-51.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}


main {
    padding: 10px;
    flex: 1;
}

header,
footer {
    background: #2b1d0e;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.footer {
    padding: 40px 20px 20px;
    margin-top: 40px;
    border-top: 2px solid #3a2a1a;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    text-align: left;
}

.footer-block h3,
.footer-block h4 {
    margin-bottom: 10px;
}

.footer-block p {
    margin: 5px 0;
    color: #ddd;
}

.footer-block a {
    display: block;
    margin: 5px 0;
    color: #f4f0e8;
    text-decoration: none;
    transition: 0.2s;
}

.footer-block a:hover {
    color: #fff;
    text-decoration: underline;
}

/* соцсети в футере */
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* нижняя часть */
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid #3a2a1a;
    padding-top: 15px;
    font-size: 14px;
    color: #bbb;
}

.footer-socials .social {
    display: flex;
    align-items: center;
    justify-content: center;
}

nav a {
    margin: 0 10px;
    color: #f4f0e8;
    text-decoration: none;
    font-weight: bold;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    border: 2px solid #2b1d0e;
    padding: 12px;
    background: #fff0e0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 300px;
    height: 400px; /* одинаковая высота всех карточек */
    border-radius: 10px;
}

.product-card img {
    width: 100%;
    height: 240px; /* фиксированная зона картинки */
    object-fit: cover; /* обрезает красиво */
    border-radius: 6px;
}

.product-card h3 {
    font-size: 16px;
    margin: 10px 0 6px;
    min-height: 38px; /* чтобы длинные названия не ломали карточку */
}

.price {
    font-weight: bold;
}

button {
    padding: 5px 10px;
    cursor: pointer;
    background: #2b1d0e;
    color: #fff;
    border: none;
}

button:hover {
    background: #4b2d0e;
}

.hero {
    text-align: center;
}

.logo {
    max-height: 100px;
}

.product-card {
    color: #1a0e00;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1a120b;
    padding: 25px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    color: #f5f5f5;
    text-align: center;
    border: 2px solid #3a2a1a;
}

.modal-content img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 15px;
}

.close {
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

.brand {
    text-align: center;
}

.brand h1 {
    margin: 5px 0 10px;
}

.header-bottom {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav {
    display: flex;
    gap: 25px;
}

.social {
    width: 36px;
    height: 36px;
    background: #3a2a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.social svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.social:hover {
    background: #5a3a1a;
    transform: translateY(-2px);
}

.gallery {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.gallery h2 {
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.lazy-img {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.lazy-img.loaded {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.info-section {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.info-card {
    max-width: 800px;
    width: 100%;
    background: #f3e2c7;
    color: #2b1d0e;
    padding: 35px;
    border-radius: 14px;
    border: 2px solid #3a2a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.info-card h2 {
    margin-top: 0;
}

.info-card h3 {
    margin-top: 25px;
}

.info-card ul {
    padding-left: 20px;
}

.category-block {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.category-title {
    margin: 20px 0;
    font-size: 28px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 300px));
    gap: 20px;
    justify-content: center;
}

button:disabled {
    background: #777;
    cursor: not-allowed;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-form input,
.order-form textarea {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #3a2a1a;
    font-size: 14px;
}

.order-form textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group {
    margin-top: 10px;
}

.form-group p {
    margin-bottom: 5px;
}

.form-group label {
    display: block;
    margin: 4px 0;
    cursor: pointer;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    cursor: pointer;
}

button[type="submit"] {
    margin-top: 10px;
}

.modal-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.modal-gallery img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.modal-gallery button {
    position: absolute;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    font-size: 26px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 6px;
}

#prev { left: 10px; }
#next { right: 10px; }