/* Общие фиксы */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Основные стили */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff9f0;
    color: #5a4a42;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Шапка */
.main-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(139, 69, 19, 0.1);
    position: relative;
    z-index: 100;
    width: 100%; /* всегда на всю ширину */
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.main-header h1 {
    color: #8b4513;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

.main-nav a {
    color: #5a4a42;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #8b4513;
}

/* Основной контент */
.container {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-title {
    text-align: center;
    color: #8b4513;
    font-size: 2rem;
    margin-bottom: 30px;
}

/* Секции с каруселями */
.theme-section {
    background: white;
    padding: 30px 10px;
    margin: 0 auto 40px;       /* убраны отрицательные margin */
    max-width: 1400px;         /* ограничиваем как контейнер */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.theme-title {
    color: #8b4513;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.theme-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: #e0a85c;
    margin: 15px auto;
}

/* Карусель */
.owl-carousel {
    max-width: 1400px;
    margin: 0 auto;
}

.owl-carousel .item {
    padding: 5px;
    text-align: center;
}

.owl-carousel img {
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #f0e0c0;
}

.owl-item.center .item img {
    border-color: #f0e0c0;
}

/* Навигация карусели */
.owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.owl-prev, .owl-next {
    pointer-events: auto;
    background: #e0a85c !important;
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    font-size: 28px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.owl-prev:hover, .owl-next:hover {
    background: #8b4513 !important;
}

.owl-prev {
    left: -70px !important;
}

.owl-next {
    right: -70px !important;
}

/* Точки навигации */
.owl-dots {
    text-align: center;
    margin-top: 20px;
}

.owl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f0e0c0 !important;
    margin: 0 7px;
    transition: all 0.3s ease;
}

.owl-dot.active {
    background: #8b4513 !important;
    transform: scale(1.3);
}

/* Описание темы */
.theme-description {
    font-size: 1.1rem;
    color: #5a4a42;
    text-align: center;
    margin: 25px auto 0;
    max-width: 800px;
    line-height: 1.7;
    padding: 0 15px;
}

/* Подвал */
.main-footer {
    background-color: #8b4513;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
    width: 100%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    box-sizing: border-box;
}

.footer-contacts,
.footer-social,
.footer-info {
    flex: 1;
    min-width: 200px;
}

.main-footer h3 {
    color: white;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.main-footer a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}

.main-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-info {
    text-align: right;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .owl-prev {
        left: -30px !important;
    }
    
    .owl-next {
        right: -30px !important;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        max-width: 100%; /* чтобы не было уже экрана */
    }
    
    .main-nav {
        justify-content: center;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    .owl-nav {
        display: none;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .footer-info {
        text-align: left;
    }
    
    .theme-section {
        margin: 0 0 30px;
        padding: 20px 10px;
        max-width: 100%; /* тоже ограничим */
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .owl-carousel img {
        min-height: 250px;
    }
}

/* Широкоформатные экраны */
@media (min-width: 1600px) {
    .container, 
    .header-container,
    .footer-container,
    .theme-section,
    .owl-carousel {
        max-width: 1600px;
    }
    
    .theme-section {
        margin: 0 auto 50px;
    }
}






/* Медиа-запрос для мобильных устройств - ДОБАВИТЬ В КОНЕЦ ФАЙЛА */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 10px 15px;
        gap: 10px;
    }
    
    .main-header h1 {
        font-size: 16px;
        text-align: center;
        margin-bottom: 5px;
        line-height: 1.3;
        padding: 0 10px;
    }
    
    .main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    .main-nav a {
        font-size: 13px;
        padding: 6px 10px;
        white-space: nowrap;
        background-color: #f8f3eb;
        border-radius: 4px;
        border: 1px solid #e0d5c5;
    }
}

/* Еще более маленькие экраны */
@media (max-width: 480px) {
    .main-header h1 {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .main-nav {
        gap: 5px;
    }
    
    .main-nav a {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav a {
        width: 90%;
        text-align: center;
        padding: 8px;
    }
}

/* Контролы корзины: располагать под изображением, выравнивание вправо */
.cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 0;
    justify-content: flex-end; /* выравнивание вправо */
    width: 100%;
    box-sizing: border-box;
}

.quantity-input {
    width: 50px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 28px;
}

.buy-btn, .minus {
    background-color: #8b4513;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.buy-btn, .plus {
    background-color: #8b4513;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.buy-btn:hover, .minus:hover, .plus:hover {
    background-color: #5a3010;
}