.xport-product-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
  row-gap:28px;
}

.xport-product-card{
  --xport-product-card-title-weight:600;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#fff;
  border:1px solid #e6ebf2;
  border-radius:20px;
  padding:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.045);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.xport-product-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 44px rgba(15,23,42,.075);
  border-color:#dbe4ee;
}

.xport-product-card__image-link{
  display:flex;
  align-items:center;
  justify-content:center;
  height:180px;
  margin:0 0 16px;
  text-decoration:none;
}

.xport-product-card__image{
  display:block;
  width:100%;
  max-width:190px;
  height:170px;
  object-fit:contain;
  object-position:center;
}

.xport-product-card__title{
  display:block;
  min-height:44px;
  color:#111827!important;
  font-size:16px;
  line-height:1.28;
  font-weight:var(--xport-product-card-title-weight,600);
  text-decoration:none!important;
  margin:0 0 14px;
}

.xport-product-card__price{
  margin:auto 0 14px;
  color:#0f172a;
  font-size:22px;
  line-height:1.15;
  font-weight:700;
  letter-spacing:-.02em;
}

.xport-product-card__price *,
.xport-product-card__price .woocommerce-Price-amount,
.xport-product-card__price bdi{
  color:inherit!important;
  font:inherit!important;
  letter-spacing:inherit!important;
}

.xport-product-card__actions{
  box-sizing:border-box;
  display:grid;
  grid-template-columns:80px minmax(0,1fr);
  column-gap:8px;
  align-items:center;
  width:calc(100% + 20px);
  max-width:calc(100% + 20px);
  margin-left:-10px;
  margin-right:-10px;
}

.xport-product-card__buy,
.xport-product-card__quick{
  box-sizing:border-box;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px;
  width:100%;
  min-width:0;
  max-width:100%;
  height:36px;
  min-height:36px;
  max-height:36px;
  padding:0 8px;
  border-radius:10px;
  font-family:inherit;
  font-size:11.5px;
  line-height:1;
  font-weight:700;
  letter-spacing:0;
  white-space:nowrap;
  text-align:center;
  text-decoration:none!important;
  box-shadow:none!important;
  overflow:hidden;
}

.xport-product-card__buy{
  background:#26b24a!important;
  border:1px solid #26b24a!important;
  color:#fff!important;
}

.xport-product-card__buy:hover{
  background:#209d40!important;
  border-color:#209d40!important;
  color:#fff!important;
  box-shadow:none!important;
}

.xport-product-card__quick{
  background:#f7f8fa!important;
  border:1px solid #e7e9ee!important;
  color:#111827!important;
}

.xport-product-card__quick:hover{
  background:#eefbf2!important;
  border-color:#d8efe0!important;
  color:#14883a!important;
}

.xport-product-card__buy::before,
.xport-product-card__quick::before{
  content:"";
  display:block;
  flex:0 0 11px;
  width:11px;
  height:11px;
  margin:0;
  background:currentColor;
}

.xport-product-card__buy::before{
  position:relative;
  top:-2px;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M3 4h2.5l2.8 12h9.5l2.7-8.5H7.1'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M3 4h2.5l2.8 12h9.5l2.7-8.5H7.1'/%3E%3C/svg%3E") center/contain no-repeat;
}

.xport-product-card__quick::before{
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 10-13h-7l1-7Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 10-13h-7l1-7Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

@media (min-width:1181px){
  .xport-product-card-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .xport-product-card__actions{
    width:calc(100% + 16px);
    max-width:calc(100% + 16px);
    margin-left:-8px;
    margin-right:-8px;
  }
}

@media (max-width:767px){
  .xport-product-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    row-gap:10px;
  }

  .xport-product-card{
    border-radius:16px;
    padding:14px 13px;
  }

  .xport-product-card__image-link{
    height:132px;
    margin-bottom:12px;
    overflow:hidden;
  }

  .xport-product-card__image{
    width:100%!important;
    max-width:145px!important;
    height:128px!important;
    max-height:128px!important;
  }

  .xport-product-card__title{
    min-height:52px;
    font-size:13px;
    line-height:1.2;
    margin-bottom:12px;
  }

  .xport-product-card__price{
    font-size:20px;
    margin-bottom:12px;
  }

  .xport-product-card__actions{
    display:flex;
    flex-direction:column;
    gap:7px;
    width:100%;
    max-width:100%;
    margin-left:0;
    margin-right:0;
  }

}

/* ===================== XPORT PRODUCT CARD LANDING GRID ONLY ===================== */

/*
 * Для Landing задаются только сетка и внешний отступ.
 * Внутренности карточки берутся из общего канонического контракта ниже.
 */

.xport-product-card-grid--landing-popular{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:16px!important;
  row-gap:18px!important;
  align-items:stretch!important;
}

.xpls-products-wrap .xport-product-card-grid--landing-popular,
.xpls-products-head-with-refresh + .xport-product-card-grid--landing-popular,
.xpls-products-head + .xport-product-card-grid--landing-popular{
  margin-top:22px!important;
}

