body {
    font-family: Arial, sans-serif;
    background: #f4f4f9;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
}
.filters {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filters a {
    text-decoration: none;
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.filters a.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}
.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}
.card img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 4px;
    margin-bottom: 12px;
}

.badge {
    font-size: 12px;
    color: #777;
}
.card h3 {
    margin: 5px 0 10px;
    font-size: 18px;
}
.material {
    font-size: 14px;
    color: #555;
    margin: 0 0 15px;
}
.price {
    font-size: 20px;
    font-weight: bold;
    margin-top: auto;
    margin-bottom: 12px;
}
.btn {
    display: block;
    text-align: center;
    background: #e67e22;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
}
.btn:hover {
    background: #d35400;
}
/* Стили для отображения двух фото (снаружи и внутри) в карточке */
.door-images-pair {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.door-img-box {
    flex: 1;
    text-align: center;
    background: #fafafa;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.door-img-box img {
    width: 100%;
    height: 220px;
    object-fit: contain; /* contain гарантирует, что дверь не обрежется по краям */
    margin-bottom: 4px;
}
.door-img-box span {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}
.main-door-img {
    width: 100%;
    height: 360px !important;
    object-fit: contain !important;
    background: #fafafa;
    border-radius: 4px;
    margin-bottom: 12px;
}
/* Лайтбокс для оригинального фото */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
/* Шапка сайта */
.site-header {
    background: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.header-left {
    display: flex;
    align-items: baseline;
    gap: 15px;
    flex-wrap: wrap;
}
.site-logo {
    font-size: 26px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}
.site-city {
    font-size: 16px;
    color: #555;
    background: #f0f2f5;
    padding: 4px 10px;
    border-radius: 4px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.header-phone-box {
    text-align: right;
}
.site-phone {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #e67e22;
    text-decoration: none;
}
.site-phone:hover {
    color: #d35400;
}
.phone-note {
    font-size: 12px;
    color: #777;
}
.admin-link-btn {
    background: #2c3e50;
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
}

/* Адаптация шапки для мобильных телефонов */
@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .header-right {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #eee;
        padding-top: 12px;
    }
    .header-phone-box {
        text-align: left;
    } 
}

/* Кликабельный адрес со схемой проезда */
.site-address-box {
    display: inline-flex;
    flex-direction: column;
    cursor: pointer;
    transition: opacity 0.2s;
}
.site-address-box:hover {
    opacity: 0.85;
}
.site-address-box:hover .site-city {
    background: #e2e6ea;
    color: #2c3e50;
}
.map-hint {
    font-size: 11px;
    color: #2980b9;
    text-decoration: underline;
    margin-top: 3px;
    padding-left: 4px;
}
