/*
 Theme Name: Blocksy Child
 Template: blocksy
 Text Domain: blocksy-child
*/

body,
button,
input,
select,
textarea {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    color: #111111;
}

/* Каталог: заголовки карточек и цены — чёрные */
.octa-card-title,
.octa-card-title a {
    color: #111111 !important;
    text-decoration: none;
}

.octa-card-title a:hover {
    text-decoration: underline;
}

.octa-card-price {
    color: #111111 !important;
    font-weight: 600;
}

/* Каталог: фильтры сверху — чёрный текст */
.octa-catalog-tabs a,
.octa-catalog-tabs button,
.octa-catalog-tabs .ct-label {
    color: #111111 !important;
}

/* Активный фильтр — тоже чёрный текст, можно выделить фоном */
.octa-catalog-tabs .active,
.octa-catalog-tabs .is-active {
    color: #111111 !important;
}

/* ================================
   Каталог техники: цвета и типографика
   ================================ */

.post-type-archive-equipment .octa-card-title,
.post-type-archive-equipment .octa-card-title a {
    color: #111 !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.post-type-archive-equipment .octa-card-price {
    color: #111 !important;
    font-weight: 600;
    font-size: 14px;
}

.post-type-archive-equipment .octa-card-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}

/* ===== Octa_light Catalog Cards: final colors & typography override ===== */

/* Базовый цвет текста внутри карточки каталога */
.octa-card-item,
.octa-card-item * {
    color: #111111 !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

/* Заголовок карточки — чёрный, без синего линка */
.octa-card-item .octa-card-title,
.octa-card-item .octa-card-title a,
.octa-card-item h3,
.octa-card-item h3 a,
.octa-card-item .ct-title,
.octa-card-item .ct-title a {
    color: #111111 !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.octa-card-item .octa-card-title a:hover,
.octa-card-item h3 a:hover,
.octa-card-item .ct-title a:hover {
    text-decoration: underline;
}

/* Цена в карточке — чёрная, без красного */
.octa-card-item .octa-card-price,
.octa-card-item .price,
.octa-card-item .amount {
    color: #111111 !important;
    font-weight: 600;
    font-size: 14px;
}

/* Описание под заголовком — меньше и спокойнее */
.octa-card-item .octa-card-desc,
.octa-card-item p {
    font-size: 13px;
    line-height: 1.4;
    color: #444444 !important;
}

/* На всякий случай убираем наследование странных цветов ссылок внутри карточки */
.octa-card-item a {
    color: #111111 !important;
}

/* Попап оформлен отдельно в octa-catalog-popup.css — не трогаем */

/* === ACTIVE CATEGORY BUTTON === */
.equipment-filters button.active,
.equipment-filters a.active,
.equipment-filters .active,
.octa-catalog-tabs .active,
.octa-catalog-tabs a.active,
.octa-catalog-tabs .tab.active {
    background-color: #e5e5e5 !important;   /* светло-серый фон */
    color: #000 !important;                 /* чёрный текст */
    border-color: #d0d0d0 !important;       /* лёгкий серый бордер */
}

/* Ховер для активного */
.equipment-filters .active:hover,
.octa-catalog-tabs .active:hover,
.octa-catalog-tabs .tab.active:hover {
    background-color: #dcdcdc !important;
}

/* Исправление для кнопок Blocksy */
.ct-button.active,
button.active {
    background-color: #e5e5e5 !important;
    color: #000 !important;
}

/* Single equipment: make price black */
.single-equipment .octa-card-price,
.single-equipment .price,
.single-equipment .octa-price,
.single-equipment .ct-product-price,
.single-equipment .amount {
    color: #111111 !important;
    font-weight: 600;
}

/* --- MOBILE FIXES --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding: 0 12px;
        font-size: 16px;
        line-height: 1.4;
    }
    nav, .menu, .main-navigation ul {
        flex-wrap: wrap;
    }
}

/* ===========================
   OCTALIGHT: MOBILE-FIRST FIX
   =========================== */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-size: 16px;
  line-height: 1.5;
}

.container,
.site,
.content-area,
.site-content,
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

* {
  box-sizing: border-box;
}

h1 {
  font-size: 1.8rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 1.2rem 0 0.8rem;
}

.catalog-grid,
.products-grid,
.octa-catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.catalog-item,
.product-card,
.octa-catalog-item {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  padding: 12px;
}

.catalog-item img,
.product-card img,
.octa-catalog-item img {
  border-radius: 6px;
  margin-bottom: 8px;
}

.catalog-item-title,
.product-card-title,
.octa-catalog-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.catalog-item-meta,
.product-card-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

.button,
button,
input[type="submit"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
}

@media (min-width: 600px) {
  .catalog-grid,
  .products-grid,
  .octa-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .catalog-grid,
  .products-grid,
  .octa-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

nav,
.main-navigation,
.menu,
.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  margin: 0 8px 4px 0;
}

.main-navigation a {
  display: inline-block;
  padding: 6px 10px;
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }

  header,
  .site-header {
    padding: 8px 12px;
  }

  .main-navigation {
    margin-top: 8px;
  }
}

    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Octa_Light: изображения в карточках каталога */
.catalog-card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* сохраняем пропорции, вписываемся в блок */
}

/* Octa_Light: изображение в модальном окне карточки каталога */
.catalog-modal-image,
.octa-popup-image {
    max-width: 800px;       /* чтобы не разъезжалось */
    width: 100%;
    height: auto !important;           /* ВАЖНО: автоматическая высота, без растягивания */
    max-height: 70vh;       /* не выше 70% высоты окна */
    display: block;
    margin: 0 auto;
    object-fit: contain !important;    /* вписываемся без обрезки и искажения */
}



/* ===== OCTA: поиск по каталогу ===== */
.octa-catalog-search-bar {
  margin: 1.5rem 0 1.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.octa-catalog-search-input {
  width: 100%;
  max-width: 600px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  font-size: 0.95rem;
  outline: none;
}

.octa-catalog-search-input:focus {
  border-color: rgba(0,0,0,0.5);
}

.octa-catalog-search-clear {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  background: transparent;
}

/* ===== OCTA: футер ===== */
.octa-footer-text {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  opacity: 0.7;
}



/* OCTA SEARCH START */
.octa-search-main {
	padding: 40px 0 60px;
}

.octa-search-header {
	margin-bottom: 24px;
}

.octa-search-title {
	font-size: 26px;
	margin-bottom: 12px;
}

.octa-search-form {
	display: flex;
	gap: 8px;
	max-width: 520px;
}

.octa-search-form input[type="search"] {
	flex: 1;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid rgba(0,0,0,.08);
	font-size: 14px;
}

.octa-search-submit {
	padding: 10px 16px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	font-size: 14px;
}

.octa-search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.octa-search-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 0 0 1px rgba(0,0,0,.03);
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}

.octa-search-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.octa-search-card__thumb img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.octa-search-card__body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.octa-search-card__title {
	font-size: 15px;
	line-height: 1.3;
	margin: 0;
}

.octa-search-card__cat {
	font-size: 12px;
	opacity: .7;
}

.octa-search-card__price {
	margin-top: 4px;
	font-weight: 600;
	font-size: 14px;
}

.octa-search-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.octa-search-pagination {
	margin-top: 24px;
	text-align: center;
}

.octa-search-empty {
	margin-top: 24px;
}
/* OCTA SEARCH END */
