/* Магазин: карточки товаров, категории, хлебные крошки, пагинация, вкладки, товар, цены */

/* =========================================
   18) WooCommerce block products (Catalog)
   ========================================= */

/* Карточка товара */
li.wc-block-product {
  background-color: #ffffff;
  border: 1px solid var(--pcr-border);
  border-radius: var(--pcr-radius-lg);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 400px;
  box-sizing: border-box;
}

li.wc-block-product:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border-color: rgba(0, 150, 136, 0.3);
}

/* Картинка */
.wc-block-grid__product-image img,
.wc-block-components-product-image img {
  height: 180px;
  width: 100%;
  margin-bottom: 20px;
  border-radius: var(--pcr-radius-sm);
}

/* Заголовок (ШРИФТ 600 - НЕ ЖИРНЫЙ) */
li.wc-block-product :is(h2, h3, .wc-block-components-product-title) {
  font-size: 16px;
  font-weight: 600; /* Medium bold */
  line-height: 1.4;
  margin: 0 0 15px 0;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 66px;
}

li.wc-block-product :is(h2, h3, .wc-block-components-product-title) a {
  color: var(--pcr-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

li.wc-block-product:hover :is(h2, .wc-block-components-product-title) a {
  color: var(--pcr-brand);
}

/* Кнопка в каталоге */
.wp-block-woocommerce-product-button {
  margin-top: auto;
  width: 100%;
  padding-top: 15px;
}

.wp-block-woocommerce-product-button .wp-block-button__link {
  width: 100%;
  background-color: #f0f2f5;
  color: var(--pcr-text);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  box-sizing: border-box;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
  text-align: center;
  text-decoration: none;
}

li.wc-block-product:hover .wp-block-woocommerce-product-button .wp-block-button__link {
  background-color: var(--pcr-brand-btn);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 150, 136, 0.3);
}

li.wc-block-product > * {
  margin-left: 0;
  margin-right: 0;
}

/* =========================================
   19) CATEGORY GRID (FIXED COLUMNS)
   ========================================= */
.woocommerce ul.products {
  display: grid;
  gap: 20px;
  padding: 0;
  margin: 0 0 40px 0;
  list-style: none;
  justify-content: center;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(6, 1fr);
  }
}

.woocommerce ul.products li.product.product-category {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  padding: 20px 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 160px;
  width: auto;
  margin: 0;
  float: none;
}

.woocommerce ul.products li.product.product-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  border-color: rgba(0, 150, 136, 0.3);
}

.woocommerce ul.products li.product.product-category img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 15px auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

.woocommerce ul.products li.product.product-category .woocommerce-loop-category__title {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  padding: 0;
  margin: 0;
  line-height: 1.3;
}

.woocommerce ul.products li.product.product-category:hover .woocommerce-loop-category__title {
  color: #009688;
}

.woocommerce ul.products li.product.product-category a {
  text-decoration: none;
  border: none;
}

