/* PRODUCT CART -----------------------------------------------------------------------------*/
:root {
    --bs-border-width: 1px;
    --bs-border-style: solid;
}


/*продукт бокс*/
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Изображение Товара*/
.product-image {
    position: relative;
}

.product-card img {
    width: 100%;
    height: 222px; /* Фиксируем высоту */
    object-fit: cover;
    object-position: center;
}

.product-card-recommended {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.product-card-recommended:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Изображение Товара*/
.product-image-recommended {
    position: relative;
}

.product-card-recommended img {
    width: 100%;
    height: 260px; /* Фиксируем высоту */
    object-fit: cover;
    object-position: center;
}


/* Блок бейджей */
.badge-container {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    gap: 2px;
    flex-wrap: wrap; /* Фикс для мобильных */
    padding: 2px 5px;
    border-radius: 5px;
    z-index: 10;
}

/* Бейджи скидок */
.product-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 5px;
    font-size: 10px;
    font-weight: 300;
    color: #fff;
    border-radius: 5px;
}

.badge-discount {
    background-color: #ff5722;
}

.badge-sale {
    background-color: #ff9800;
}

.badge-new {
    background-color: #00ba44;
}

.badge-hot {
    background-color: #f451ff;
}

.badge-star {
    background-color: #ff0000;
}

.badge-best {
    background-color: #000000;
}

.badge-out-of-stock {
    background-color: #b7b7b7;
}

/* Wishlist and Compare buttons */
.img-btn-container {
    background-color: #fff;
    position: absolute;
    bottom: 5px;
    left: 10px;
    display: flex;
    gap: 2px;
    flex-wrap: wrap; /* Фикс для мобильных */
    padding: 2px 5px;
    border-radius: 5px;
    z-index: 10;
}

.wish-btn, .compare-btn {
    cursor: pointer;
    font-size: 14px;
    font-weight: 300;
    border: none;
    color: #333;
}

.wish-btn:hover, .compare-btn:hover {
    color: #007bff;
}

[data-theme="dark"] .wish-btn,
[data-theme="dark"] .compare-btn {
    color: #fff;
}

/* Скрыть кнопки по умолчанию */
.product-card .img-btn-container {
    opacity: 0; /* Прячем кнопки */
    transition: opacity 0.3s ease; /* Плавное появление */
}

/* При наведении на .product-card отображать кнопки */
.product-card:hover .img-btn-container {
    opacity: 1; /* Показать кнопки */
}

/* Название продукта */
.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.product-name-mini {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 230px;
}

/* Атрибуты */
.attributes-card {
    list-style: none;
    padding: 0;
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #2643fb;
}

/* краткое описание товара в архиве */
.arhive-short-description {
    font-size: 0.9rem;
    font-weight: 300;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 3;
    max-width: 420px;
}

/* Цена */
.price-full {
    font-size: 20px;
}

.variation-price .min {
    font-size: 12px;
    padding-right: 5px;
    color: #00ba44;
}

.variation-price .max {
    font-size: 12px;
    padding-right: 5px;
    color: #ff0018;
}

/* Цена зачеркнутая */
.price .text-danger {
    text-decoration: line-through;
}

/* Кнопки кол-во */
.input-group .btn {
    position: relative;
    z-index: 2;
    background-color: #00ba44;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
}

/* Кнопки Добавить в корину */
.add-to-cart {
    background-color: #00ba44;
    border: none;
}

.input-group .remove-btn {
    background-color: #ff0018;
    border: none;
}

/* 🌙 Dark Theme Support */
[data-theme="dark"] .product-card {
    background: #1f1f1f;
}

[data-theme="dark"] .product-name,
[data-theme="dark"] .price,
[data-theme="dark"] .variation-price,
[data-theme="dark"] .product-name-mini,
[data-theme="dark"] .arhive-short-description {
    color: #eee;
}

[data-theme="dark"] .img-btn-container {
    background: #2a2a2a;
}

[data-theme="dark"] .input-group input[type="number"] {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
}

/* ARCHIVE PRODUCT--------------------------------------------------------------------------------------------------*/

