/* ============== ОСНОВНЫЕ СТИЛИ ============== */
.ja-products-wrapper .product-item .product-item-info {
  display: flex;
  height: 100%;
}

/* ============== РЕЖИМ СПИСКА (СТРОКИ) ============== */
.ja-products-wrapper.list .product-item .product-item-info {
  flex-direction: row;
  align-items: flex-start;
  padding: 20px;
}

.ja-products-wrapper.list .product-item .product-item-photo {
  width: 200px;
  min-width: 200px;
  margin-right: 25px;
  margin-bottom: 0;
  align-self: flex-start;
}

.ja-products-wrapper.list .product-item .product-item-details {
  flex: 1;
  min-width: 0;
}

/* ============== РЕЖИМ СЕТКИ ============== */
.ja-products-wrapper.grid .product-item .product-item-info {
  flex-direction: column;
  height: 100%; /* Обеспечиваем растягивание на всю высоту */
}

.ja-products-wrapper.grid .product-item .product-item-details {
  flex: 1; /* Растягиваем блок деталей */
  display: flex;
  flex-direction: column;
}

.ja-products-wrapper.grid .product-item-details .price {
  margin-top: auto; /* Прижимаем цену к кнопке */
  margin-bottom: 15px; /* Отступ перед кнопкой */
}

.ja-products-wrapper.grid .product-item-actions {
  margin-top: 0; /* Убираем лишние отступы */
}
/* ============== СТИЛИ ХАРАКТЕРИСТИК ТОВАРА ============== */
.ja-products-wrapper .product-item-details > div[class*="field-"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  line-height: 1.4;
  clear: both;
  overflow: hidden;
}

.ja-products-wrapper .product-item-details .field-label {
  flex: 0 0 120px;
  max-width: 120px;
  padding-right: 15px;
  font-weight: 600;
  color: #555;
  text-align: left;
}

