/* === Carousel Sections === */
.carousel-section {
  margin: 40px 0;
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
}

.sales-section {
  background: linear-gradient(135deg, #fdf6f0, #faebd7);
  border: 1px solid #e6d6c1;
}

.new-section {
  background: linear-gradient(135deg, #f0f8f0, #e8f4e8);
  border: 1px solid #d4e6d4;
}

.section-title {
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 2em;
  color: #2c3e50;
  font-weight: 600;
  font-family: 'Georgia', serif;
}

/* === Product Carousel Styles === */
.product-carousel-wrapper {
  position: relative;
  width: 100%;
}

.swiper {
  width: 100%;
  padding: 15px 0 60px;
}

.swiper-wrapper {
  align-items: stretch;
}

.swiper-slide {
  height: auto;
  display: flex;
  padding: 5px;
  box-sizing: border-box;
}

.product-card {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-3px);
  border-color: #8b4513;
}

.product-image {
  display: block;
  margin-bottom: 15px;
  text-align: center;
  overflow: hidden;
  border-radius: 6px;
  width: 100%;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.product-image img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  transition: transform 0.3s ease;
  background: #f9fafb;
}

.product-card:hover .product-image img {
  transform: scale(1.03);
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.product-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  min-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #2c3e50;
  font-family: 'Georgia', serif;
}

.product-title a {
  color: #2c3e50;
  text-decoration: none;
  word-break: break-word;
}

.product-title a:hover {
  color: #8b4513;
}

.product-price {
  align-self: center;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  flex-shrink: 0;
  font-family: 'Georgia', serif;
}

.product-price del {
  color: #9ca3af;
  font-size: 0.9em;
  margin-right: 5px;
}

.product-price ins {
  text-decoration: none;
  color: #c0392b;
}

/* Badges - стили как на марках */
.sale-badge,
.new-badge {
  display: inline-block;
  padding: 4px 8px;
  color: white;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  margin-bottom: 12px;
  align-self: flex-start;
  line-height: 1;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.3);
}

.sale-badge {
  background: #c0392b;
}

.new-badge {
  background: #27ae60;
}

/* === Swiper Navigation - Elegant Style === */
.swiper-button-next,
.swiper-button-prev {
    color: #8b4513 !important;
    background: none !important;
    border-radius: 50%;
    width: 48px !important;
    height: 48px !important;
    box-shadow: none !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: white;
    background: #8b4513;
    box-shadow: 0 6px 25px rgba(139, 69, 19, 0.3);
    transform: scale(1.1);
    border-color: #8b4513;
}

.swiper-button-next:active,
.swiper-button-prev:active {
    transform: scale(0.95);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: 600;
    font-family: 'Font Awesome 6 Free';
}

.swiper-button-prev:after {
    content: '←';
    margin-right: 2px;
}

.swiper-button-next:after {
    content: '→';
    margin-left: 2px;
}

/* Скрываем стрелки на мобильных по умолчанию */
.swiper-button-next,
.swiper-button-prev {
    display: none;
}

/* Показываем стрелки только на планшетах и десктопах */
@media (min-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Swiper Pagination */
.swiper-pagination {
    bottom: 10px !important;
}

.swiper-pagination-bullet {
    background: #8b4513;
    opacity: 0.4;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 69, 19, 0.3);
}

.swiper-pagination-bullet:hover {
    opacity: 0.7;
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #8b4513;
    width: 24px;
    border-radius: 4px;
    transform: scale(1.1);
}

/* Progress Bar Alternative */
.swiper-pagination-progressbar {
    background: rgba(139, 69, 19, 0.1);
    height: 3px;
}

.swiper-pagination-progressbar-fill {
    background: #8b4513;
}

/* === Alternative Style - Minimal Arrows === */
/* Раскомментируйте если хотите более минималистичные стрелки */

/*
.swiper-button-next,
.swiper-button-prev {
    color: #8b4513;
    background: transparent;
    border: 2px solid #8b4513;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: white;
    background: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}
*/

/* === Alternative Style - Square Buttons === */
/* Раскомментируйте если хотите квадратные кнопки в стиле филателии */

/*
.swiper-button-next,
.swiper-button-prev {
    color: #8b4513;
    background: white;
    border: 2px solid #8b4513;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: white;
    background: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.25);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}
*/

/* === Touch-friendly styles for mobile === */
@media (max-width: 767px) {
    .swiper-container {
        padding-bottom: 30px;
    }
    
    .swiper-pagination {
        bottom: 5px !important;
    }
    
    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
    
    .swiper-pagination-bullet-active {
        width: 30px;
    }
}

/* === Accessibility Improvements === */
.swiper-button-next:focus,
.swiper-button-prev:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}

