/* ─── WooCommerce overrides для Delta Shop ─── */

/* Скрываем стандартные WC-элементы которые мы заменяем */
.woocommerce-breadcrumb,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-loop-product__title,
.woocommerce ul.products,
.woocommerce div.product div.summary > form.cart,
.single_add_to_cart_button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce-error,
.woocommerce-info,
.woocommerce-message,
.wc-block-components-product-image,
.woocommerce-tabs { display: none !important; }

/* Страница каталога */
.catalog-page { padding: 60px 0; }
.catalog-page__header { margin-bottom: 32px; }
.catalog-page__title { font-size: 2rem; font-weight: 600; }

/* Category hero */
.cat-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.cat-hero__icon { font-size: 3rem; line-height: 1; }
.cat-hero__title { font-size: 2rem; font-weight: 700; margin: 0 0 6px; }
.cat-hero__desc { color: var(--text-muted); margin: 0; }
.cat-hero__count { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; display: block; }

/* Category chips */
.cat-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cat-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all .15s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip--active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 500; }

/* Catalog layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-sidebar { display: none; }
  .catalog-sidebar.is-open { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 851; background: var(--bg); padding: 20px; overflow-y: auto; }
}

.catalog-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }

/* Filter sections */
.filter-section { margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.filter-section:last-child { border-bottom: none; }
.filter-section__title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.filter-section__body { display: flex; flex-direction: column; gap: 8px; }

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.filter-check input { accent-color: var(--accent); width: 14px; height: 14px; }
.filter-check:hover { color: var(--text-primary); }

.filter-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.875rem; }
.filter-toggle__slider {
  width: 36px; height: 20px; border-radius: 10px; background: var(--bg-input);
  position: relative; transition: background .2s; flex-shrink: 0;
}
.filter-toggle__slider::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s;
}
.filter-toggle input { display: none; }
.filter-toggle input:checked + .filter-toggle__slider { background: var(--accent); }
.filter-toggle input:checked + .filter-toggle__slider::after { transform: translateX(16px); }

.filter-reset { width: 100%; justify-content: center; margin-top: 8px; }

/* Price range */
.price-range { padding: 8px 0; }
.price-range__track { position: relative; height: 4px; background: var(--bg-input); border-radius: 2px; margin: 12px 4px; }
.price-range__fill { position: absolute; height: 100%; background: var(--accent); border-radius: 2px; }
.price-range__input { position: absolute; width: 100%; appearance: none; background: none; height: 4px; top: 0; pointer-events: none; }
.price-range__input::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); pointer-events: all; cursor: pointer; }
.price-range__labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

/* Catalog toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.catalog-toolbar__right { display: flex; gap: 8px; align-items: center; }
.catalog-count { font-size: 0.875rem; color: var(--text-muted); }
.catalog-sort {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
}
.catalog-filter-btn { display: none; }
@media (max-width: 768px) { .catalog-filter-btn { display: flex; } }

/* Active filters */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; min-height: 0; }
.active-filter-tag {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(201,168,76,0.12); border: 1px solid rgba(201,168,76,0.3);
  color: var(--accent); font-size: 0.8rem;
}
.active-filter-tag__remove { cursor: pointer; font-size: 1rem; line-height: 1; }

/* Catalog pagination */
.catalog-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-btn {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: none; color: var(--text-secondary); cursor: pointer; font-size: 0.875rem; transition: all .15s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn--active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.page-btn--disabled { opacity: 0.4; cursor: not-allowed; }

/* Product page */
.product-page { padding: 60px 0; }
.product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .product-main { grid-template-columns: 1fr; gap: 24px; } }

.product-gallery__main { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; position: relative; background: var(--bg-input); }
.product-gallery__main-img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__zoom-hint { position: absolute; bottom: 10px; right: 10px; font-size: 0.7rem; color: var(--text-muted); background: rgba(0,0,0,0.5); padding: 4px 8px; border-radius: var(--radius-sm); display: flex; align-items: center; gap: 4px; }
.product-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-gallery__thumb { width: 64px; height: 64px; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.product-gallery__thumb--active { border-color: var(--accent); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info__brand { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.product-info__name { font-size: 1.6rem; font-weight: 700; margin: 0 0 12px; }
.product-info__badges { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.product-info__short-desc { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.product-info__price-block { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.product-info__price { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
.product-info__price-old { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; }
.product-info__discount { font-size: 0.8rem; font-weight: 600; color: var(--danger, #ef4444); background: rgba(239,68,68,0.1); padding: 2px 8px; border-radius: var(--radius-full); }

.product-info__attrs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; padding: 14px; background: var(--bg-input); border-radius: var(--radius-md); }
.product-attr { display: flex; justify-content: space-between; font-size: 0.875rem; }
.product-attr__label { color: var(--text-muted); }
.product-attr__val { color: var(--text-primary); font-weight: 500; }

.product-info__actions { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.product-qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.product-qty__btn { width: 36px; height: 44px; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.product-qty__btn:hover { background: var(--bg-input); }
.product-qty__val { min-width: 32px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.product-info__add-btn { flex: 1; }

.product-info__delivery { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 16px; }
.product-delivery-item { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 6px; }
.product-delivery-item:last-child { margin-bottom: 0; }
.product-delivery-item svg { color: var(--accent); flex-shrink: 0; }

.product-info__tg-link { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 0.875rem; text-decoration: none; }
.product-info__tg-link:hover { text-decoration: underline; }

/* Tabs */
.product-tabs { margin-top: 32px; }
.product-tabs__nav { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.product-tabs__tab {
  padding: 10px 20px; background: none; border: none; cursor: pointer;
  font-size: 0.9rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
}
.product-tabs__tab--active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.product-description { color: var(--text-secondary); line-height: 1.7; }
.product-specs-table { width: 100%; border-collapse: collapse; }
.product-specs-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.product-specs-table td:first-child { color: var(--text-muted); width: 40%; }
.product-delivery-info h4 { margin: 16px 0 8px; font-size: 1rem; }
.product-delivery-info ul { color: var(--text-secondary); padding-left: 20px; line-height: 2; }
.product-delivery-info p { color: var(--text-muted); font-size: 0.875rem; margin-top: 12px; }

/* Related products */
.related-products { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-products__title { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; font-size: 0.85rem; flex-wrap: wrap; }
.breadcrumb__item { color: var(--text-muted); text-decoration: none; }
.breadcrumb__item:hover { color: var(--text-primary); }
.breadcrumb__item--current { color: var(--text-primary); }
.breadcrumb__sep { color: var(--border); }

/* Product card image link */
.product-card__img-link { display: block; text-decoration: none; }
.product-card__name { text-decoration: none; color: var(--text-primary); display: block; }
.product-card__name:hover { color: var(--accent); }
.product-card__add--disabled { opacity: 0.4; }

/* Generic page */
.page-content { padding: 60px 0; }
.page-content__title { font-size: 2rem; font-weight: 700; margin-bottom: 24px; }
.page-content__body { color: var(--text-secondary); line-height: 1.7; }
.page-content__body h2, .page-content__body h3 { color: var(--text-primary); margin: 24px 0 12px; }
.page-content__body ul, .page-content__body ol { padding-left: 24px; margin-bottom: 16px; }
.page-content__body p { margin-bottom: 14px; }

/* Filters overlay */
.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 849;
}
.filters-overlay.is-open { display: block; }