.ja-products-wrapper .product-item-details .field-value {
  flex: 1 1 calc(100% - 120px);
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============== СТИЛИ ЦЕНЫ (СОХРАНЕНЫ ВАШИ ОРИГИНАЛЬНЫЕ) ============== */
.ja-products-wrapper .product-item .price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ja-products-wrapper .product-item .price-box .field-label {
  font-weight: 700;
  font-size: 16px;
  color: #333;
  flex: 0 0 70px;
}

.ja-products-wrapper .product-item .price-box .field-value {
  white-space: nowrap;
}

.ja-products-wrapper .product-item-details .price .field-label {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 80px;
  flex: 0 0 80px;
  max-width: 80px;
  font-size: 1.6em;
  line-height: 2em;
  font-weight: 300;
}

.ja-products-wrapper .product-item .price-box {
    font-weight: 500;
    font-size: 1.6em;
}

.price-box .price-final_price.current-price {
    color: #096;
}

/* ============== НАЗВАНИЕ ТОВАРА ============== */
.ja-products-wrapper .product-item-name a {
    color: #000;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.ja-products-wrapper .product-item-name a:hover {
    color: #2ecc71 !important;
    text-decoration: none !important;
}

/* ============== КНОПКА КОРЗИНЫ (ОБНОВЛЕННЫЕ СТИЛИ) ============== */
.ja-products-wrapper .product-item-actions .btn.btn-default {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
  width: 100%;
  text-align: center;
}

.ja-products-wrapper .product-item-actions .btn.btn-default:hover {
  background-color: #2ecc71;
}

/* Стили для режима списка */
.ja-products-wrapper.list .product-item-actions .btn.btn-default {
 width: 40%;   
}
.ja-products-wrapper.list .product-item .product-item-actions {
  padding: 0;
  margin-left: auto;
  width: auto;
  min-width: 180px;
}

.ja-products-wrapper.list .product-item-actions {
  margin-top: 0px;
  overflow: hidden;
}

/* Стили для режима сетки */
.ja-products-wrapper.grid .product-item-actions {
  margin-top: auto; /* Прижимаем кнопку к низу */
  padding-top: 15px; /* Отступ от контента */
}

/* ============== ОСНОВНОЙ КОНТЕЙНЕР ============== */
body .ja-products-wrapper .product-item .product-item-info {
  padding: 15px;
}

/* Строчный режим */
body .ja-products-wrapper.list .list .product-item .product-item-info {
  padding: 20px 15px;
}

/* Сетка */
body .ja-products-wrapper.grid .product-item .product-item-info {
  padding: 15px 10px;
}

/* ============== НОВЫЕ СТИЛИ ДЛЯ ПОЗИЦИОНИРОВАНИЯ КОНТЕЙНЕРОВ ============== */
.ja-products-wrapper.list .product-item .product-item-info {
  flex-wrap: wrap;
}

.ja-products-wrapper.list .product-item .product-item-photo {
  flex: 0 0 200px;
}

.ja-products-wrapper.list .product-item .product-item-details {
  flex: 1;
  min-width: 0;
  padding-right: 20px;
}

.ja-products-wrapper.list .product-item .product-item-actions {
  width: 100%;
  padding-left: 225px;
}

/*-----------стили для фильтров---------------*/
.pages .pagination-wrap {
    margin: 0;
}

/*--------------Дополнительные улучшения для пагинации и сортировки--------------*/
.pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.pagination .items.pages-items {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .pages-items li {
    margin: 0 5px;
}

.pagination .pages-items li a {
    display: block;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
}

.pagination .pages-items li.active a,
.pagination .pages-items li a:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.orderby-displaynumber {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.toolbar-sorter {
    margin-bottom: 15px;
}

.sorter-options, .limiter-options {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.sorter-action {
    color: #555;
    margin-left: 10px;
    font-size: 16px;
}

.sorter-action:hover {
    color: #4CAF50;
}

.fa.fa-long-arrow-up {
    margin-right: 0;
}
.jamg-layout-chooser span {
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    color: #999;
}

.jamg-layout-chooser span.active {
    color: #4CAF50;
}
/*-------------фильтры------------------*/
/* Убираем заголовок "Shop by" */
.ja-filter-wrapper .block-subtitle.filter-subtitle {
    display: none !important;
}

/* Улучшенные стили для выбранных фильтров */
.filter-selected .clear-filter {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px; /* Увеличили размер шрифта */
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.filter-selected .filter-label {
    color: #212529; /* Более темный цвет */
    margin-right: 6px;
    font-weight: 600; /* Жирный шрифт */
    font-size: 14px; /* Увеличили размер */
}

.filter-selected .filter-value {
    color: #27ae60; /* Яркий зеленый цвет */
    font-weight: 700; /* Еще жирнее */
    font-size: 14px; /* Увеличили размер */
}

.filter-selected .clear-filter:hover {
    background: #e74c3c;
    transform: translateY(-1px);
}

.filter-selected .clear-filter:hover .filter-label,
.filter-selected .clear-filter:hover .filter-value {
    color: white;
}
.block-actions.filter-actions .btn.btn-default {
    background: #f44336;
    color: white;
    border: none;
    padding: 9px 16px; /* Увеличили размер */
    border-radius: 4px;
    font-size: 14px; /* Увеличили размер */
    font-weight: 700; /* Жирный шрифт */
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-selected-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px;
    }
    
    .filter-selected .items {
        gap: 8px;
    }
    
    .filter-selected .clear-filter {
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .block-actions.filter-actions {
        width: 100%;
        margin-top: 10px;
    }
    
    .block-actions.filter-actions .btn.btn-default {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }
}

/* ============== АДАПТИВНОСТЬ ============== */
@media (max-width: 768px) {
  .ja-products-wrapper.list .product-item .product-item-info {
    flex-direction: column;
  }
  
  .ja-products-wrapper.list .product-item .product-item-photo {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .ja-products-wrapper.list .product-item .product-item-actions {
    margin-left: 0;
    width: 100%;
    padding-left: 0;
  }
  
  .ja-products-wrapper.grid .product-item-details .price {
    margin-top: 15px;
    margin-bottom: 10px;
  }
  
  .ja-products-wrapper .product-item-details .field-label {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 90px;
    flex: 0 0 90px;
    max-width: 90px;
    font-size: 13px;
  }
  
  .ja-products-wrapper .product-item-details .field-value {
    font-size: 14px;
  }

  .ja-products-wrapper .product-item-details > div[class*="field-"] {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .ja-products-wrapper .product-item-details .field-value {
    text-align: left;
    width: 100%;
    margin-top: 5px;
    -ms-flex: 1 1 100%;
    flex: 1 1 100%;
    max-width: 100%;
  }
}