/* Табы */
.hm-tabs {
  display: flex;
  gap: 16px;
  margin: 20px 0 10px;
}

.hm-tab {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #6ea25b;
  color: #295c1d;
  background: #f3f0df;
  font-weight: 800;
  text-decoration: none;
}

.hm-tab>span {
  font-weight: 700;
  font-size: 14px;
  opacity: .85;
}

.hm-tab.is-active {
  background: #6ea25b;
  color: #fff;
  border-color: #6ea25b;
}

/* Двухколоночный макет */
.mnm_form.cart.cart_group {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 3rem;
  align-items: start;
}

.mnm_form .mnm_child_products {
  grid-column: 1;
}

.mnm_form .mnm_status,
.mnm_form .add_to_cart_button_wrap {
  grid-column: 2;
}

.mnm_form .mnm_status {
  position: sticky;
  top: 10rem;
}

.mnm_form .mnm_status:before {
  content: 'ВИ ДОДАЛИ:';
  display: block;
  font-weight: 400;
  font-family: "BebasNeueUa", "Sans-serif";
  font-size: 50px;
  line-height: 43.75px;
  letter-spacing: .28px;
}

/* HM статус: стилизация списка, суммы и ограничений */
.mnm_form .mnm_status.hm-status .mnm_message_content {
  list-style: none;
  margin: 8px 0 12px 0;
  padding: 0;
  border-top: 1px solid #BFB293;
}

.mnm_form .mnm_status.hm-status .mnm_message_content li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #E2DDCC;
}

.mnm_form .mnm_status.hm-status .mnm_message_content li a {
  display: none !important;
}

/* Линии товаров */
.mnm_form .mnm_status.hm-status .hm-line-items {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
}

.mnm_form .mnm_status.hm-status .hm-line-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #BFB293;
}


/* Сумма и подпись */
.mnm_form .mnm_status.hm-status .hm-total-label {
  font-family: 'Geologica';
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: .28px;
}

.mnm_form .mnm_status.hm-status .hm-total-amount {
  font-family: 'Geologica';
  font-weight: 700;
  font-size: 31px;
  color: #7C9E4C;
  line-height: 100%;
  letter-spacing: .28px;
  margin: 6px 0 10px 0;
}

.mnm_form .mnm_status.hm-status .hm-note {
  font-family: 'Geologica';
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  margin: 4px 0 10px 0;
}

.mnm_form .mnm_status.hm-status .hm-limits {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  margin-top: 10px;
  font-weight: 700;
  color: #21480E;
  clear: both;
  /* размещать под плавающими элементами */
  width: 100%;
}

/* Кнопка сброса внутри статуса */
.mnm_form .mnm_status.hm-status .mnm_reset.hm-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px 0 !important;
  padding: 12px 20px;
  width: 100%;
  border: 2px #21480E solid;
  border-radius: 8px;
  background: transparent;
  color: #21480E;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  float: none !important;
}

/* Кнопка добавления контейнера: 65% opacity #21480E */
/* 65% непрозрачности ~ rgba(33,72,14,0.65) => #21480EA6 */
.mnm_form .mnm_status.hm-status .single_add_to_cart_button.hm-submit {
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
  height: 48px;
  border-radius: 8px;
  font-weight: 700;
  background: #21480E;
  color: #F0E8D5;
  text-transform: uppercase;
  letter-spacing: .02em;
  float: none !important;
}

/* Стили для дропдауна тарифов */
.hm-subscription-rate-selector {
  margin-top: 15px;
}

.hm-subscription-rate-selector label {
  display: block;
  font-family: 'Geologica';
  font-weight: 600;
  font-size: 16px;
  color: #4a5c2a;
  margin-bottom: 8px;
}

.hm-subscription-rate-selector select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #BFB293;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #4a5c2a;
  font-family: 'Geologica';
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.hm-subscription-rate-selector select:focus {
  outline: none;
  border-color: #7C9E4C;
  box-shadow: 0 0 0 3px rgba(124, 158, 76, 0.1);
}

.hm-subscription-rate-selector select option {
  padding: 8px;
  font-weight: 500;
}

/* Скрываем кнопку "Добавить Хмельбокс" когда есть подписки */
.mnm_form .mnm_status.hm-status:has(.hm-subscription-integrated) .single_add_to_cart_button.hm-submit {
  display: none !important;
}

/* Альтернативный способ скрытия кнопки для браузеров без поддержки :has() */
.mnm_form .mnm_status.hm-status .hm-subscription-integrated ~ .single_add_to_cart_button.hm-submit {
  display: none !important;
}

