/* ===== ШИЛЬДИКИ ТОВАРОВ (карточка + детальная) ===== */
.product-card__badges {
    position: absolute;
    top: -10px;
    right: 10px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}
.product-card__badges--detail {
    top: -4px;
    right: 16px;
    left: auto;
    gap: 8px;
}
.product-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.product-badge--action    { background: #e53935; } /* красный */
.product-badge--hit       { background: #ff9800; } /* оранжевый */
.product-badge--new       { background: #43a047; } /* зелёный */
.product-badge--recommend { background: #1e88e5; } /* синий */

/* product-card__media должен быть position:relative — добавим */
.product-card__media { position: relative; }

/* ===== ЦЕНЫ В КАРТОЧКЕ (две цены) ===== */
.product-card__prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.product-card__price-old {
    color: #888;
    text-decoration: line-through;
    font-size: 14px;
}
.product-card__price--sale { color: #e53935; }
.product-card__price--na { color: #999; font-size: 14px; }

/* ===== СТРАНИЦА /actions/ ===== */
.actions-page {
    padding: 32px 0;
}
.actions-page__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}
.actions-page__products-title {
    margin: 48px 0 24px;
    font-size: 28px;
    font-weight: 600;
}
.actions-page__empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}
.actions-page__pager {
    margin-top: 32px;
    text-align: center;
}

/* ===== КАРУСЕЛЬ БАННЕРОВ АКЦИЙ ===== */
.actions-slider {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}
.actions-slider__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.actions-slider__track::-webkit-scrollbar { display: none; }
.actions-slider__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    min-height: 240px;
}
.actions-slider__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}
.actions-slider__header {
    padding: 16px 4px 14px;
    color: #1a1a1a;
}
.actions-slider__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
    color: #1a1a1a;
}
.actions-slider__text {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
    color: #555;
    max-width: 800px;
}
.actions-slider__media {
    position: relative;
}
.actions-slider__btn {
    display: inline-block;
    position: absolute;
    left: 24px;
    bottom: 24px;
}

/* Стрелки навигации */
.actions-slider__nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 12px;
}
.actions-slider__btn-prev,
.actions-slider__btn-next {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.15s;
}
.actions-slider__btn-prev:hover,
.actions-slider__btn-next:hover {
    background: #fff;
}

/* Точки навигации */
.actions-slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.actions-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}
.actions-slider__dot.is-active { background: #e53935; }
.actions-slider__dot:hover { background: #999; }

/* Адаптив */
@media (max-width: 1024px) {
    .actions-slider__title { font-size: 22px; }
    .actions-slider__text { font-size: 14px; }
}
@media (max-width: 768px) {
    .actions-slider__content {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    .actions-slider__title { font-size: 18px; }
    .actions-slider__text { font-size: 13px; margin-bottom: 12px; }
    .actions-slider__btn-prev,
    .actions-slider__btn-next { width: 36px; height: 36px; font-size: 18px; }
    .actions-page__products-title { font-size: 22px; margin: 32px 0 16px; }
}

/* ===== /actions/ — сетка как в каталоге, без переопределений карточки ===== */
.actions-page .catalog-page__products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: start;
}
@media (max-width: 1024px) {
    .actions-page .catalog-page__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .actions-page .catalog-page__products { grid-template-columns: 1fr; }
}

/* ===== Шильдики на детальной странице товара — узкий бейдж справа сверху ===== */
.product-gallery__badge--action,
.product-gallery__badge--hit,
.product-gallery__badge--new,
.product-gallery__badge--recommend {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    width: auto !important;
    max-width: max-content !important;
    z-index: 3;
    padding: 6px 14px !important;
    border-radius: 14px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
}
.product-gallery__badge--action    { background: #e53935; }
.product-gallery__badge--hit       { background: #ff9800; top: 56px; }
.product-gallery__badge--new       { background: #43a047; top: 96px; }
.product-gallery__badge--recommend { background: #1e88e5; top: 136px; }

/* Цена в одну строку (не переносить "1 600 ₽" на новую строку) */
.product-card .product-card__price,
.product-card .product-card__price-old,
.product-card .product-card__prices {
    white-space: nowrap !important;
}

/* Когда товар в корзине (catalog.js ставит .product-card--in-cart), не скрывать цены —
   template_styles.css скрывает .product-card__price чтобы освободить место под qty-control,
   но при двух ценах (BASE+SALE) это ломает отображение акции. Показываем обе цены всегда. */
.product-card--in-cart .product-card__prices,
.product-card--in-cart .product-card__price,
.product-card--in-cart .product-card__price-old,
.product-card--in-cart .product-card__price--sale {
    display: inline-block !important;
}
.product-card--in-cart .product-card__prices {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

/* "Товары по акции" на детальной странице товара */
.product-page__related-actions {
    margin: 48px 0 24px;
    padding: 0;
}
.product-page__related-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px;
    line-height: 1.2;
}
@media (max-width: 768px) {
    .product-page__related-title { font-size: 22px; margin-bottom: 16px; }
    .product-page__related-actions { margin: 32px 0 16px; }
}
