/* Импорт общих стилей хедера */
@import 'styles_header.css?v=1.16';

/* Общие стили для элементов страницы */
h3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

h4 {
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    opacity: 0.5;
    margin: 1rem 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #222;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Стили для главной секции */
.hero {
    position: relative;
    color: white;
    background: #333;
    height: wrap-content;
    display: flex;
    align-items: center;
    padding: 0rem 3rem;
    margin-bottom: 1rem;
}

.hero .btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #222;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.hero-text {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}


.hero-image {
    width: auto;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0.95;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* Секция преимуществ */
.advantages {
    display: none;
    /* flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    padding: 0 20px;
    text-align: center;
    margin: 0.5rem 0; */
}

.advantage-item {
    flex: 1 1 200px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.advantage-item img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.advantage-item p {
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Стили для каталога */
.catalog {
    justify-content: flex-start;
    padding: 1rem 2rem 1rem 2rem;
}

.products {
    display: flex;
    justify-content: left;
    gap: 1rem;
    flex-wrap: wrap;
}

.product {
    width: 300px;
    text-align: left;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .products {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
        justify-content: start; /* колонки прижимаются влево */
    }
    
    .product {
        max-width: 350px; /* ограничение сверху */
        width: 100%;
    }
}

.product-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px 5px 0px 0px;
    display: block;
}

/* Стили для фильтров */
.filter-container {
    background: #f8f8f8;
    padding: 0.5rem 1.5rem 0.5rem;
    border-radius: 5px;
    margin: 0rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.filter-group {
    margin-bottom: 0.5rem;
    flex: 1 1 auto;
    min-width: 200px;
}

.filter-group h4 {
    margin: 0 0 0.5rem 0;
    font-size: 15px;
    font-weight: 400;
    text-align: start;
    padding: 0.75rem 0rem 0.25rem 0.75rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    position: relative;
    display: inline-block;
}

.filter-tag input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-tag label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 300;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    -webkit-tap-highlight-color: transparent;
}

.filter-tag.active label {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.filter-tag label:hover {
    background-color: #e5e5e5;
}

.filter-tag.active label:hover {
    background-color: #444;
}

.filter-toggle {
    display: none;
}

/* Кнопка "Посмотреть все" */
.view-all-btn {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    outline: none;
}

.view-all-btn:hover,
.view-all-btn:focus {
    background-color: #555;
    color: #fff;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

button.btn,
button.view-all-btn {
    font-family: inherit;
    line-height: inherit;
    border: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: none;
}

button.btn:hover,
button.view-all-btn:hover {
    background-color: #555;
    color: #fff;
    text-decoration: none;
}

/* Стили скелетона загрузки */
.skeleton-loader {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Стили для контактов на главной */
.contacts {
    padding: 2rem 3rem;
    background: #f4f4f4;
}

h3.contacts {
    padding: 0rem 0rem 0rem 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 18px;
}

.contact-link {
    font-size: 32px;
    margin: 0 10px;
    color: #333;
    transition: transform 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.contact-link:hover {
    transform: scale(1.2);
}

.viber:hover {
    color: #7360F2;
}

.telegram:hover {
    color: #0088cc;
}

.instagram:hover {
    color: #e1306c;
}

.email:hover {
    color: #d44638;
}

.contact-link,
.contact-link:hover,
.contact-link:active,
.contact-link:visited {
    text-decoration: none;
}

.svg-icon {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transition: inherit;
    vertical-align: middle;
    display: inline-block;
}

/* Стили для карусели на мобильных */
.carousel-wrapper {
    width: 100%;
    aspect-ratio: 19 / 9;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: none;
    gap: 20px;
    padding: 0 calc(50% - 38%);
    /* чтобы 85% по центру = 50% - (85/2)% */
    box-sizing: border-box;
    scroll-behavior: smooth;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    margin: 0 auto;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 100%;
    aspect-ratio: 19 / 6;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.caption-container {
    display: none;
    text-align: center;
    margin-top: 16px;
    min-height: 1.5em;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

.carousel-item:hover,
.carousel-item img:hover {
    transform: none !important;
}

h1.top {
    font-size: 1.7em;
    text-align: start;
    padding: 0rem;
}

h2.top {  
    font-size: 16px;
    font-weight: 300;
    text-align: center;
    padding: 0rem;
}

h5.product-name {
    font-size: 1em;
    padding: 0rem 0.5rem;
    margin: 0.5rem 0rem 0.75rem 0rem;
}

h5.product-title {
    color: #222;
    font-size: 15px;
    font-weight: 500;
    padding: 0rem 0.6rem;
    margin: 0.5rem 0rem 0rem 0rem;
}

p.product-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: #444;
    padding: 0rem 0.6rem;
    margin: 0.1rem 0rem 0.25rem 0rem;
    text-transform: uppercase;
}

.home-price-byn {
    color: #000;
    margin: 0rem 0rem 0.5rem 0rem;
    padding: 0rem 0.6rem;
    font-size: 14px;
    font-weight: 300;
    line-height: normal;
}

.home-price-rub {
    color: #000;
    margin: -0.2rem 0rem 0.5rem 0rem;
    padding: 0rem 0.6rem;
    font-size: 1.02em;
    font-weight: 300;
}

h3.catalog {
    font-weight: 500;
    font-size: 18px;
}


/* Медиа запросы для мобильных устройств */
@media (max-width: 767px) {
    .advantages {
        display: none;
    }

    .hero {
        padding: 0rem 1rem;
        margin-bottom: 2rem;
        height: 130px;
    }

    h2.catalog {
        font-size: 0.85em;
        text-align: start;
        padding: 0rem;
    }

    h3.catalog {
        padding: 0rem;
    }

    .btn-top {
        display: none;
    }

    h1.top {
        font-size: 1.3em;
        text-align: start;
        padding: 0rem 0.25rem;
        margin: 1.25rem 0rem 1rem 0rem;
        font-weight: 500;
    }

    h2.top {
        text-align: start;
        padding: 0.5rem 0rem 0rem 0rem;
        margin: 1rem 0rem 1.5rem 0.25rem;
    }

    .product:hover {
        text-decoration: none;
    }

    .product * {
        text-decoration: none !important;
    }

    h5.product-name {
        font-size: 1.02em;
        padding: 0rem 0.5rem;
        margin: 0.5rem 0rem 0.5rem 0rem;
        font-weight: 700;
    }

    h5.product-title {
        font-size: 14px;
        font-weight: 500;
        padding: 0rem 0.6rem;
        margin: 0.5rem 0rem 0rem 0rem;
    }

    p.product-subtitle {
        font-size: 10px;
        font-weight: 300;
        padding: 0rem 0.6rem;
        margin: 0rem 0rem 0.25rem 0rem;
        text-transform: uppercase;
    }

    .carousel-wrapper {
        display: flex;
    }

    .caption-container {
        display: block;
    }

    .filter-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background: #333;
        margin: 0rem 0.5rem;
        border-radius: 4px;
        cursor: pointer;
        color: #ffffff; 
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 1.5px;
        transition: background-color 0.1s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .filter-toggle:active {
        background: #4a4a4a;
    }

    .filter-icon {
        width: 20px;
        height: 20px;
    }

    .filter-container.mobile-hidden {
        display: none;
    }

    .filter-container.active {
        display: flex;
    }

    .catalog {
        margin-top: 0rem;
        padding: 0.5rem 0rem 0rem 0rem;
        max-width: 100%;
        text-align: center;
    }

    .filter-container {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
        flex-direction: column;
        gap: 0;
        border-radius: 0px;
    }

    .filter-group {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .filter-group h4 {
        margin-bottom: 0.3rem;
    }

    .filter-options {
        gap: 0.4rem;
    }

    
    .products {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
        padding: 0.25rem 0.25rem;
        max-width: calc(100% - 0.5rem);
        background: rgba(0, 0, 0, 0.04);
        gap: 0.25rem;
    }

    .product {
        width: 100%;
        margin: 0 0 0rem;
        box-sizing: border-box;
        background: white;
        border-radius: 5px;
        flex: 1 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.125rem);
    }

    .view-all-btn {
        display: inline-block;
        text-align: center;
        margin: 1.5rem auto 0rem auto;
    }

    .contacts {
        padding: 1rem 1rem;
        background: #f4f4f4;
    }
}

.design-button {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'CormorantGaramond-Medium', serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.design-button:hover {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.design-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    margin-bottom: 10px;
}

.main-product-image {
    width: 100%;
    height: auto;
    display: block;
}

.product-image-thumbnails {
    display: flex;
    justify-content: left;
    gap: 8px;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    padding-bottom: 1.2rem;
    flex-wrap: wrap;
}

.thumbnail {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 0 0 1px white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0px;
    box-sizing: border-box;
    min-width: 32px;
    min-height: 32px;
}

.thumbnail.active {
    border: 3px solid white;
    box-shadow: 0 0 0 1px #555;
}

.thumbnail:hover {
    border: 3px solid white;
    box-shadow: 0 0 0 1px #555;
}

.thumbnail img {
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    object-fit: cover;
    border-radius: 50%;
    margin: -10px;
    position: absolute;
    top: 0;
    left: 0;
}

.thumbnail.more-count {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    padding-bottom: 2px;
    box-shadow: 0 0 0 2px #ccc;
}

.thumbnail.more-count span {
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

.contact-phone,
.contact-phone * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    background-color: transparent !important;
}

.contact-phone:active,
.contact-phone:focus {
    background: transparent !important;
    outline: none;
}