/* Скрываем оригинальные радио-кнопки когда есть дропдаун */
.hm-subscription-integrated .hm-subscription-rate-selector ~ .wcsatt-options-product {
  display: none !important;
}

.mnm_form .mnm_message {
  display: none !important;
}

.mnm_form .mnm_message_content {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mnm_form .mnm_message_content li {
  margin: 0 0 8px 0;
  padding: 0;
}

.mnm_form .mnm_price {
  display: block !important;
  margin: 8px 0 16px 0;
  font-weight: 700;
  font-size: 24px;
}

.mnm_form .add_to_cart_button_wrap {
  position: sticky;
  top: 140px;
}

.mnm_form .add_to_cart_button_wrap .single_add_to_cart_button {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  background: #1c5a10;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Карточки */
.mnm_form.layout_grid .products {
  row-gap: 3rem;
  column-gap: 3rem;
}

.mnm_form.layout_grid .products .product {
  display: flex;
  flex-direction: column;
}

.mnm_form.layout_grid .products .product .mnm_image {
  margin-bottom: 12px;
  text-align: center;
}

.mnm_form.layout_grid .products .product .price {
  font-weight: 700;
}

/* Количество: режим один большой + до добавления */
.mnm_form .product-quantity.is-empty .quantity {
  display: none !important;
}

.mnm_form .product-quantity .mnm-add-once {
  display: none;
  padding: 10px 20px 10px 20px;
  width: 100%;
  border-radius: 10px;
  background: #21480E;
  color: #fff;
  font-weight: 700;
  font-size: 0;
  /* прячем текст "+" */
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mnm_form .product-quantity .mnm-add-once::before {
  content: "";
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center / contain;
  display: inline-block;
}

.mnm_form .product-quantity.is-empty .mnm-add-once {
  display: flex;
}

.mnm_form .product-quantity.is-empty .mnm-add-once {
  display: block;
}


/* Базовая стилизация -/+ и qty */
.mnm_form .product-quantity .minus,
.mnm_form .product-quantity .plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  border: 2px solid #7C9E4C;
  border-radius: 10px;
  color: #7C9E4C;
  background: transparent;
  font-size: 0;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.mnm_form .product-quantity .minus::before {
  content: "−";
  font-size: 28px;
  font-weight: 800;
}

.mnm_form .product-quantity .plus::before {
  content: "+";
  font-size: 28px;
  font-weight: 800;
}

.mnm_form .product-quantity .minus:hover,
.mnm_form .product-quantity .plus:hover {
  background: rgba(110, 162, 91, .1);
}

.js .mnm_form.has-plus-minus-buttons .product-quantity .qty,
.woocommerce-js .mnm_form.has-plus-minus-buttons .product-quantity .qty {
  width: 44px;
  height: 44px;
  border: 2px solid #6ea25b;
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
  color: #295c1d;
}

.mnm_form.layout_grid.has-center-aligned-quantity .product-quantity .quantity {
  margin: 0;
}

/* Выравнивание группы - qty + */
.mnm_form .product-quantity .quantity {
  display: inline-flex !important;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

/* Размер и отступы минус/плюс вокруг input */
.mnm_form .product-quantity .quantity .minus,
.mnm_form .product-quantity .quantity .plus {
  margin: 0;
}




/* Число без рамок/фона, как текст между кнопками */
.woocommerce-js .mnm_form.cart.cart_group .product-quantity .quantity .qty,
.js .mnm_form.has-plus-minus-buttons .product-quantity .quantity .qty {
  width: auto !important;
  min-width: 20px;
  height: auto;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: #7C9E4C;
}

.woocommerce-js .mnm_form.cart.cart_group .product-quantity .quantity {
  margin: 0 !important;
  float: none !important;
  width: 100%;
}

.woocommerce-js div.product p.ast-stock-detail {
  margin: 0 !important;
}

/* Отключаем зум/клик на изображениях внутри MNM карточек */
.mnm_form .mnm_child_product_images .zoom {
  pointer-events: none;
}

.mnm_form .mnm_child_product_images img {
  cursor: default !important;
}

/* Скрыть системный блок ошибок в карточке */
.mnm_form .wc_mnm_child_item_error {
  display: none !important;
  visibility: hidden;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Адаптив */
@media (max-width: 992px) {
  .mnm_form.cart.cart_group {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mnm_form .mnm_status,
  .mnm_form .add_to_cart_button_wrap {
    grid-column: 1;
    position: static;
  }
}

/* ==========================
   Горизонтальная карточка как в референсе
   ========================== */
.mnm_form.layout_grid .products .product.mnm_item {
  align-items: center;
  gap: 1rem;
  margin: 0;
}

.mnm_form.layout_grid .products .product.mnm_item .product-thumbnail {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
}

.mnm_form.layout_grid .products .product.mnm_item .product-thumbnail .mnm_child_product_images,
.mnm_form.layout_grid .products .product.mnm_item .product-thumbnail img {
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 10px;
  box-shadow: none;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  border: 0;
  flex-direction: column;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details .woocommerce-loop-product__title,
.mnm_form.layout_grid .products .product.mnm_item .product-details .woocommerce-loop-product__title .hm-volume {
  display: flex;
  gap: 1rem;
  margin: 0;
  font-family: 'Geologica';
  font-weight: 700;
  line-height: 22px;
  font-size: 18px;
  letter-spacing: 0.28px;
  text-transform: none;
  flex-direction: row;
  justify-content: space-between;
}



.mnm_form.layout_grid .products .product.mnm_item .woocommerce-product-details__short-description {
  /* margin: 0 0 8px 0; */
  color: #21480E;
  opacity: .85;
  font-weight: 300;
  font-size: 14px;
  line-height: 24.5px;
  font-family: 'Geologica';
}

.mnm_form.layout_grid .products .product.mnm_item .price span {
  font-family: 'Geologica';
  font-weight: 700;
  font-size: 22px !important;
  line-height: 35px;
  letter-spacing: 0.28px;
  color: #7C9E4C;
}

.mnm_form.layout_grid .products .product.mnm_item .product-quantity {
  grid-column: 2;
  grid-row: 3;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details .hm-card-foot {
  margin-top: 10px;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details .hm-card-foot .ast-stock-detail,
.mnm_form.layout_grid .products .product.mnm_item .product-details .hm-card-foot .stock {
  display: block;
  margin: 4px 0 0 0;
  font-family: 'Geologica';
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details .hm-card-foot .stock.in-stock {
  color: #21480E;
}

.mnm_form.layout_grid .products .product.mnm_item .product-details .hm-card-foot .stock.out-of-stock {
  color: #9b9b9b;
}


/* HERO header */
.hm-hero {
  margin: 20px 0 24px;
}

.hm-hero-title {
  font-family: "BebasNeueUa", "Sans-serif";
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  color: #21480E;
  margin: 0 0 48px 0;
}

.hm-hero-title span {
  color: #85A75F;
}

.hm-hero-tabs {
  display: flex;
  gap: 16px;
}

.hm-hero-tab {
  text-decoration: none;
}

.hm-hero-tab .hm-hero-tab-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid #7C9E4C;
  color: #21480E;
  background: #F0E8D5;
}

.hm-hero-tab .hm-hero-media {
  display: flex;
  gap: 6px;
}

.hm-hero-tab .hm-hero-media img {
  width: 5rem;
  height: 5rem;
  box-shadow: none;
  border-radius: 10px;
  object-fit: cover;
}

.hm-hero-tab .hm-hero-label {
  font-weight: 700;
}

/* Активный таб в hero */
.hm-hero-tab.is-active .hm-hero-tab-inner {
  background: #7C9E4C;
  border-color: #7C9E4C;
  color: #F0E8D5;
}
.hm-hero-tab.is-active .hm-hero-label { color: #F0E8D5; }

/* Фолбэк: скрыть заголовок/цену/описание в summary для страниц MNM */
.single-product .summary .product_title,
.single-product .summary .price,
.single-product .summary .woocommerce-product-details__short-description {
  display: none !important;
}


/* <= 921px: держим 2 колонки */
@media (max-width: 921px) {
  .mnm_form .mnm_child_products.products.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* <= 544px: одна колонка */
@media (max-width: 544px) {
  .mnm_form .mnm_child_products.products.grid {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* Мобильная фиксация: карточка в одну колонку, количество на всю ширину */
@media (max-width: 680px) {
  .mnm_form.layout_grid .products .product.mnm_item {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
  }

  .mnm_form.layout_grid .products .product.mnm_item .product-thumbnail,
  .mnm_form.layout_grid .products .product.mnm_item .product-details,
  .mnm_form.layout_grid .products .product.mnm_item .product-quantity {
    grid-column: 1 / -1;
  }

  .mnm_form.layout_grid .products .product.mnm_item .product-thumbnail {
    grid-row: 1;
  }

  .mnm_form.layout_grid .products .product.mnm_item .product-details {
    grid-row: 2;
  }

  .mnm_form.layout_grid .products .product.mnm_item .product-quantity {
    grid-row: 3;
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 1025px) {
  .hm-hero-tabs {
    justify-content: space-between;
  }

  .hm-hero-tab {
    width: 100%;
  }

  .hm-hero-tab .hm-hero-tab-inner {
    width: 100%;
  }
}


@media (max-width: 680px) {
  .hm-hero-tabs {
    flex-direction: column;
  }
}

/* Стили для подписки - используем оригинальные WCS ATT стили без кастомизации */

/* Стили для disabled состояния subscription элементов */
.wcsatt-options-wrapper.hm-integrated.hm-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.wcsatt-options-wrapper.hm-integrated.hm-disabled .wcsatt-options-prompt-label {
  cursor: not-allowed;
  color: #999;
}

.wcsatt-options-wrapper.hm-integrated.hm-disabled .wcsatt-options-product-dropdown {
  cursor: not-allowed;
  background-color: #f5f5f5;
  color: #999;
}

/* Скрываем оригинальный dropdown в области radio кнопок */
.wcsatt-options-wrapper .wcsatt-options-product-wrapper {
  display: none !important;
}

/* Перемещенный dropdown скрыт по умолчанию */
.mnm_price .wcsatt-options-product-wrapper.hm-moved-dropdown {
  display: none !important;
}

/* Показываем перемещенный dropdown когда добавлен класс show-dropdown */
.mnm_price .wcsatt-options-product-wrapper.hm-moved-dropdown.show-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: 10px;
  width: 100%;
}

/* Стили для перемещенного dropdown */
.mnm_price .hm-moved-dropdown .wcsatt-options-product-dropdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px 0 !important;
    text-align: center;
    width: 100%;
    border: 2px #21480E solid;
    height: 48px;
    border-radius: 8px;
    background: transparent;
    color: #21480E;
    font-weight: 700;
    letter-spacing: .02em;
    float: none !important;
    margin: 0 !important;
}

.mnm_price .hm-moved-dropdown .wcsatt-options-product-dropdown:hover {
  border-color: #7C9E4C;
  background-color: #f9f7f0;
}

.mnm_price .hm-moved-dropdown .wcsatt-options-product-dropdown:focus {
  outline: none;
  border-color: #7C9E4C;
  box-shadow: 0 0 0 3px rgba(124, 158, 76, 0.1);
  background-color: #fff;
}

.mnm_price .hm-moved-dropdown .wcsatt-options-product-dropdown option {
  padding: 12px 15px;
  font-weight: 500;
  color: #4a5c2a;
  background: #fff;
  border: none;
}

.mnm_price .hm-moved-dropdown .wcsatt-options-product-dropdown option:hover {
  background-color: #f9f7f0;
}

/* Стили для всех dropdown селектов */
.wcsatt-options-product-dropdown,
.mnm_status .wcsatt-options-product-dropdown,
.wcsatt-options-wrapper .wcsatt-options-product-dropdown,
.hm-custom .wcsatt-options-product-dropdown {
  width: 100% !important;
  padding: 12px 15px !important;
  border: 2px solid #BFB293 !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 14px !important;
  color: #4a5c2a !important;
  font-family: 'Geologica', sans-serif !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5c2a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  margin: 0 !important;
  height: auto !important;
  display: block !important;
  text-align: left !important;
  float: none !important;
}

.wcsatt-options-product-dropdown:hover,
.mnm_status .wcsatt-options-product-dropdown:hover,
.wcsatt-options-wrapper .wcsatt-options-product-dropdown:hover,
.hm-custom .wcsatt-options-product-dropdown:hover {
  border-color: #7C9E4C !important;
  background-color: #f9f7f0 !important;
}

.wcsatt-options-product-dropdown:focus,
.mnm_status .wcsatt-options-product-dropdown:focus,
.wcsatt-options-wrapper .wcsatt-options-product-dropdown:focus,
.hm-custom .wcsatt-options-product-dropdown:focus {
  outline: none !important;
  border-color: #7C9E4C !important;
  box-shadow: 0 0 0 3px rgba(124, 158, 76, 0.1) !important;
  background-color: #fff !important;
}

.wcsatt-options-product-dropdown option,
.mnm_status .wcsatt-options-product-dropdown option,
.wcsatt-options-wrapper .wcsatt-options-product-dropdown option,
.hm-custom .wcsatt-options-product-dropdown option {
  padding: 12px 15px !important;
  font-weight: 500 !important;
  color: #4a5c2a !important;
  background: #fff !important;
  border: none !important;
}

.wcsatt-options-product-dropdown option:hover,
.mnm_status .wcsatt-options-product-dropdown option:hover,
.wcsatt-options-wrapper .wcsatt-options-product-dropdown option:hover,
.hm-custom .wcsatt-options-product-dropdown option:hover {
  background-color: #f9f7f0 !important;
}