.archive-product {
    display: none;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

.archive-product.active {
    display: block; /* Перекроется стилем сетки внутри */
}

/* архив товарв 1 ------------------------------------------------------- */
.archive-product-1.active {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(1, 1fr); /* по умолчанию — 1 колонка */
}

/* Планшеты: 2 товара в ряд */
@media (min-width: 768px) {
    .archive-product-1.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Десктопы: 3 товара в ряд */
@media (min-width: 1400px) {
    .archive-product-1.active {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* архив товарв 2 ------------------------------------------------------- */
.archive-product-2.active {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, 1fr); /* по умолчанию — 1 колонка */
}

/* Планшеты: 3 товара в ряд */
@media (min-width: 768px) {
    .archive-product-2.active {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Десктопы: 4 товара в ряд */
@media (min-width: 1200px) {
    .archive-product-2.active {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Десктопы: 6 товара в ряд */
@media (min-width: 1400px) {
    .archive-product-2.active {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* архив товарв 3 ------------------------------------------------------- */

.archive-product-3.active {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, 1fr);
}

/* Планшеты: 4 товара в ряд */
@media (min-width: 768px) {
    .archive-product-3.active {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Десктопы: 6 товара в ряд */
@media (min-width: 1200px) {
    .archive-product-3.active {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Десктопы: 8 товара в ряд */
@media (min-width: 1400px) {
    .archive-product-3.active {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* архив товарв 4 ------------------------------------------------------- */

.archive-product-4.active {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 10px;
    justify-content: space-between;
}

/*Product Page---------------------------------------------------------------------------------------------*/

.product-name-full {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/*Вариации*/
.btn-variation {
    padding: 0.375rem 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-variation.active,
.btn-variation:hover {
    background-color: #343a40;
    color: #fff;
    border-color: #343a40;
}

.var-title {
    font-size: 0.8rem;
    font-weight: 400;
    color: #333;
}

/* Слайдер товара */
.single-product-slider {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Основные изображения — высота фиксирована */
.single-product-slider .swiper-slide img {
    height: 666px; /* или 300px — на твой вкус */
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* 📱 Мобильная версия (до 768px ширина экрана) */
@media (max-width: 768px) {
    .single-product-slider .swiper-slide img {
        height: 420px; /* или auto — если хочешь сохранить пропорции */
    }
}

/* 🐣 Очень маленькие устройства (до 480px) */
@media (max-width: 480px) {
    .single-product-slider .swiper-slide img {
        height: 420px;
    }
}

/* Миниатюры */
.thumbs-slider {
    max-width: 1000px;
    margin: 0 auto;
}

.thumbs-slider .swiper-slide {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 80px!important; /* фиксированная высота */
    width: 80px !important; /* и ширина — для ровных квадратов */
}

.swiper-backface-hidden .swiper-slide {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.thumbs-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #0d6efd;
    border-radius: 6px;
}

/* Изображения миниатюр — тоже фиксированная высота */
.thumbs-slider img {
    height: 100% !important;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/*таблица*/
.product-attributes table {
    font-size: 14px;
}

/*от3ывы*/
.review-card ul {
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.review-card ul li {
    margin-bottom: 0.25rem;
}

.review-form,
.review-card {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
}

/* Тёмная тема */
[data-theme="dark"] .review-form,
[data-theme="dark"] .review-card {
    background-color: #111;
    border: 1px solid #444;
    color: #e0e0e0;
}

[data-theme="dark"] .review-card .text-muted,
[data-theme="dark"] .review-card .text-secondary {
    color: #aaa !important;
}

[data-theme="dark"] .review-card a {
    color: #58a6ff;
}

/*темная таблица */
[data-theme="dark"] .product-attributes table {
    border-color: #444;
}

[data-theme="dark"] .product-name-full {
    color: #f5f5f5;
}

[data-theme="dark"] .product-attributes th,
[data-theme="dark"] .product-attributes td {
    background-color: #000;
    color: #f5f5f5;
}

[data-theme="dark"] .var-title {
    color: #f5f5f5;
}

[data-theme="dark"] .border-bottom {
    border-bottom: var(--bs-border-width) var(--bs-border-style) #343a40 !important;
}

/* mob menu add to cart --------------------------------------------------------------------------------------*/

/* Кнопка "Добавить в корзину" */
.mobile-add-to-cart-btn {
    position: fixed;
    bottom: 64px;
    background-color: #00ba44;
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    font-size: 20px;
}

.mobile-add-to-cart-btn:hover {
    background-color: #0056b3;
}

/* Мобильные стили (<768px) */
@media (max-width: 767px) {
    .mobile-add-to-cart-btn {
        width: 100%;
        height: 50px;
        left: 0;
        border-radius: 0; /* Прямоугольная форма */
    }
}

/* Десктопные стили (768px) */
@media (min-width: 768px) {
    .mobile-add-to-cart-btn {
        right: 15px;
        width: 150px;
        height: 50px;
        border-radius: 10px;
        font-size: 16px;
    }
}

@media (min-width: 992px) {
    .close-sidebar-btn {
        display: none;
    }
}

/* Мобайл: скрыт сбоку */
@media (max-width: 991.98px) {
    #mobile-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 80%;
        width: 350px;
        z-index: 1040;
        transform: translateX(100%);
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
        max-height: 100vh;
        overflow-y: auto;
    }

    @media (max-width: 991.98px) {
        #mobile-sidebar.open {
            transform: translateX(0);
            z-index: 1300;
        }
    }

    #product-layout.shifted {
        margin-right: 80%;
        transition: margin 0.3s ease;
    }
}

/* Оверлей */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: 1290;
}

/* Кнопка закрытия сайдбара */
.close-sidebar-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* UPSELL--------------------------------------------------------------------------------------------------*/

.upsell-product-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2, 1fr);
}

/* Планшеты: 4 товара в ряд */
@media (min-width: 768px) {
    .upsell-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Десктопы: 6 товара в ряд */
@media (min-width: 1200px) {
    .upsell-product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Десктопы: 8 товара в ряд */
@media (min-width: 1400px) {
    .upsell-product-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* PRODUCT FILTER--------------------------------------------------------------------------------------------------*/

/* Общие стили */
.filter-container {
    padding: 20px;
}

.filter-container h5 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
    color: #111;
}

.filter-container label {
    cursor: pointer;
    font-size: 15px;
    transition: color 0.3s ease;
}

.filter-container input[type="checkbox"] {
    accent-color: #007bff; /* Синий Bootstrap */
    margin-right: 8px;
    transform: scale(1.1);
}

.filter-container label:hover {
    color: #007bff;
}

.filter-container a {
    font-size: 14px;
    color: #007bff;
    text-align: right;
}

.filter-container a:hover {
    text-decoration: underline;
    background: none;
}

/* Дополнительно — адаптивность */
@media (max-width: 768px) {
    .filter-container {
        max-width: 100%;
        padding: 15px;
    }
}

/* BRAND FILTER */
.filter-brand {
    width: 100%;
}

.brand-list {
    padding: 5px;
    margin-bottom: 5px;
}

/* Бренды идут в один столбец */
.brand-list label {
    display: block;
    margin-bottom: 3px;
}

/* Ограничение высоты при раскрытии */
.brand-list.expanded {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;

}

[data-theme="dark"] .brand-list.expanded {
    scrollbar-color: #999 #222;
}

/* Скрытые элементы (остальные бренды) */
.hidden {
    display: none;
}

.toggle-brands {
    display: block;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

/*COLOR FILTER*/
.color-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.color-box {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background-color: var(--color);
    cursor: pointer;
    transition: border 0.2s ease;
    position: relative;
}

.color-box input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.color-box input[type="checkbox"]:checked + .checkmark {
    display: block;
}

.color-box:has(input[type="checkbox"]:checked) {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

/* 🌙 PRODUCT FILTER — DARK THEME  */
[data-theme="dark"] .filter-container {
    color: #eee;
}

[data-theme="dark"] .filter-container h5 {
    border-bottom: 1px solid #333;
    color: #eee;
}

[data-theme="dark"] .filter-container label {
    color: #ccc;
}

[data-theme="dark"] .filter-container label:hover {
    color: #66b2ff;
}

[data-theme="dark"] .filter-container a {
    color: #66b2ff;
}

[data-theme="dark"] .filter-container a:hover {
    text-decoration: underline;
    background: none;
}

[data-theme="dark"] .brand-list {
    background-color: #1e1e1e;
}

[data-theme="dark"] .color-box {
    border: 1px solid #444;
}

[data-theme="dark"] .color-box:has(input[type="checkbox"]:checked) {
    border-color: #66b2ff;
    box-shadow: 0 0 0 2px rgba(102, 178, 255, 0.4);
}

/*CART------------------------------------------------*/

/*Selected Bage*/
.selected-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #212529;
    background-color: #f8f9fa;
    border-radius: 8px;
}

[data-theme="dark"] .selected-badge {
    background-color: #000000;
    color: #fff;
}


/*КУПИ СЛОНА ----------------------------------------------*/

#dropArea {
    background-color: #f8f9fa;
    transition: 0.3s ease;
}

#dropArea.dragover {
    background-color: #e2e6ea;
    border-color: #007bff;
}

.aplication-box {
    background-color: #c7e5cc;
    border: 2px dashed #00ba44;
    border-radius: 0.5rem;
}

[data-theme="dark"] .aplication-box {
    background-color: #000000;
}


[data-theme="dark"] .form-control,
[data-theme="dark"] .form-control:focus {
    background-color: #2c2c2c;
    color: #f0f0f0;
    border-color: #555;
}


[data-theme="dark"] .drop-area {
    background-color: #2a2a2a;
    border: 1px dashed #666;
    color: #f0f0f0;
}