.woocommerce ul.products li.product.product-category mark.count {
  background: #e0f2f1;
  color: #009688;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 8px;
  display: inline-block;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
ul.products::before,
ul.products::after {
  display: none;
  content: none;
}

/* =========================================
   20) SHOP UI (breadcrumbs, titles)
   ========================================= */
.woocommerce-breadcrumb{
  font-size: 14px;
  color: #95a5a6;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.woocommerce-breadcrumb a{
  color: var(--pcr-text);
  text-decoration: none;
  font-weight: 600;
}
.woocommerce-breadcrumb a:hover{ color: var(--pcr-brand); }

h1.wp-block-query-title{
  font-size: 32px;
  font-weight: 700;
  color: var(--pcr-text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

/* Сортировка в каталоге (.wc-block-catalog-sorting — сила как у catalog-sorting-style.css) */
.woocommerce-ordering select,
.woocommerce.wc-block-catalog-sorting select.orderby{
  border-radius: 25px;
  border: 1px solid #e0e0e0;
  padding: 10px 35px 10px 15px;
  font-size: 14px;
  color: var(--pcr-text);
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: var(--pcr-select-arrow);
  background-repeat: no-repeat;
  background-position: right 15px top 50%;
  background-size: 12px auto;
}

.woocommerce-result-count{
  color: #7f8c8d;
  font-style: italic;
}

/* =========================================
   21) PAGINATION
   ========================================= */
.wp-block-query-pagination{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 0;
  flex-wrap: wrap;
}

.wp-block-query-pagination-numbers{
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin: 0;
}

.wp-block-query-pagination .page-numbers{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  color: var(--pcr-text);
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  margin: 0;
}

.wp-block-query-pagination .page-numbers.current,
.wp-block-query-pagination .page-numbers:hover{
  background-color: var(--pcr-brand-btn);
  color: #ffffff;
  border-color: var(--pcr-brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 150, 136, 0.2);
}

.wp-block-query-pagination > .wp-block-query-pagination-previous,
.wp-block-query-pagination > .wp-block-query-pagination-next{
  font-weight: 700;
  color: var(--pcr-text);
  text-decoration: none;
  margin: 0 10px;
}
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover{
  color: var(--pcr-brand);
}

/* =========================================
   22) PRODUCT ATTRIBUTES + TABS
   ========================================= */
.woocommerce-product-details__short-description,
.woocommerce-tabs{
  margin-top: 30px;
}

/* Селекторы как у стиля «minimal» блока Product Details (WooCommerce, product-details.css):
   той же силы, выигрывают за счёт более позднего подключения. */
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs{
  border-bottom: 2px solid #eee;
  padding: 0 0 10px 0;
  margin-bottom: 30px;
  background: transparent;
}

html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li{
  background: transparent;
  border: none;
  margin-right: 30px;
}

html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li a{
  color: #95a5a6;
  font-weight: 600;
  font-size: 16px;
  padding: 10px 0;
  text-decoration: none;
  transition: all 0.3s ease;
}

html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs li.active a{
  color: var(--pcr-text);
  border-bottom: 3px solid var(--pcr-brand);
}

.woocommerce table.shop_attributes{
  border: 1px solid #f0f0f0;
  font-size: 15px;
  border-radius: 12px;
  background: #fdfdfd; 
}

/* «tr :is(th, td)» — сила как у woocommerce-smallscreen.css (… tr td), который на мобильных обнуляет отступы */
.woocommerce table.shop_attributes tr :is(th, td){
  border-bottom: 1px solid #eee;
  padding: 12px 20px;
  font-style: normal;
  background: transparent;
}

.woocommerce table.shop_attributes th{
  color: var(--pcr-text);
  font-weight: 700;
  width: 30%;
}

.woocommerce table.shop_attributes td{
  color: #555;
}

/* Без «зебры» WooCommerce (.woocommerce table.shop_attributes tr:nth-child(2n) th) */
.woocommerce table.shop_attributes tr:nth-child(2n) :is(th, td){
  background: transparent;
}

.woocommerce table.shop_attributes tr:last-child th,
.woocommerce table.shop_attributes tr:last-child td{
  border-bottom: none;
}

/* =========================================
   23) SINGLE PRODUCT UI
   ========================================= */
.single-product button.single_add_to_cart_button{
  background-color: var(--pcr-brand-btn);
  color: #ffffff;
  border-radius: 50px;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.single-product button.single_add_to_cart_button:hover{
  background-color: var(--pcr-brand-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 150, 136, 0.3);
}

/* Последний селектор — как у степпера WooCommerce (add-to-cart-form-style.css), иначе он перебивает */
.single-product .quantity,
.single-product .wc-block-components-quantity-selector,
div.wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper form.cart div.wc-block-components-quantity-selector.quantity{
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  background: #fff;
  height: 50px;
  margin-right: 15px;
  overflow: hidden;
  width: auto;
}

.single-product .quantity input.qty,
.single-product .wc-block-components-quantity-selector__input,
div.wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper .wc-block-components-quantity-selector input[type=number].input-text.qty.text{
  border: none;
  background: transparent;
  height: 100%;
  width: 50px;
  font-weight: 700;
  color: var(--pcr-text);
  text-align: center;
  margin: 0;
  padding: 0;
  appearance: textfield;
}

.single-product .quantity button,
.single-product .wc-block-components-quantity-selector__button{
  background: transparent;
  border: none;
  color: #777;
  font-size: 18px;
  width: 30px;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.single-product .quantity button:hover,
.single-product .wc-block-components-quantity-selector__button:hover{
  background-color: #f7f7f7;
  color: var(--pcr-brand);
}

/* .single-product — чтобы перебить обнуление отступов во flex-раскладке (.is-layout-flex > *) */
.single-product .product_meta{
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed #eee;
  font-size: 13px;
  color: #999;
}

.product_meta span{
  display: block;
  margin-bottom: 5px;
}

/* Артикул: подпись и значение в одну строку, как у категории */
.product_meta.wp-block-woocommerce-product-sku span,
.wp-block-woocommerce-product-sku span{
  display: inline;
}

.product_meta a{
  color: var(--pcr-brand);
  font-weight: 600;
  text-decoration: none;
}

/* =========================================
   25) SALE BADGE & PRICES
   ========================================= */
.woocommerce span.onsale,
.wc-block-components-product-sale-badge,
.wc-block-grid__product-sale-badge {
  background-color: #e74c3c;
  color: #ffffff;
  border: none;
  outline: none;
  border-radius: 6px;
  width: auto;
  height: auto;
  min-width: fit-content;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  position: absolute;
  top: 15px;
  left: 15px;
  right: auto;
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Цены - делаем тоньше */
.woocommerce div.product p.price,
.woocommerce ul.products li.product .price,
.wp-block-woocommerce-product-price {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: var(--pcr-brand);
  font-weight: 600; /* Было 700/800 */
  opacity: 1;
  border: none;
}

.woocommerce div.product p.price del,
.woocommerce ul.products li.product .price del,
.wp-block-woocommerce-product-price del {
  color: #b0bec5;
  font-size: 0.85em;
  font-weight: 400;
  text-decoration: line-through;
  opacity: 0.7;
  order: 1;
  display: inline-block;
  margin-right: 5px;
}

.woocommerce div.product p.price ins,
.woocommerce ul.products li.product .price ins,
.wp-block-woocommerce-product-price ins {
  background: transparent;
  color: #e74c3c;
  font-size: 1.25em;
  font-weight: 700; /* Было 800 */
  text-decoration: none;
  order: 2;
  border: none;
}

.single-product .summary p.price {
  justify-content: flex-start;
  margin-bottom: 20px;
}

/* Корзина и выезжающая корзина: краткое описание товара не показываем (оно есть на странице товара) */
.wc-block-components-product-metadata__description {
  display: none;
}

/* Плашка срока доставки (inc/delivery-badge.php) */
.pcr-delivery-badge {
  display: inline-block;
  background-color: #f0f8ff;
  color: #005b9f;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
}
.pcr-delivery-badge--compact {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 5px;
  margin-bottom: 10px;
}

/* Пометка под фото расходников (inc/product-page.php); у галереи свой нижний отступ ~34px */
.woocommerce div.product .wp-block-woocommerce-product-image-gallery:has(+ .pcr-image-note) div.woocommerce-product-gallery {
  margin-bottom: 0;
}
.pcr-image-note {
  margin: 10px 0 24px;
  font-size: 13px;
  line-height: 1.45;
  color: #5f6b73;
}

/* Текст под товарами категории (inc/catalog-seo.php, №24) */
.pcr-cat-about {
  margin: 48px auto 8px;
  padding: 24px 28px;
  max-width: 860px;
  background: var(--pcr-bg-soft);
  border-radius: var(--pcr-radius-sm);
  color: var(--pcr-muted);
  font-size: 15px;
  line-height: 1.6;
}
.pcr-cat-about h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--pcr-text);
}
.pcr-cat-about p {
  margin: 0 0 8px;
}
.pcr-cat-about p:last-child {
  margin-bottom: 0;
}
.pcr-cat-about a {
  color: var(--pcr-brand-dark);
}
@media (max-width: 600px) {
  .pcr-cat-about {
    margin-top: 32px;
    padding: 18px 16px;
  }
}