@media (min-width:768px) and (max-width:1180px){
  .xport-product-card-grid--landing-popular{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:16px!important;
    row-gap:18px!important;
  }
}

@media (max-width:767px){
  .xport-product-card-grid--landing-popular{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    row-gap:10px!important;
  }

  .xpls-products-wrap .xport-product-card-grid--landing-popular{
    margin-top:16px!important;
  }
}

/* Mobile cards: clean surface without dirty outer shadow */
@media (max-width:767px){
  .xport-product-card-grid--catalog .xport-product-card{
    box-shadow:none!important;
  }

  .xport-product-card-grid--catalog .xport-product-card:hover{
    box-shadow:none!important;
  }
}

/* XPORT GLOBAL DESKTOP CARD CONTRACT START */
@media (min-width:768px){

  /*
   * Единая внутренняя геометрия карточки.
   * Сетки, колонки и фильтры остаются во владении своих движков.
   */
  .xport-product-card-grid .xport-product-card,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card{
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-rows:168px 54px minmax(0,1fr) 36px!important;
    align-content:start!important;
    width:100%!important;
    min-width:0!important;
    height:356px!important;
    min-height:356px!important;
    max-height:356px!important;
    padding:16px!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }

  .xport-product-card-grid .xport-product-card__image-link,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card__image-link,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card__image-link{
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:168px!important;
    margin:0!important;
  }

  .xport-product-card-grid .xport-product-card__image,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card__image,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card__image{
    display:block!important;
    width:100%!important;
    max-width:176px!important;
    height:160px!important;
    max-height:160px!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto!important;
  }

  .xport-product-card-grid .xport-product-card__title,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card__title,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card__title{
    box-sizing:border-box!important;
    display:-webkit-box!important;
    width:100%!important;
    min-width:0!important;
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;
    margin:0 0 10px!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    font-size:13px!important;
    line-height:1.26!important;
    font-weight:600!important;
  }

  .xport-product-card-grid .xport-product-card__price,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card__price,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card__price{
    align-self:end!important;
    margin:0 0 12px!important;
    font-size:21px!important;
    line-height:1.15!important;
  }

  .xport-product-card-grid .xport-product-card__actions,
  .xport-product-card-grid.xport-product-card-grid--catalog .xport-product-card__actions,
  .xport-product-card-grid.xport-product-card-grid--landing-popular .xport-product-card__actions{
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(72px,82px) minmax(0,118px)!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:208px!important;
    height:36px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  .xport-product-card-grid .xport-product-card__buy,
  .xport-product-card-grid .xport-product-card__quick{
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0 6px!important;
    font-family:inherit!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:600!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
}
/* XPORT GLOBAL DESKTOP CARD CONTRACT END */

/* XPORT MOBILE ACTIONS FIT START */
@media (max-width:767px){
  .xport-product-card__actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  .xport-product-card__buy,
  .xport-product-card__quick{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;
    padding:0 6px!important;
    margin:0!important;
    box-sizing:border-box!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    font-family:inherit!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:600!important;
  }

  .xport-product-card__quick{
    gap:4px!important;
  }

  .xport-product-card__quick::before,
  .xport-product-card__buy::before{
    flex:0 0 auto!important;
    margin:0!important;
    line-height:1!important;
  }
}
/* XPORT MOBILE ACTIONS FIT END */

/* XPORT LANDING POPULAR DYNAMIC COUNT START */

/*
 * Desktop / window:
 * один полный ряд из 3, 4, 5 или 6 карточек.
 *
 * Карточка всегда остаётся шириной 238px.
 * Загружены всегда все 6 товаров, лишние только скрываются.
 *
 * Mobile <=767px этим контрактом не изменяется.
 */
@media (min-width:768px){
  .xport-product-card-grid--landing-popular{
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    justify-content:center!important;
    align-items:stretch!important;

    column-gap:16px!important;
    row-gap:18px!important;
  }

  .xport-product-card-grid--landing-popular
  > .xport-product-card{
    width:238px!important;
    min-width:238px!important;
    max-width:238px!important;
  }

  .xport-product-card-grid--landing-popular.xpls-count-3{
    grid-template-columns:repeat(3,238px)!important;
  }

  .xport-product-card-grid--landing-popular.xpls-count-4{
    grid-template-columns:repeat(4,238px)!important;
  }

  .xport-product-card-grid--landing-popular.xpls-count-5{
    grid-template-columns:repeat(5,238px)!important;
  }

  .xport-product-card-grid--landing-popular.xpls-count-6{
    grid-template-columns:repeat(6,238px)!important;
  }

  .xport-product-card-grid--landing-popular.xpls-count-3
  > .xport-product-card:nth-child(n+4),

  .xport-product-card-grid--landing-popular.xpls-count-4
  > .xport-product-card:nth-child(n+5),

  .xport-product-card-grid--landing-popular.xpls-count-5
  > .xport-product-card:nth-child(n+6){
    display:none!important;
  }
}

/* XPORT LANDING POPULAR DYNAMIC COUNT END */
