/* Airgrill2 product card - Figma 141:1323 */
/* light header: см. .ag2-header--light в home.css */

body.tpl-airgrill2.is-product {
  background: #fff;
  color: var(--ag2-text, #282828);
}

.ag2-product-page {
  padding: 24px 0 48px;
}

.ag2-product-page .ag2-breadcrumbs {
  margin-bottom: 24px;
}

.ag2-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ag2-muted, #7a7a7a);
}

/* hero */
.ag2-product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.ag2-product-gallery {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.ag2-product-gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 96px;
  max-height: 540px;
  flex-shrink: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ag2-product-gallery__thumbs:empty,
.ag2-product-gallery.is-single .ag2-product-gallery__thumbs {
  display: none;
}

.ag2-product-gallery__thumb {
  display: block;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 1.5px solid transparent;
  background: var(--ag2-bg-muted, #f7f7f7);
  cursor: pointer;
  overflow: hidden;
}

.ag2-product-gallery__thumb.is-active {
  border-color: var(--ag2-text, #282828);
}

.ag2-product-gallery__thumb img,
.ag2-product-gallery__thumbs > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* сырые img до init JS */
.ag2-product-gallery__thumbs > img {
  width: 96px;
  height: 96px;
  background: var(--ag2-bg-muted, #f7f7f7);
}

.ag2-product-gallery__main {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1 / 1;
  max-width: 540px;
  background: var(--ag2-bg-muted, #f7f7f7);
  overflow: hidden;
}

.ag2-product-gallery__main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ag2-product-info {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}

.ag2-product-info__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ag2-product-info__title,
.ag2-product-info__title a {
  margin: 0;
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
  color: var(--ag2-text, #282828);
  text-decoration: none;
}

.ag2-product-info__desc {
  margin-top: 0;
}

.ag2-product-info__desc,
.ag2-product-info__desc p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ag2-muted, #7a7a7a);
}

/* purchase: cost | time / ctas */
.ag2-product-purchase {
  display: block;
}

.ag2-product-purchase__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

.ag2-product-purchase > .jsPrice,
.ag2-product-purchase .jsJBPrice {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* HikaShop cart btn на PDP */
.ag2-jbprice__cart .hikabtn.hikacart,
.ag2-jbprice__cart .ag2-product-cart-btn,
.ag2-product-purchase__ctas .hikabtn.hikacart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-sizing: border-box !important;
  width: auto !important;
  height: 60px !important;
  min-height: 60px !important;
  padding: 16px 32px 16px 24px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ag2-accent, #ff6123) !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 28px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  text-decoration: none !important;
  cursor: pointer;
}

/* hikashop button layout оборачивает контент в span */
.ag2-jbprice__cart .hikabtn.hikacart > span,
.ag2-product-cart-btn > span {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  line-height: 28px;
}

.ag2-jbprice__cart .hikabtn.hikacart:hover,
.ag2-jbprice__cart .ag2-product-cart-btn:hover {
  background: var(--ag2-accent-hover, #e8561c) !important;
  color: #fff !important;
}

.ag2-jbprice__cart .hikabtn.hikacart img,
.ag2-product-cart-btn img {
  width: 24px;
  height: 24px;
  /* icon-cart-btn.svg уже белый */
}

.ag2-product-price {
  color: var(--ag2-accent, #ff6123);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.ag2-product-price-old {
  color: var(--ag2-muted, #7a7a7a);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  text-decoration: line-through;
}

.ag2-product-purchase .hikashop_product_quantity_field,
.ag2-product-purchase .hikashop_product_stock_count {
  display: none !important;
}

.ag2-product-purchase__variants {
  grid-column: 1 / -1;
}

.ag2-product-purchase__fallback {
  display: block;
}

.ag2-product-purchase__cost,
.ag2-product-purchase__time {
  width: 268px;
  max-width: 100%;
  flex: 0 0 auto;
}

.ag2-product-purchase__ctas {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.ag2-product-purchase__time-value {
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  color: var(--ag2-text, #282828);
}

.ag2-product-purchase__ctas .ag2-jbprice__ctas {
  display: contents;
}

.ag2-jbprice {
  display: block;
}

.ag2-jbprice__cost .ag2-label,
.ag2-product-purchase__cost .ag2-label {
  display: block;
}

.ag2-jbprice__amount {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--ag2-accent, #ff6123);
}

.ag2-jbprice__amount .jbprice-value-total,
.ag2-jbprice__amount .jbcurrency-value,
.ag2-jbprice__amount .jbcurrency-symbol,
.ag2-jbprice__amount .jsMoney {
  color: var(--ag2-accent, #ff6123);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.ag2-jbprice__amount .jbprice-value-price,
.ag2-jbprice__amount .jbprice-price-old,
.ag2-jbprice__amount .price-old,
.ag2-jbprice__amount .oldprice,
.ag2-jbprice__amount del,
.ag2-jbprice__amount s {
  color: var(--ag2-muted, #7a7a7a) !important;
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 400 !important;
  text-decoration: line-through;
}

.ag2-jbprice__cart {
  flex: 0 0 auto;
}

.ag2-jbprice__cart .jsAddToCart,
.ag2-jbprice__cart .uk-button,
.ag2-jbprice__cart .jbzoo .uk-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: auto !important;
  min-height: 60px;
  padding: 16px 32px 16px 24px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ag2-accent, #ff6123) !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 28px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  cursor: pointer;
}

.ag2-jbprice__cart .jsAddToCart:hover,
.ag2-jbprice__cart .uk-button:hover {
  background: var(--ag2-accent-hover, #e8561c) !important;
  color: #fff !important;
}

.ag2-jbprice__cart svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  color: #fff;
}

.ag2-jbprice__ask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 60px;
  min-height: 60px;
  padding: 16px 32px;
  background: var(--ag2-bg-muted, #f7f7f7);
  color: var(--ag2-text, #282828);
  font-size: 18px;
  line-height: 28px;
  text-decoration: none;
  white-space: nowrap;
}

.ag2-jbprice__ask:hover {
  background: var(--ag2-line, #e0e0e0);
  color: var(--ag2-text, #282828);
  text-decoration: none;
}

/* tabs */
.ag2-product-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--ag2-line, #e0e0e0);
  margin-bottom: 48px;
}

.ag2-product-tabs__tab {
  appearance: none;
  border: 0;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  padding: 0 24px 12px;
  background: transparent;
  color: var(--ag2-muted, #7a7a7a);
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  cursor: pointer;
}

.ag2-product-tabs__tab.is-active {
  color: var(--ag2-text, #282828);
  border-bottom-color: var(--ag2-text, #282828);
}

.ag2-product-tabs__panel[hidden] {
  display: none !important;
}

.ag2-product-specs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.ag2-product-specs__table {
  display: flex;
  flex-direction: column;
}

.ag2-product-specs__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 24px;
}

.ag2-product-specs__row.is-alt {
  background: var(--ag2-bg-muted, #f7f7f7);
}

.ag2-product-specs__key {
  color: var(--ag2-muted, #7a7a7a);
}

.ag2-product-specs__val {
  color: var(--ag2-text, #282828);
}

.ag2-product-specs__adv {
  padding: 10px 12px;
  background: var(--ag2-bg-muted, #f7f7f7);
}

.ag2-product-specs__adv ul {
  margin: 0;
  padding-left: 1.1em;
  list-style: disc;
}

.ag2-product-specs__adv li {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--ag2-text, #282828);
}

.ag2-product-specs__adv li:last-child {
  margin-bottom: 0;
}

.ag2-product-empty {
  margin: 0;
  color: var(--ag2-muted, #7a7a7a);
  font-size: 16px;
  line-height: 24px;
}

.ag2-product-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.ag2-product-media-grid img,
.ag2-product-media-grid .jbimage {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ag2-bg-muted, #f7f7f7);
}

.ag2-product-related {
  display: block;
  width: 100%;
}

.ag2-product-related h2,
.ag2-product-related .hikashop_category_information > h1,
.ag2-product-related .hikashop_products_pagination,
.ag2-product-related .hikashop_results,
.ag2-product-related .hikashop_product_list_description,
.ag2-product-related .hikashop_checkout_loading_elem,
.ag2-product-related .hikashop_checkout_loading_spinner {
  display: none !important;
}

/* не делать grid на обёртках - иначе 4 колонки схлопывают ряд */
.ag2-product-related .hikashop_products_listing,
.ag2-product-related .hikashop_products {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ag2-product-related .hk-row-fluid,
.ag2-product-related [data-ag2-product-grid] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  width: 100% !important;
}

/* сетка: сбрасываем float/width HikaShop, но не ломаем flex-рост карточки */
.ag2-product-related .hikashop_product,
.ag2-product-related .hikashop_container,
.ag2-product-related .hikashop_subcontainer,
.ag2-product-related [class*="hkc-md-"],
.ag2-product-related [class*="hkc-"] {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  box-sizing: border-box !important;
  grid-column: auto / span 1 !important;
}

/* equal-height: колонка тянется на высоту ряда */
.ag2-product-related .hk-row-fluid > [class*="hkc-"],
.ag2-product-related .hikashop_product {
  display: flex !important;
  flex-direction: column;
  align-self: stretch;
  height: 100% !important;
}

.ag2-product-related .hikashop_container,
.ag2-product-related .hikashop_subcontainer {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* глушим JS equal-height (min-height), тянем через flex */
.ag2-product-related .hikashop_subcontainer[style*="min-height"] {
  min-height: 0 !important;
}

/* карточка + body на всю высоту; цена прижата к кнопке снизу */
.ag2-product-related .ag2-product-card,
.ag2-product-related .hikashop_listing_img_title.ag2-product-card {
  display: flex !important;
  flex-direction: column;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  float: none !important;
}

.ag2-product-related .ag2-product-card__body {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column;
  min-height: 0;
}

.ag2-product-related .ag2-product-card__prices {
  margin-top: auto !important;
}

.ag2-product-related .ag2-product-card__cart-wrap {
  margin-top: 0 !important;
}

.ag2-product-related .ag2-product-card__body:not(:has(.ag2-product-card__prices)) .ag2-product-card__cart-wrap {
  margin-top: auto !important;
}

@media (max-width: 1199px) {
  .ag2-product-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ag2-product-gallery__main {
    max-width: none;
  }

  .ag2-product-specs,
  .ag2-product-related,
  .ag2-product-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ag2-product-page {
    padding: 16px 0 32px;
  }

  .ag2-product-info__title,
  .ag2-product-info__title a {
    font-size: 28px;
    line-height: 36px;
  }

  .ag2-product-purchase__grid {
    flex-direction: column;
  }

  .ag2-product-purchase__cost,
  .ag2-product-purchase__time {
    width: 100%;
  }

  .ag2-product-purchase__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .ag2-jbprice__ask,
  .ag2-jbprice__cart .jsAddToCart,
  .ag2-jbprice__cart .uk-button,
  .ag2-jbprice__cart .hikabtn.hikacart,
  .ag2-product-cart-btn {
    width: 100% !important;
  }

  .ag2-product-gallery__thumbs {
    width: 72px;
  }

  .ag2-product-gallery__thumb,
  .ag2-product-gallery__thumbs > img {
    width: 72px;
    height: 72px;
  }

  .ag2-product-specs,
  .ag2-product-related,
  .ag2-product-media-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ag2-product-tabs__tab {
    padding: 0 12px 12px;
    font-size: 14px;
  }
}
