/* DSA Market - Адаптивные стили */

/* Большие десктопы (от 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1470px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Десктопы (от 992px до 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

/* Планшеты (от 768px до 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Адаптивность для сетки */
    .col-md-1 {
        width: 8.33%;
    }

    .col-md-2 {
        width: 16.66%;
    }

    .col-md-3 {
        width: 25%;
    }

    .col-md-4 {
        width: 33.33%;
    }

    .col-md-5 {
        width: 41.66%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-7 {
        width: 58.33%;
    }

    .col-md-8 {
        width: 66.66%;
    }

    .col-md-9 {
        width: 75%;
    }

    .col-md-10 {
        width: 83.33%;
    }

    .col-md-11 {
        width: 91.66%;
    }

    .col-md-12 {
        width: 100%;
    }

    /* Отступы на планшетах */
    .mb-md-10 {
        margin-bottom: 10px;
    }

    .mb-md-20 {
        margin-bottom: 20px;
    }

    .mb-md-30 {
        margin-bottom: 30px;
    }

    /* Выравнивание на планшетах */
    .text-md-center {
        text-align: center;
    }

    .text-md-left {
        text-align: left;
    }

    .text-md-right {
        text-align: right;
    }

    /* Скрытие элементов на планшетах */
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}

/* Смартфоны (от 576px до 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }

    /* Адаптивность для сетки */
    .col-sm-1 {
        width: 8.33%;
    }

    .col-sm-2 {
        width: 16.66%;
    }

    .col-sm-3 {
        width: 25%;
    }

    .col-sm-4 {
        width: 33.33%;
    }

    .col-sm-5 {
        width: 41.66%;
    }

    .col-sm-6 {
        width: 50%;
    }

    .col-sm-7 {
        width: 58.33%;
    }

    .col-sm-8 {
        width: 66.66%;
    }

    .col-sm-9 {
        width: 75%;
    }

    .col-sm-10 {
        width: 83.33%;
    }

    .col-sm-11 {
        width: 91.66%;
    }

    .col-sm-12 {
        width: 100%;
    }

    /* Отступы на смартфонах */
    .mb-sm-10 {
        margin-bottom: 10px;
    }

    .mb-sm-20 {
        margin-bottom: 20px;
    }

    .mb-sm-30 {
        margin-bottom: 30px;
    }

    /* Выравнивание на смартфонах */
    .text-sm-center {
        text-align: center;
    }

    .text-sm-left {
        text-align: left;
    }

    .text-sm-right {
        text-align: right;
    }

    /* Скрытие элементов на смартфонах */
    .d-sm-none {
        display: none !important;
    }

    .d-sm-block {
        display: block !important;
    }

    .d-sm-flex {
        display: flex !important;
    }
}

/* Маленькие смартфоны (до 575px) */
@media (max-width: 575px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    /* Адаптивность для сетки */
    .col-xs-1 {
        width: 8.33%;
    }

    .col-xs-2 {
        width: 16.66%;
    }

    .col-xs-3 {
        width: 25%;
    }

    .col-xs-4 {
        width: 33.33%;
    }

    .col-xs-5 {
        width: 41.66%;
    }

    .col-xs-6 {
        width: 50%;
    }

    .col-xs-7 {
        width: 58.33%;
    }

    .col-xs-8 {
        width: 66.66%;
    }

    .col-xs-9 {
        width: 75%;
    }

    .col-xs-10 {
        width: 83.33%;
    }

    .col-xs-11 {
        width: 91.66%;
    }

    .col-xs-12 {
        width: 100%;
    }

    /* Отступы на маленьких смартфонах */
    .mb-xs-10 {
        margin-bottom: 10px;
    }

    .mb-xs-20 {
        margin-bottom: 20px;
    }

    .mb-xs-30 {
        margin-bottom: 30px;
    }

    /* Выравнивание на маленьких смартфонах */
    .text-xs-center {
        text-align: center;
    }

    .text-xs-left {
        text-align: left;
    }

    .text-xs-right {
        text-align: right;
    }

    /* Скрытие элементов на маленьких смартфонах */
    .d-xs-none {
        display: none !important;
    }

    .d-xs-block {
        display: block !important;
    }

    .d-xs-flex {
        display: flex !important;
    }

    /* Глобальные стили для мобильных */
    body {
        font-size: 14px;
    }

    h1,
    .h1 {
        font-size: 24px;
    }

    h2,
    .h2 {
        font-size: 20px;
    }

    h3,
    .h3 {
        font-size: 18px;
    }

    .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* Общие стили для всех мобильных устройств (до 991px) */
@media (max-width: 991px) {

    input,
    select,
    textarea {
        font-size: 16px;
        /* Предотвращает масштабирование на iOS при фокусе */
    }

    /* Увеличенные отступы для лучшего tap-таргетинга */
    .nav__list a {
        padding: 15px 20px;
    }
}

/* Стили для печати */
@media print {

    header,
    footer,
    .breadcrumbs,
    .sidebar,
    .related-products,
    .product__actions,
    .reviews-block,
    .tab-item:not(.tab-item_state_active),
    .contact-form,
    .advantages-list {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        width: 100%;
    }

    .product__top {
        display: flex;
    }

    .product__gallery {
        width: 40%;
    }

    .product__info {
        width: 60%;
    }

    .product__title {
        font-size: 18pt;
    }

    .specifications__table th,
    .specifications__table td {
        padding: 8pt;
        border: 1pt solid #ddd;
    }

    .page-break {
        page-break-before: always;
    }
}