/* === Loading State for Swiper === */
.swiper-container.swiper-container-initialized {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.swiper-container:not(.swiper-container-initialized) {
    opacity: 0.7;
}

/* Наборы марок - как коллекционные альбомы */
.stamp-sets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stamp-set-block {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 15px 10px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    min-height: 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

.stamp-set-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white;
    border-color: #d4af37;
}

.stamp-set-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%);
}

.set-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.set-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-family: 'Georgia', serif;
}

.set-count {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

/* Подборки по годам - как архивные карточки */
.years-collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 15px 10px;
    width: 100%;
    box-sizing: border-box;
}

.year-collection-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    padding: 12px 8px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #d1d5db;
    background: #fff;
    font-family: 'Georgia', serif;
}

.year-collection-link:hover {
    color: #8b4513;
    text-decoration: none;
    border-color: #8b4513;
    background-color: #fdf6f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
}

.year-content {
    width: 100%;
}

.year-number {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

.year-count {
    font-size: 11px;
    color: #6b7280;
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.year-collection-link:hover .year-count {
    color: #8b4513;
}

/* Кнопки товаров - более элегантные */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.add-to-cart-btn,
.quick-order-btn,
.details-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    font-weight: 500;
    box-sizing: border-box;
    font-family: 'Georgia', serif;
    letter-spacing: 0.3px;
}

/* Кнопка "В корзину" */
.add-to-cart-btn {
    background: #8b4513;
    color: white;
    border: 1px solid #8b4513;
}

.add-to-cart-btn:hover {
    background: #6b3410;
    border-color: #6b3410;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
    color: #fff;
}

.add-to-cart-btn.added {
    background: #27ae60;
    border-color: #27ae60;
}

.add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Кнопка "Быстрый заказ" */
.quick-order-btn {
    background: #c0392b;
    color: white;
    border: 1px solid #c0392b;
}

.quick-order-btn:hover {
    background: #a33225;
    border-color: #a33225;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3);
}

/* Кнопка "Подробнее" */
.details-btn {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #d1d5db;
}

.details-btn:hover {
    background: #e9ecef;
    border-color: #8b4513;
    transform: translateY(-1px);
    color: #8b4513;
}

/* Скрываем стандартные кнопки WooCommerce */


/* Показываем наши кнопки */
.product-card .product-actions {
    display: flex !important;
}

/* Виджет последних записей - как архивные заметки */
.recent-posts-with-date {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-post-item {
    display: block;
    padding: 12px 15px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    font-family: 'Georgia', serif;
}

.recent-post-item:hover {
    border-color: #8b4513;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.15);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.recent-post-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-post-title {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
    word-wrap: break-word;
    margin: 0;
}

.recent-post-item:hover .recent-post-title {
    color: #8b4513;
}

.recent-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-post-date {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.recent-post-date::before {
    content: "📅";
    margin-right: 4px;
    font-size: 11px;
}

/* Стили для JivoChat */
.jivo-chat-notice {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.jivo-chat-notice h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* Адаптация JivoChat для мобильных */
@media (max-width: 768px) {
    /* Убедитесь, что JivoChat не перекрывает важные элементы */
    .jivo-container {
        z-index: 9998 !important;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .years-collections-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px 5px;
    }
    
    .stamp-sets-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .carousel-section {
        padding: 20px 15px;
        margin: 30px 0;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image img {
        height: 160px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .jivo-chat-notice {
        background: #2c3e50;
        border-left-color: #3498db;
    }
}
.recommended-category-item{
  display: list-item;
}
.recommended-category-link{
  text-decoration: none !important;
  font-weight: bold;
 
  line-height: 1.4;
  color: #2c3e50;
  word-wrap: break-word;
  margin: 0;
}
.widget-title-link{
    display: inline-flex;
    text-align: center !important;
    justify-content: center ;
    color: #2c3e50;
}
/* Старые самодельные значки способов оплаты убраны —
   иконки теперь штатные (woocommerce_cod_icon + логотип плагина Т-Банка),
   раскладка в assets/css/woocommerce.css (Fix-5). */
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt{
    background-color: #8b4513 !important;
}
/* === Облако тегов — аккуратные «чипы» вместо разнокалиберного текста === */
.tagcloud,
.wp-block-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1;
}
.tagcloud a,
.wp-block-tag-cloud a,
.widget_tag_cloud a {
  display: inline-block;
  font-size: 13px !important;
  line-height: 1.2 !important;
  padding: 6px 12px;
  background: #f2f4f7;
  color: #344054;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.tagcloud a:hover,
.wp-block-tag-cloud a:hover,
.widget_tag_cloud a:hover {
  background: #8b4513;
  border-color: #8b4513;
  color: #fff;
}
.tagcloud .tag-link-count,
.widget_tag_cloud .tag-link-count {
  opacity: .6;
  font-size: .85em;
}
