.gmd-site ul.products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;list-style:none;padding:0!important;margin:20px 0!important}
.gmd-site ul.products:before,.gmd-site ul.products:after{display:none!important}
.gmd-site ul.products li.product{float:none!important;width:auto!important;margin:0!important;min-width:0;border:1px solid #e9e9e9;border-radius:7px;padding:12px!important;display:flex;flex-direction:column}
.gmd-site ul.products li.product img{height:190px!important;width:100%!important;object-fit:contain}
.gmd-site ul.products li.product .woocommerce-loop-product__title{font-size:14px!important;line-height:1.35;min-height:38px;color:#111}
.gmd-site ul.products li.product .price{color:#111!important;font-size:16px!important;font-weight:700!important}
.gmd-site .button,.gmd-site button.button,.gmd-site input.button{background:var(--gmd-accent)!important;color:#fff!important;border-radius:4px!important}
/* Страница каталога: боковая колонка с фильтрами и карточки товаров. */
.gmd-shop-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:start}
.gmd-shop-results{min-width:0}
.gmd-filter-panel{border:1px solid #e7e7e7;background:#fafafa;padding:16px;border-radius:8px}
.gmd-filter-panel h3{font-size:18px;margin:0 0 14px}
.gmd-filter-panel label{display:block;font-size:13px;margin:9px 0}
.gmd-filter-panel input[type=number]{display:block;width:100%;padding:8px;border:1px solid #ddd;border-radius:4px;margin-top:5px}
.gmd-filter-panel fieldset{border:0;border-top:1px solid #ddd;margin:14px 0;padding:10px 0 0;max-height:230px;overflow:auto}
.gmd-filter-panel legend{font-weight:600;font-size:13px;padding-top:9px}
.gmd-filter-panel .gmd-filter-check{display:flex;gap:7px;align-items:center}
.gmd-filter-panel button{background:var(--gmd-accent);color:#fff;border:0;padding:10px 15px;cursor:pointer}
@media(max-width:800px){.gmd-shop-layout{grid-template-columns:1fr}.gmd-site ul.products{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Карточки одинаковой высоты, изображение не обрезается. */
.gmd-shop-results ul.products li.product .woocommerce-loop-product__link{display:block}
.gmd-shop-results ul.products li.product img{height:210px!important;object-fit:contain!important}
.gmd-shop-results ul.products li.product .button{margin-top:auto;align-self:flex-start}
.gmd-shop-results ul.products li.product{min-height:365px}

/* Gidromarket 8.1: compact accordion filters */
.gmd-filter-panel{background:#fff;border:1px solid #e8e5df;border-radius:12px;padding:14px!important}
.gmd-filter-panel h3{margin:0 0 8px;font-size:17px}
.gmd-filter-panel .gmd-filter-section{border:0;border-bottom:1px solid #eee;margin:0;padding:0;max-height:none;overflow:visible}
.gmd-filter-section summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:13px 0;font-weight:600;font-size:13px}
.gmd-filter-section summary::-webkit-details-marker{display:none}
.gmd-filter-section summary:after{content:'+';font-size:20px;font-weight:400;color:#9c835c}
.gmd-filter-section[open] summary:after{content:'−'}
.gmd-filter-section-body{padding:0 0 12px;max-height:235px;overflow:auto}
.gmd-filter-panel .gmd-filter-check{margin:6px 0;display:flex;align-items:center;gap:8px}
.gmd-filter-price{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.gmd-filter-price label{margin:0;font-size:12px}
.gmd-filter-price input[type=number]{min-width:0;width:100%;box-sizing:border-box}
.gmd-filter-actions{display:flex;gap:12px;align-items:center;margin-top:14px;flex-wrap:wrap}
.gmd-filter-actions button{border-radius:7px;flex:1}
.gmd-filter-actions a{font-size:13px}
@media(max-width:767px){.gmd-filter-panel{padding:12px!important}}

/* Gidromarket 9.10: dark outline on product card hover (no layout shift). */
.gmd-site ul.products li.product {
  box-sizing: border-box;
  transition: box-shadow .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .gmd-site ul.products li.product:hover {
    box-shadow: inset 0 0 0 4px #30302c;
    position: relative;
    z-index: 2;
  }
}


/* 9.11 — classic three-column product cards, matching the supplied reference. */
@media (min-width: 1100px) {
  .gmd-site ul.products { grid-template-columns: repeat(3,minmax(0,1fr))!important; gap:18px!important; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .gmd-site ul.products { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
}
.gmd-site ul.products li.product {
  background:#fff!important; border:1px solid #dedede!important; border-radius:0!important;
  padding:0!important; box-shadow:0 1px 7px rgba(0,0,0,.13);
  min-height:0; overflow:visible; position:relative;
}
.gmd-site ul.products li.product .woocommerce-loop-product__link {
  display:flex!important; flex-direction:column; flex:1 1 auto;
  padding:14px 17px 0; text-decoration:none!important; min-width:0;
}
.gmd-site ul.products li.product .woocommerce-loop-product__title {
  order:-2; font-size:16px!important; line-height:1.2!important; font-weight:700!important;
  text-transform:uppercase; color:#171717!important; min-height:40px!important;
  margin:0 0 10px!important; padding:0!important;
}
.gmd-site ul.products li.product .woocommerce-loop-product__link > img,
.gmd-site ul.products li.product .woocommerce-loop-product__link > .attachment-woocommerce_thumbnail {
  order:-1; display:block; width:100%!important; height:290px!important;
  object-fit:contain!important; margin:0 auto 14px!important;
}
.gmd-site ul.products li.product .star-rating { margin:6px 0!important; }
.gmd-site ul.products li.product .price {
  display:block!important; width:calc(100% + 34px); margin:auto -17px 0!important;
  padding:13px 10px 5px!important; border-top:1px solid #d6d6d6;
  text-align:center; color:#317ab8!important; font-size:25px!important;
  line-height:1.25!important; font-weight:700!important;
}
.gmd-site ul.products li.product .price del { font-size:14px; opacity:.65; }
.gmd-site ul.products li.product .price ins { text-decoration:none; }
.gmd-site ul.products li.product > .button,
.gmd-site ul.products li.product > a.added_to_cart {
  align-self:center!important; margin:12px auto 22px!important; padding:14px 20px!important;
  width:min(225px,calc(100% - 34px)); min-height:56px; box-sizing:border-box;
  display:flex!important; align-items:center; justify-content:center;
  text-align:center; background:#347db8!important; border:0!important; border-radius:0!important;
  color:#fff!important; font-size:14px!important; font-weight:700!important;
  text-transform:uppercase; line-height:1.25!important; white-space:normal;
}
.gmd-site ul.products li.product > .button:hover { background:#286b9f!important; }
@media (hover:hover) and (pointer:fine) {
  .gmd-site ul.products li.product:hover {box-shadow:inset 0 0 0 4px #30302c,0 1px 7px rgba(0,0,0,.13)!important;}
}
@media (max-width:699px) {
  .gmd-site ul.products {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .gmd-site ul.products li.product .woocommerce-loop-product__link {padding:10px 10px 0;}
  .gmd-site ul.products li.product .woocommerce-loop-product__title {font-size:12px!important;min-height:45px!important;}
  .gmd-site ul.products li.product .woocommerce-loop-product__link > img {height:165px!important;}
  .gmd-site ul.products li.product .price {width:calc(100% + 20px);margin-left:-10px!important;margin-right:-10px!important;font-size:18px!important;}
  .gmd-site ul.products li.product > .button {font-size:11px!important;min-height:48px;margin-bottom:12px!important;}
}
@media (max-width:380px) { .gmd-site ul.products {grid-template-columns:1fr!important;} }

/* 9.12 — hover border stays inside the card; cart controls never protrude. */
.gmd-site ul.products li.product {
  overflow: hidden!important;
  isolation: isolate;
  box-sizing: border-box!important;
}
.gmd-site ul.products li.product > .button,
.gmd-site ul.products li.product > a.added_to_cart,
.gmd-shop-results ul.products li.product > .button {
  flex: 0 0 auto;
  align-self: center!important;
  max-width: calc(100% - 34px)!important;
  width: min(225px, calc(100% - 34px))!important;
  margin: 12px auto 22px!important;
  box-sizing: border-box!important;
  overflow-wrap: anywhere;
}
/* Draw the outline above the content, not outside the card. */
.gmd-site ul.products li.product::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid transparent;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 10;
  transition: border-color .15s ease;
}
@media (hover:hover) and (pointer:fine) {
  .gmd-site ul.products li.product:hover {
    box-shadow: 0 1px 7px rgba(0,0,0,.13)!important;
  }
  .gmd-site ul.products li.product:hover::after {border-color:#30302c;}
}
@media (max-width:699px) {
  .gmd-site ul.products li.product > .button,
  .gmd-site ul.products li.product > a.added_to_cart {
    max-width:calc(100% - 20px)!important;
    width:min(225px,calc(100% - 20px))!important;
    margin-bottom:12px!important;
  }
}

/* 9.13 — breathing room around catalog cards and the cart/favorite row. */
.gmd-site ul.products li.product {
  box-sizing:border-box!important;
  padding:0!important;
}
.gmd-site ul.products li.product .woocommerce-loop-product__link {
  padding-left:16px!important;
  padding-right:16px!important;
}
.gmd-site ul.products li.product .gmd-catalog-actions {
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  width:auto!important;
  max-width:none!important;
  margin:12px 16px 16px!important;
  padding:0!important;
  box-sizing:border-box!important;
  min-width:0!important;
}
.gmd-site ul.products li.product .gmd-catalog-actions .gmd-catalog-buy,
.gmd-site ul.products li.product .gmd-catalog-actions .button {
  flex:1 1 0!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.gmd-site ul.products li.product .gmd-catalog-actions .gmd-favorite-button {
  flex:0 0 44px!important;
  width:44px!important;
  max-width:44px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
/* When a theme uses a standalone buy button, keep it away from the frame. */
.gmd-site ul.products li.product > .button,
.gmd-site ul.products li.product > a.added_to_cart {
  max-width:calc(100% - 32px)!important;
  width:min(225px,calc(100% - 32px))!important;
}
@media(max-width:699px) {
  .gmd-site ul.products li.product .woocommerce-loop-product__link {
    padding-left:12px!important;
    padding-right:12px!important;
  }
  .gmd-site ul.products li.product .gmd-catalog-actions {
    margin:10px 12px 12px!important;
    gap:6px!important;
  }
  .gmd-site ul.products li.product .gmd-catalog-actions .gmd-favorite-button {
    flex-basis:40px!important;
    width:40px!important;
    max-width:40px!important;
  }
  .gmd-site ul.products li.product > .button,
  .gmd-site ul.products li.product > a.added_to_cart {
    max-width:calc(100% - 24px)!important;
    width:min(225px,calc(100% - 24px))!important;
  }
}

/* 9.19 — recreated from original gidromarket.ru /vanny/ saved st.css.
   Scope strictly to catalog controls; keep WooCommerce filter and ordering handlers. */
.gmd-shop-layout .gmd-filter-panel {
  background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;padding:0 8px!important;
}
.gmd-shop-layout .gmd-filter-panel h3 {
  background:none!important;border:0!important;border-radius:0!important;
  color:var(--gmd-accent,#3377b3)!important;text-transform:uppercase!important;
  font-size:15px!important;font-weight:600!important;padding:0!important;margin:0 0 10px!important;
}
.gmd-shop-layout .gmd-filter-section {
  border:0!important;border-radius:0!important;margin:0 0 14px!important;
  padding:0!important;background:transparent!important;max-height:none!important;overflow:visible!important;
}
.gmd-shop-layout .gmd-filter-section summary {
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;color:#252525!important;font-size:14px!important;
  line-height:1.25!important;text-transform:uppercase!important;font-weight:600!important;
  padding:0!important;margin:0 0 8px!important;min-height:0!important;
}
.gmd-shop-layout .gmd-filter-section summary:after {
  color:#777!important;font-size:14px!important;font-weight:400!important;
}
.gmd-shop-layout .gmd-filter-section-body {
  padding:0 0 3px!important;max-height:240px;overflow:auto;
}
.gmd-shop-layout .gmd-filter-panel label {
  color:#333!important;font-size:12px!important;line-height:1.4!important;
}
.gmd-shop-layout .gmd-filter-panel .gmd-filter-check {
  display:flex!important;align-items:center!important;gap:5px!important;
  padding:0!important;margin:3px 0!important;line-height:1.35!important;
}
/* Original used 21px sprite checkbox.png, with a dark square outline. 
   Recreate its visible frame in CSS without depending on the old JS/sprite. */
.gmd-shop-layout .gmd-filter-panel input[type=checkbox] {
  -webkit-appearance:none!important;appearance:none!important;display:inline-grid!important;
  place-content:center!important;width:16px!important;height:16px!important;
  min-width:16px!important;flex:0 0 16px!important;margin:0!important;
  padding:0!important;background:#fff!important;border:2px solid #363630!important;
  border-radius:0!important;box-shadow:none!important;cursor:pointer!important;
}
.gmd-shop-layout .gmd-filter-panel input[type=checkbox]:checked {
  border-color:#363630!important;background:#fff!important;
}
.gmd-shop-layout .gmd-filter-panel input[type=checkbox]:checked:after {
  content:'✓';color:#363630;font-weight:900;font-size:13px;line-height:12px;
}
.gmd-shop-layout .gmd-filter-panel input[type=checkbox]:focus-visible {
  outline:2px solid var(--gmd-accent,#3377b3)!important;outline-offset:2px!important;
}
/* Original slider-inp: narrow, 1px dark outline, square corners. */
.gmd-shop-layout .gmd-filter-price {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
.gmd-shop-layout .gmd-filter-price label {margin:0!important;font-size:12px!important;}
.gmd-shop-layout .gmd-filter-price input[type=number] {
  width:100%!important;min-width:0!important;height:22px!important;min-height:0!important;
  box-sizing:border-box!important;padding:1px 3px!important;margin:3px 0 0!important;
  font-size:12px!important;border:1px solid #363630!important;border-radius:0!important;
  background:#fff!important;box-shadow:none!important;
}
.gmd-shop-layout .gmd-filter-actions {gap:8px!important;padding:5px 0!important;margin-top:10px!important;}
.gmd-shop-layout .gmd-filter-actions button {
  border:0!important;border-radius:0!important;padding:6px 10px!important;
  background:var(--gmd-accent,#3377b3)!important;color:#fff!important;font-size:12px!important;
}
/* Old sort-panel: white unframed row; compact, rectangular selects with gray outline. */
.gmd-shop-results .woocommerce-ordering {
  float:none!important;display:flex!important;align-items:center!important;gap:9px!important;
  width:100%!important;min-height:0!important;margin:0 0 10px!important;
  padding:2px 0!important;background:transparent!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;
}
.gmd-shop-results .woocommerce-ordering:before {
  content:'Сортировка';font-size:12px;font-weight:400;color:#363630;
}
.gmd-shop-results .woocommerce-ordering select {
  display:inline-block!important;width:auto!important;max-width:100%!important;
  height:29px!important;min-height:29px!important;padding:3px 24px 3px 8px!important;
  border:2px solid #b4b4b4!important;border-radius:0!important;
  background-color:#fff!important;box-shadow:none!important;
  font-size:12px!important;line-height:1.3!important;color:#363630!important;
}
.gmd-shop-results .woocommerce-result-count {float:none!important;font-size:12px!important;}
@media(max-width:767px) {
  .gmd-shop-layout .gmd-filter-panel {padding:0 6px!important;}
  .gmd-shop-results .woocommerce-ordering {flex-wrap:wrap!important;}
}

/* 9.20 — stronger checkbox outlines and original-style dual price handles. */
.gmd-shop-layout .gmd-filter-panel input[type=checkbox] {
 border:3px solid #363630!important;width:18px!important;height:18px!important;
 min-width:18px!important;flex-basis:18px!important;
}
.gmd-shop-layout .gmd-filter-panel input[type=checkbox]:checked:after {font-size:13px!important;line-height:12px!important;}
.gmd-shop-layout .gmd-price-range {
 position:relative;height:27px;margin:8px 2px 5px;touch-action:pan-y;
}
.gmd-shop-layout .gmd-price-track {position:absolute;left:0;right:0;top:12px;height:4px;background:#d3d3d3;border-top:1px solid #999;pointer-events:none;}
.gmd-shop-layout .gmd-price-selected {position:absolute;top:-1px;bottom:-1px;background:var(--gmd-accent,#3377b3);}
.gmd-shop-layout .gmd-price-range input[type=range] {
 position:absolute!important;left:0!important;top:0!important;width:100%!important;height:27px!important;
 padding:0!important;margin:0!important;background:transparent!important;border:0!important;
 pointer-events:none!important;appearance:none!important;-webkit-appearance:none!important;
}
.gmd-shop-layout .gmd-price-range input[type=range]::-webkit-slider-thumb {
 appearance:none;-webkit-appearance:none;pointer-events:auto;width:19px;height:19px;
 border:3px solid #fff;border-radius:50%;background:var(--gmd-accent,#3377b3);
 box-shadow:0 0 0 1px #8c8c8c;cursor:ew-resize;
}
.gmd-shop-layout .gmd-price-range input[type=range]::-moz-range-thumb {
 pointer-events:auto;width:14px;height:14px;border:3px solid #fff;border-radius:50%;
 background:var(--gmd-accent,#3377b3);box-shadow:0 0 0 1px #8c8c8c;cursor:ew-resize;
}
.gmd-shop-layout .gmd-price-range .gmd-price-max {z-index:2;}
.gmd-shop-layout .gmd-price-range .gmd-price-min {z-index:3;}

/* 9.21: original-style quick links, sorting and price slider; scope to catalog. */
.gmd-shop-results .gmd-popular-blocks{margin:0 0 16px;clear:both}
.gmd-shop-results .gmd-popular-block{margin:0 0 10px}
.gmd-shop-results .gmd-popular-block h3{font-size:18px;font-weight:600;line-height:1.25;margin:0 0 8px;color:#222}
.gmd-shop-results .gmd-popular-links{background:#f5f5f5;padding:12px 15px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 16px}
.gmd-shop-results .gmd-popular-links a{font-size:12px;color:#292929;text-decoration:underline;overflow-wrap:break-word}
.gmd-shop-results .gmd-popular-links a:hover{color:var(--gmd-accent,#3377b3)}
.gmd-shop-results .gmd-legacy-sort{clear:both;display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;justify-content:flex-start;margin:8px 0 13px;padding:0;background:transparent;border:0;box-shadow:none}
.gmd-shop-results .gmd-legacy-sort label{font-size:11px;font-weight:400;display:flex;flex-direction:column;gap:3px;color:#333;line-height:1.2}
.gmd-shop-results .gmd-legacy-sort select{border:2px solid #aaa!important;border-radius:0!important;box-shadow:0 0 0 1px #e5e5e5!important;background-color:#fff!important;color:#333!important;font-size:12px!important;height:30px!important;min-height:30px!important;max-width:165px!important;width:auto!important;padding:3px 23px 3px 6px!important}
.gmd-shop-results .gmd-legacy-sort label:last-of-type{margin-left:auto}
.gmd-shop-layout .gmd-price-range{height:33px!important;margin:8px 9px 7px!important}
.gmd-shop-layout .gmd-price-track{height:3px!important;top:14px!important;background:repeating-linear-gradient(to right,#c5c5c5 0 1px,transparent 1px 10px),#eee!important;border-top:1px solid #999!important}
.gmd-shop-layout .gmd-price-selected{background:var(--gmd-accent,#3377b3)!important;height:3px!important;top:-1px!important}
.gmd-shop-layout .gmd-price-range input[type=range]{height:33px!important}
.gmd-shop-layout .gmd-price-range input[type=range]::-webkit-slider-thumb{width:23px!important;height:23px!important;border:2px solid #fff!important;background:var(--gmd-accent,#3377b3)!important;box-shadow:0 0 0 2px #8fb9dc!important;cursor:ew-resize}
.gmd-shop-layout .gmd-price-range input[type=range]::-moz-range-thumb{width:19px!important;height:19px!important;border:2px solid #fff!important;background:var(--gmd-accent,#3377b3)!important;box-shadow:0 0 0 2px #8fb9dc!important;cursor:ew-resize}
@media(max-width:900px){.gmd-shop-results .gmd-popular-links{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.gmd-shop-results .gmd-popular-links{grid-template-columns:repeat(2,minmax(0,1fr))}.gmd-shop-results .gmd-legacy-sort label:last-of-type{margin-left:0}}

/* 9.28: readable mobile catalog cards, full-width actions. */
@media (max-width: 480px) {
  .gmd-site ul.products,
  .gmd-site .woocommerce ul.products,
  .gmd-shop-results ul.products,
  .gmd-product-recommendations ul.products {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
    width:100%!important;
  }
  .gmd-site ul.products li.product {
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  .gmd-site ul.products li.product .woocommerce-loop-product__link {
    padding:16px 16px 0!important;
  }
  .gmd-site ul.products li.product .woocommerce-loop-product__title {
    font-size:15px!important;
    line-height:1.35!important;
    min-height:0!important;
    overflow-wrap:break-word;
    word-break:normal;
  }
  .gmd-site ul.products li.product .woocommerce-loop-product__link > img,
  .gmd-site ul.products li.product img.attachment-woocommerce_thumbnail {
    width:100%!important;
    height:230px!important;
    max-height:230px!important;
    object-fit:contain!important;
  }
  .gmd-site ul.products li.product .price {
    font-size:22px!important;
    width:calc(100% + 32px)!important;
    margin-left:-16px!important;
    margin-right:-16px!important;
  }
  .gmd-site ul.products li.product .gmd-catalog-actions {
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    margin:12px 16px 16px!important;
    gap:10px!important;
    width:auto!important;
  }
  .gmd-site ul.products li.product .gmd-catalog-actions .gmd-catalog-buy,
  .gmd-site ul.products li.product .gmd-catalog-actions .button {
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:none!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    font-size:13px!important;
    padding:10px 12px!important;
  }
  .gmd-site ul.products li.product .gmd-catalog-actions .gmd-favorite-button {
    flex:0 0 44px!important;
    width:44px!important;
    max-width:44px!important;
  }
}
