/* Аксессуары к товару на карточке — проба под флагом acc_test (22.09.2026).
   Подключается сниппетом accTest только с кукой; обычные посетители файл не
   получают. Цвета и радиусы — как у остальных блоков карточки: белый блок,
   рамка #E9ECEE, скругление 18px, красный #FF0000, тёмный #3B3D40.
   Шрифт у кнопок наследуется (font: inherit): у темы .std-btn стоит шрифт
   Martian, которого на сайте нет.
   Правки Михаила 22.09.2026: строка в правом блоке — ссылка на карточку
   аксессуара (галочка отдельно), нижний блок — одна строка с горизонтальной
   прокруткой и стрелками, над характеристиками. */

/* ---------- 1. «Добавьте к заказу» — правая колонка под ценой ---------- */
.acc-right {
    background: #fff;
    border: 1px solid #E9ECEE;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    line-height: 1.3;
}
.acc-right__title { font-weight: 700; font-size: 16px; }
.acc-right__list { display: flex; flex-direction: column; }
.acc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #F0F1F3;
}
.acc-row:last-child { border-bottom: 0; }
.acc-row__box {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 4px;
    cursor: pointer;
    flex: 0 0 auto;
}
.acc-row__check {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #FF0000;
    cursor: pointer;
}
.acc-row__link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    color: #3B3D40;
    text-decoration: none;
}
.acc-row__link:hover .acc-row__name { text-decoration: underline; }
.acc-row__img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acc-row__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.acc-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-row__name {
    font-size: 13px;
    color: #3B3D40;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.acc-row__price { font-weight: 700; font-size: 14px; color: #3B3D40; }
.acc-right__sum {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding-top: 4px;
}
.acc-right__sum-label { color: #3B3D40; font-size: 14px; }
.acc-right__sum-value { font-weight: 700; font-size: 18px; white-space: nowrap; }
.acc-right__btn {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #FF0000;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}
.acc-right__btn:hover { opacity: .9; }
.acc-right__btn[disabled], .acc-right__btn.is-busy { opacity: .6; cursor: default; }

/* ---------- 2. «Аксессуары для …» — строка над характеристиками ---------- */
.acc-bottom { margin: 20px 0 10px; }
.acc-block {
    background: #fff;
    border: 1px solid #E9ECEE;
    border-radius: 18px;
    padding: 20px;
}
.acc-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.acc-block__title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.2; }
.acc-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-tab {
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #3B3D40;
    background: #fff;
    border: 1px solid #E9ECEE;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    line-height: 1.3;
}
.acc-tab:hover { border-color: #C9CDD2; }
.acc-tab.is-active { border-color: #FF0000; }

/* строка с прокруткой: плитки фиксированной ширины, полоса прокрутки скрыта,
   стрелки по краям показывает скрипт, когда есть куда листать */
.acc-scroll { position: relative; }
.acc-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px;
    margin: -2px;
}
.acc-grid::-webkit-scrollbar { display: none; }
.acc-card {
    flex: 0 0 212px;
    width: 212px;
    scroll-snap-align: start;
    border: 1px solid #E9ECEE;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.acc-card.is-hidden { display: none; }
.acc-card__img { height: 130px; display: flex; align-items: center; justify-content: center; }
.acc-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.acc-card__name {
    font-size: 14px;
    line-height: 1.3;
    color: #3B3D40;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.acc-card__name:hover { text-decoration: underline; color: #3B3D40; }
.acc-card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.acc-card__cur { font-size: 16px; font-weight: 700; }
.acc-card__old { font-size: 12px; color: #9D9E9F; text-decoration: line-through; }
.acc-card__btn {
    margin-top: auto;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #FF0000;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.acc-card__btn::after {
    content: '';
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' fill='none'%3E%3Cpath d='M18.53 21H3.19a1 1 0 0 1-.95-.85L1.49 8.86A.95.95 0 0 1 2.44 7.9h17a.95.95 0 0 1 .95.96l-.9 11.3a1 1 0 0 1-.96.84z' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.18 11V5.76a4.76 4.76 0 0 1 9.52 0V11' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.acc-card__btn:hover { opacity: .9; }
.acc-card__btn.is-added { background: #3B3D40; cursor: default; opacity: 1; }
.acc-card__btn.is-added::after { display: none; }
.acc-card__btn.is-busy { opacity: .6; pointer-events: none; }

.acc-scroll__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border: 1px solid #E9ECEE;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.acc-scroll__arrow::before {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid #3B3D40;
    border-bottom: 2px solid #3B3D40;
    transform: rotate(-45deg);
    margin-left: -4px;
}
.acc-scroll__arrow--prev { left: -14px; }
.acc-scroll__arrow--prev::before { transform: rotate(135deg); margin-left: 4px; }
.acc-scroll__arrow--next { right: -14px; }
.acc-scroll__arrow.is-on { display: flex; }
.acc-scroll__arrow:hover { border-color: #FF0000; }

@media (max-width: 767.98px) {
    .acc-scroll__arrow { display: none !important; }
}
@media (max-width: 575.98px) {
    .acc-block { padding: 14px; border-radius: 14px; }
    .acc-block__title { font-size: 18px; }
    .acc-grid { gap: 8px; }
    .acc-card { flex-basis: 160px; width: 160px; padding: 10px; }
    .acc-card__img { height: 100px; }
    .acc-card__btn { height: 36px; font-size: 13px; }
}

/* ---------- 3. Окно «Товар добавлен в корзину» с аксессуарами ---------- */
.acc-modal .modal-dialog { max-width: 720px; }
.acc-modal .modal-content { padding: 28px 28px 24px; border-radius: 16px; }
.acc-modal__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-right: 34px;
}
.acc-modal__ok {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #00B912;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acc-modal__title { font-size: 20px; font-weight: 700; line-height: 1.2; }
.acc-modal__product {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #E9ECEE;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
}
.acc-modal__product img { width: 48px; height: 48px; flex: 0 0 48px; object-fit: contain; }
.acc-modal__pname { flex: 1; font-size: 14px; line-height: 1.3; color: #3B3D40; min-width: 0; }
.acc-modal__pprice { font-weight: 700; font-size: 18px; white-space: nowrap; }
.acc-modal__sub { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.acc-modal__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.acc-mcard {
    border: 1px solid #E9ECEE;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.acc-mcard__img { height: 100px; display: flex; align-items: center; justify-content: center; }
.acc-mcard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.acc-mcard__name {
    font-size: 13px;
    line-height: 1.3;
    color: #3B3D40;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.acc-mcard__name:hover { text-decoration: underline; color: #3B3D40; }
.acc-mcard__price { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.acc-mcard__cur { font-weight: 700; font-size: 14px; }
.acc-mcard__old { font-size: 11px; color: #9D9E9F; text-decoration: line-through; }
.acc-mcard__btn {
    margin-top: auto;
    height: 34px;
    border: 1px solid #FF0000;
    border-radius: 8px;
    background: #fff;
    color: #FF0000;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.acc-mcard__btn:hover { background: #FFF3F3; }
.acc-mcard__btn.is-added { background: #3B3D40; border-color: #3B3D40; color: #fff; cursor: default; }
.acc-mcard__btn.is-busy { opacity: .6; pointer-events: none; }
.acc-modal__buttons { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.acc-modal__continue {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #E9ECEE;
    border-radius: 8px;
    background: #fff;
    color: #3B3D40;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.acc-modal__continue:hover { border-color: #C9CDD2; }
.acc-modal__tocart {
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: #FF0000;
    color: #fff !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}
.acc-modal__tocart:hover { opacity: .9; }
@media (max-width: 575.98px) {
    .acc-modal .modal-content { padding: 44px 14px 16px; border-radius: 12px; }
    .acc-modal__title { font-size: 17px; }
    .acc-modal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .acc-modal__buttons > * { flex: 1; justify-content: center; }
}
