@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    --accent-color: #079b59;
    --accent-color-rgba: rgba(7, 155, 89, 0.3);
    --bg-color: #f8f9fa;
    --text-color: #333;
    --hover-bg: #ecf0f1;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --switch-bg: #ccc;
    --switch-thumb: #fff;
    --border-radius: 20px;
    --divider-color: #e0e0e0;
    --text-muted: #6c757d;
    --success-color: #28a745;
    --error-color: #dc3545;
}

.dark {
    --bg-color: #2a2a2a;
    --text-color: #f1f1f1;
    --hover-bg: #2c2c2c;
    --card-bg: #373737;
    --header-bg: #1e1e1e;
    --switch-bg: #666;
    --switch-thumb: #ddd;
    --divider-color: #444;
    --text-muted: #9a9a9a;
    --success-color: #4caf50;
    --error-color: #d53a3a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    padding-top: 56px;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
    transition: all 0.5s ease;
}

main {
    flex: 1 0 auto;
    /*margin-top: 60px;*/
    padding-top: 20px;
    /*margin-bottom: 100px;*/
}

.main-wrapper {
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    flex-shrink: 0;
    width: 100%;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding: 40px 20px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.footer-columns {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--accent-color);
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.company-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--divider-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-columns {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column h3 {
        text-align: center;
    }

    .company-info {
        padding: 20px;
    }
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

/* Базовый стиль ссылок */
a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease, background-color 0.3s ease;
}


a:hover {
    background-color: var(--hover-bg);
    border-radius: 4px;
    color: var(--text-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: #068a50;
    /* Темнее акцента */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

.page_title {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    width: 100%;
}

.divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 0 auto;
    width: 80%;
}


/* Стили для мобильных устройств */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }
}

.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    /* или высота, которую используешь */
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    margin: 0 5px;
    background: var(--header-bg);
    color: var(--text-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
}

.header-menu {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-phone {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

@media (max-width: 992px) {

    .header-phone {
        display: none;
    }
}

.burger {
    width: 28px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1002;
}

.burger span {
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s;
}

.site-logo {
    display: block;
}

@media (max-width: 992px) {
    .site-logo {
        display: none;
    }
}

.img-site-logo {
    width: 50px;
}

.right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.branch-select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    appearance: none;
}

.cart-icon {
    position: relative;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-wrapper {
    margin-left: 10px;
}

.cart-wrapper a {
    display: flex;
    align-items: center;
    background: none;
    padding: 5px 8px;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.cart-wrapper a:hover {
    background-color: rgba(7, 155, 89, 0.1);
}

.cart-icon svg {
    width: 100%;
    height: 100%;
    fill: #333;
}

.cart-icon i {
    font-size: 24px;
    color: var(--accent-color);
    transition: transform 0.2s ease;
}

.cart-icon:hover i {
    transform: scale(1.1);
}

.cart-count {
    position: relative;
    margin-left: 8px;
    background: var(--accent-color);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.cart-wrapper:hover .cart-count {
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Адаптивные стили для корзины на мобильных устройствах */
@media (max-width: 768px) {
    .cart-icon {
        width: 28px;
        height: 28px;
    }
    
    .cart-icon i {
        font-size: 22px;
    }
    
    .cart-count {
        font-size: 12px;
        padding: 3px 8px;
        min-width: 24px;
    }
}

.sidebar {
    position: fixed;
    top: 60px;
    left: -260px;
    width: 240px;
    /*height: 100%;*/
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    padding: 2rem 1rem 1rem 1rem;
    transition: left 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.sidebar.open {
    left: 0;
}

.sidebar a {
    text-decoration: none;
    color: var(--text-color);
    /* Цвет текста из темы */
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: block;
}

.sidebar a:hover {
    background-color: var(--hover-bg);
    /* Цвет при ховере из темы */
}

.submenu {
    display: none;
    flex-direction: column;
    margin-left: 1rem;
    gap: 0.5rem;
}

.submenu.open {
    display: flex;
}

.has-submenu>button {
    background: none;
    border: none;
    font-size: 16px;
    padding: 6px 10px;
    text-align: left;
    width: 100%;
    color: var(--text-color);
    /* Цвет текста кнопки из темы */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.has-submenu>button:hover {
    background-color: var(--hover-bg);
    /* Цвет при ховере из темы */
}


/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 999;
}

.overlay.show {
    display: block;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    /* Расширим немного для иконок */
    height: 30px;
    margin-left: 1rem;
    vertical-align: middle;
    z-index: 9999;
    cursor: pointer;
    min-width: 60px;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-switch .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--switch-bg);
    transition: 0.3s;
    border-radius: 34px;
    z-index: 1;
}

.theme-toggle-switch .toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 3px;
    background-color: var(--switch-thumb);
    transition: 0.3s;
    border-radius: 50%;
    z-index: 1;
}

/* Позиционирование иконок */
.theme-toggle-switch .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    line-height: 1;
    z-index: 2;
    pointer-events: none;
}

.theme-toggle-switch .sun {
    left: 4px;
    color: #FFD700;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.theme-toggle-switch .moon {
    right: 4px;
    color: #ccc;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* При переключении темы меняем видимость иконок */
.theme-toggle-switch input:checked+.toggle-slider~.sun {
    opacity: 0;
}

.theme-toggle-switch input:checked+.toggle-slider~.moon {
    opacity: 1;
}

.theme-toggle-switch input:not(:checked)+.toggle-slider~.sun {
    opacity: 1;
}

.theme-toggle-switch input:not(:checked)+.toggle-slider~.moon {
    opacity: 0;
}

.theme-toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(28px);
}



/*ОБЩИЕ РАДИО И СЕЛЕКТЫ */

.option-selector {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    align-items: center;
}

.custom-radio-list,
.custom-checkbox-list {
    list-style: none;
    padding: 0;
}

.custom-radio,
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.radio-button,
.checkbox-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--hover-bg);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.custom-radio input[type="radio"]:checked+.radio-button,
.custom-checkbox input[type="checkbox"]:checked+.checkbox-icon {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
}

.custom-radio input[type="radio"]:checked+.radio-button::after,
.custom-checkbox input[type="checkbox"]:checked+.checkbox-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: white;
}

input[type="number"] {
    width: 100px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--hover-bg);
    border-radius: 5px;
    color: var(--text-color);
    background-color: var(--card-bg);
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    border-color: var(--accent-color);
}


.custom-select {
    width: 50%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--text-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    appearance: none;
    /* Убираем стандартную стрелку */
    position: relative;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-rgba);
}

.breadcrumbs {
    padding: 15px 0;
    margin: 0 auto;
    max-width: 1200px;
}

.breadcrumb-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 5px;
    color: var(--text-muted);
}
