:root{
  --mg-green:#85c441;
  --mg-green-dark:#6eab33;
  --mg-dark:#0f3f2e;
  --mg-text:#31453b;
  --mg-muted:#6b7b72;
  --mg-soft:#f8fbf5;
  --mg-line:#e6eee2;
  --mg-white:#fff;
}

.mg-container{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.mg-catalog-page{background:var(--mg-white);color:var(--mg-text)}
.mg-eyebrow{display:inline-block;margin-bottom:10px;color:var(--mg-green-dark);font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}

.mg-catalog-hero{padding:76px 0;background:linear-gradient(90deg,rgba(248,251,245,.98),rgba(248,251,245,.82)),url('https://images.unsplash.com/photo-1448375240586-882707db888b?q=80&w=1800&auto=format&fit=crop') center/cover no-repeat;border-bottom:1px solid var(--mg-line)}
.mg-catalog-hero__content{max-width:760px}
.mg-catalog-hero h1{margin:0 0 18px;color:var(--mg-dark);font-size:clamp(38px,5vw,62px);line-height:1.05}
.mg-catalog-hero p{max-width:680px;margin:0 0 28px;font-size:18px;line-height:1.65}
.mg-catalog-search{display:grid;grid-template-columns:1fr auto;gap:10px;padding:8px;background:#fff;border:1px solid var(--mg-line);border-radius:14px;box-shadow:0 16px 34px rgba(15,63,46,.08)}
.mg-catalog-search input{min-width:0;height:48px;padding:0 16px;border:0;outline:0;background:transparent;font-size:15px}
.mg-catalog-search button,.mg-filter-toggle{border:0;border-radius:10px;background:var(--mg-green);color:#fff;font-weight:800;padding:0 22px;cursor:pointer}
.mg-catalog-search button:hover,.mg-filter-toggle:hover{background:var(--mg-green-dark)}

.mg-category-section,.mg-products-section{padding:60px 0}
.mg-category-section{background:#fff}
.mg-products-section{background:var(--mg-soft);border-top:1px solid var(--mg-line)}
.mg-section-heading,.mg-products-toolbar{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:28px}
.mg-section-heading h2,.mg-products-toolbar h2{margin:0;color:var(--mg-dark);font-size:34px;line-height:1.15}
.mg-text-link{color:var(--mg-dark);font-weight:800;text-decoration:none}

.mg-category-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.mg-category-card{position:relative;min-height:260px;overflow:hidden;border-radius:18px;background:#dfe8da;color:#fff;box-shadow:0 14px 30px rgba(15,63,46,.10);isolation:isolate}
.mg-category-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.mg-category-card:hover img{transform:scale(1.05)}
.mg-category-card__overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(6,30,20,.82));z-index:1}
.mg-category-card__content{position:absolute;z-index:2;left:20px;right:20px;bottom:20px;display:flex;flex-direction:column;gap:5px}
.mg-category-card strong{font-size:24px;line-height:1.1}
.mg-category-card small{color:#edf5ed}
.mg-category-card em{margin-top:8px;font-style:normal;font-weight:800;color:#fff}

.mg-toolbar-actions{display:flex;gap:12px;align-items:center}
.mg-filter-toggle{display:none;height:44px}
.mg-shop-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:28px;align-items:start}
.mg-shop-sidebar{position:sticky;top:110px}
.mg-sidebar-card{padding:22px;border:1px solid var(--mg-line);border-radius:18px;background:#fff}
.mg-sidebar-card h3{margin:0 0 18px;color:var(--mg-dark);font-size:22px}
.mg-sidebar-hint{margin:0;color:var(--mg-muted);font-size:14px;line-height:1.55}

.mg-products-content ul.products{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;margin:0!important}
.mg-products-content ul.products::before,.mg-products-content ul.products::after{display:none!important}
.mg-products-content ul.products li.product{width:auto!important;margin:0!important;padding:0 0 18px!important;overflow:hidden;border:1px solid var(--mg-line);border-radius:18px;background:#fff;box-shadow:0 10px 24px rgba(15,63,46,.06);transition:transform .2s ease,box-shadow .2s ease}
.mg-products-content ul.products li.product:hover{transform:translateY(-3px);box-shadow:0 16px 34px rgba(15,63,46,.11)}
.mg-products-content ul.products li.product img{width:100%!important;aspect-ratio:4/3;object-fit:cover;margin:0 0 16px!important}
.mg-products-content ul.products li.product .woocommerce-loop-product__title,.mg-products-content ul.products li.product .price,.mg-products-content ul.products li.product .button{margin-left:16px!important;margin-right:16px!important}
.mg-products-content ul.products li.product .woocommerce-loop-product__title{padding:0!important;color:var(--mg-dark)!important;font-size:18px!important;line-height:1.3!important}
.mg-products-content ul.products li.product .price{display:block;margin-top:10px!important;color:var(--mg-dark)!important;font-size:19px!important;font-weight:900}
.mg-products-content ul.products li.product .button{display:flex!important;align-items:center;justify-content:center;margin-top:14px!important;border-radius:10px!important;background:var(--mg-green)!important;color:#fff!important;font-weight:800!important}
.mg-products-content .woocommerce-result-count{display:none}

@media(max-width:1024px){
  .mg-category-grid{grid-template-columns:repeat(2,1fr)}
  .mg-products-content ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:780px){
  .mg-catalog-hero{padding:48px 0}
  .mg-catalog-search{grid-template-columns:1fr}
  .mg-catalog-search button{height:46px}
  .mg-section-heading,.mg-products-toolbar{align-items:flex-start;flex-direction:column}
  .mg-toolbar-actions{width:100%;justify-content:space-between}
  .mg-filter-toggle{display:inline-flex;align-items:center;justify-content:center}
  .mg-shop-layout{grid-template-columns:1fr}
  .mg-shop-sidebar{display:none;position:static}
  .mg-shop-sidebar.is-open{display:block}
  .mg-products-content ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:520px){
  .mg-container{width:min(100% - 28px,1180px)}
  .mg-category-section,.mg-products-section{padding:42px 0}
  .mg-category-grid{grid-template-columns:1fr}
  .mg-category-card{min-height:230px}
  .mg-products-content ul.products{grid-template-columns:1fr!important}
}
\n\n/* Blocksy/WooCommerce compatibility: prevent duplicated archive UI and card metadata. */\n.mg-products-content > .woocommerce-shop-header,\n.mg-products-content > .woocommerce-products-header,\n.mg-products-content .woocommerce-notices-wrapper:empty{display:none!important}\n\n/* Category label under a product title is unnecessary in this catalogue design. */\n.mg-products-content ul.products li.product .entry-meta,\n.mg-products-content ul.products li.product .product-category,\n.mg-products-content ul.products li.product .product-categories,\n.mg-products-content ul.products li.product .ct-woo-card-extra,\n.mg-products-content ul.products li.product [class*="category" i]:not(.button){display:none!important}\n\n/* Reset theme spacing that can leak into a custom archive template. */\n.mg-products-content,\n.mg-products-content .products{padding-top:0!important;margin-top:0!important}\n.mg-products-content ul.products li.product .woocommerce-loop-product__link{display:block!important}\n

/* Убираем название категории только из карточек товаров */
.post-type-archive-product ul.products li.product .entry-meta,
.post-type-archive-product ul.products li.product .ct-product-categories,
.post-type-archive-product ul.products li.product .product-categories,
.post-type-archive-product ul.products li.product .woocommerce-loop-product__category,
.post-type-archive-product ul.products li.product [class*="category"],
.tax-product_cat ul.products li.product .entry-meta,
.tax-product_cat ul.products li.product .ct-product-categories,
.tax-product_cat ul.products li.product .product-categories,
.tax-product_cat ul.products li.product .woocommerce-loop-product__category {
    display: none !important;
}


.woocommerce ul.products li.product ul.entry-meta,
.woocommerce ul.products li.product li.meta-categories,
.woocommerce ul.products li.product .meta-categories {
    display: none !important;
}