/* =========================================================
   Askorbinka.uz Premium Product Page Styling
   v2.0.0
   ========================================================= */

.product-main-layout {
  background: transparent;
}

/* =========================================================
   1. Галерея товара (Magnific Popup, Thumbnails)
   ========================================================= */
.product-gallery-wrap {
  border: 1px solid #e2ebe6 !important;
  box-shadow: 0 4px 18px rgba(11, 69, 62, 0.04) !important;
  padding: 24px !important;
}

.askor-gallery-main {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
}

.askor-main-popup-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: zoom-in;
  text-decoration: none;
}

.askor-main-img {
  max-height: 350px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.askor-main-popup-link:hover .askor-main-img {
  transform: scale(1.03);
}

.askor-zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dfe9e3;
  color: #0b453e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.askor-main-popup-link:hover .askor-zoom-hint {
  opacity: 1;
  transform: scale(1.1);
  color: #087b43;
}

/* Дополнительные миниатюры (увеличены и четко оформлены) */
.askor-gallery-thumbs {
  margin-top: 16px;
}

.askor-gallery-thumbs .thumb {
  width: 74px;
  height: 74px;
  border: 1.5px solid #dce8e1;
  border-radius: 12px;
  background: #ffffff;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  overflow: hidden;
}

.askor-gallery-thumbs .thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.askor-gallery-thumbs .thumb:hover {
  border-color: #087b43;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(8, 123, 67, 0.15);
}

.askor-gallery-thumbs .thumb.active {
  border-color: #087b43;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(8, 123, 67, 0.18);
  transform: translateY(-1px);
}

/* =========================================================
   2. Типографика, состав и блок цен
   ========================================================= */
.product-summary h1 {
  font-size: 27px;
  line-height: 1.25;
  color: #0b453e;
  letter-spacing: -0.3px;
}

/* Блок состава (ингредиентов / тегов) */
.product-ingredients-box {
  background: #f7faf8;
  border: 1px solid #e1eee7;
  border-radius: 12px;
  padding: 10px 14px;
}

.product-ingredients-box .ingredients-title {
  font-size: 13px;
  color: #0b453e;
  letter-spacing: -0.1px;
}

.product-ingredients-box .ingredients-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #e8f5ed;
  border-radius: 50%;
  font-size: 11px;
}

.ingredient-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #175438;
  border: 1px solid #cce5d6;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ingredient-pill .ingredient-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  transition: transform 0.2s ease;
}

.ingredient-pill:hover {
  background: #087b43;
  color: #ffffff;
  border-color: #087b43;
  box-shadow: 0 3px 8px rgba(8, 123, 67, 0.25);
  transform: translateY(-1px);
}

.ingredient-pill:hover .ingredient-dot {
  background-color: #ffffff;
  transform: scale(1.2);
}

.product-price-box-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f6faf8 100%);
  border: 1px solid #dbe8e2;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(11, 69, 62, 0.04);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.product-price-box-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #087b43 0%, #16a355 100%);
}

.product-price-box-premium .price-current {
  font-size: 26px; /* Аккуратный, сбалансированный размер */
  font-weight: 800;
  color: #0c2b22;
  letter-spacing: -0.3px;
  line-height: 1.15;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.product-price-box-premium .price-old {
  font-size: 16px;
  font-weight: 500;
  color: #8c9ea2;
  text-decoration: line-through;
  margin-left: 10px;
}

.product-price-box-premium .price-badge-save {
  background: #ff4757;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-left: 8px;
}

/* =========================================================
   3. Варианты и связка товаров
   ========================================================= */
.product-variants-premium {
  background: #ffffff;
  border: 1px solid #e1ece6;
  border-radius: 14px;
  padding: 15px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.variant-pill {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.variant-pill.active {
  background: #087b43;
  color: #ffffff !important;
  border: 1.5px solid #087b43;
  box-shadow: 0 4px 12px rgba(8, 123, 67, 0.25);
  transform: translateY(-1px);
}

.variant-pill.inactive {
  background: #ffffff;
  color: #243b34 !important;
  border: 1.5px solid #dbe5e0;
}

.variant-pill.inactive:hover {
  border-color: #087b43;
  background: #f7fbf8;
  color: #087b43 !important;
  transform: translateY(-1px);
}

/* =========================================================
   4. Контроллеры покупки: Счётчик + Кнопка "Купить" + Кнопка "iHerb"
   ========================================================= */
.askor-qty-premium {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #d8e5df;
  border-radius: 12px;
  height: 50px;
  overflow: hidden;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.askor-qty-premium:focus-within {
  border-color: #087b43;
  box-shadow: 0 0 0 3px rgba(8, 123, 67, 0.12);
}

.askor-qty-premium .qty-btn {
  background: #f8faf9;
  border: none;
  width: 42px;
  height: 100%;
  font-size: 19px;
  font-weight: 700;
  color: #243e35;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.askor-qty-premium .qty-btn:hover {
  background: #eef5f1;
  color: #087b43;
}

.askor-qty-premium input {
  width: 48px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #122922;
  outline: none;
  font-feature-settings: "tnum";
}

/* Кнопка 1: Купить (Активная) */
.btn-buy-premium {
  background: linear-gradient(135deg, #ff6b18 0%, #ff5107 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
  border-radius: 12px !important;
  height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  box-shadow: 0 6px 18px rgba(255, 87, 19, 0.28) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer;
}

.btn-buy-premium:hover {
  background: linear-gradient(135deg, #ff792e 0%, #ff5912 100%) !important;
  box-shadow: 0 8px 24px rgba(255, 87, 19, 0.38) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-buy-premium:active {
  transform: translateY(0);
}

/* Кнопка 1: Деактивирована при нулевом количестве */
.btn-buy-disabled {
  background: #e8edea !important;
  border: 1px solid #d5dfd9 !important;
  color: #83978f !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  height: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: not-allowed !important;
  opacity: 0.75;
}

/* Кнопка 2: Купить в iHerb */
.btn-iherb-premium {
  background: #ffffff !important;
  border: 2px solid #438406 !important;
  color: #3b7405 !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  height: 50px !important;
  padding: 0 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(67, 132, 6, 0.12) !important;
  transition: all 0.25s ease !important;
}

.btn-iherb-premium:hover {
  background: #438406 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(67, 132, 6, 0.28) !important;
}

.btn-iherb-premium .iherb-leaf-icon {
  font-size: 18px;
}

/* Выделение кнопки iHerb, когда товара нет на складе */
.btn-iherb-highlight {
  background: linear-gradient(135deg, #468806 0%, #356d02 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-size: 16.5px !important;
  box-shadow: 0 6px 20px rgba(67, 132, 6, 0.35) !important;
}

.btn-iherb-highlight:hover {
  background: linear-gradient(135deg, #4ea005 0%, #3c7d02 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 26px rgba(67, 132, 6, 0.45) !important;
}

/* =========================================================
   5. Сервисные плашки (Доставка, Оригинальность, Консультация)
   ========================================================= */
.product-benefits-panel {
  background: #f7faf8;
  border: 1px solid #e1ece6;
}

.benefit-item {
  padding: 4px 6px;
}

.benefit-item .benefit-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid #e2ebe6;
  flex-shrink: 0;
}

.benefit-text strong {
  font-size: 13px;
  color: #123026;
  display: block;
  line-height: 1.25;
}

.benefit-text small {
  font-size: 11px;
  line-height: 1.25;
}

/* Второстепенные кнопки (Избранное, Сравнение) */
.btn-secondary-action {
  background: #ffffff;
  border: 1px solid #dce6e1;
  border-radius: 10px;
  color: #556c65;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.btn-secondary-action:hover {
  background: #f7faf8;
  border-color: #087b43;
  color: #087b43;
  transform: translateY(-1px);
}

/* =========================================================
   6. Премиальные Табы: Описание, Характеристики, Отзывы
   ========================================================= */
.askor-nav-tabs {
  gap: 10px;
  border-bottom: 2px solid #ebf3ee !important;
}

.askor-nav-tabs .nav-link {
  border: none !important;
  color: #4b625b !important;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px 10px 0 0 !important;
  background: transparent;
  transition: all 0.2s ease;
  position: relative;
}

.askor-nav-tabs .nav-link:hover {
  color: #087b43 !important;
  background-color: #f6faf8;
}

.askor-nav-tabs .nav-link.active {
  color: #087b43 !important;
  font-weight: 700;
  background-color: #ffffff;
}

.askor-nav-tabs .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #087b43;
  border-radius: 3px 3px 0 0;
}

.product-description-card,
.product-specs-card,
.product-review-card {
  border: 1px solid #e1ece6 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(11, 69, 62, 0.03);
}

/* Таблица характеристик */
.askor-specs-table {
  border-collapse: separate;
  border-spacing: 0;
}

.askor-spec-group-title {
  background-color: #f1f7f4;
  color: #0b453e;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 16px;
  border-top: 1px solid #dbe8e1;
  border-bottom: 1px solid #dbe8e1;
}

.askor-specs-table tr:first-child .askor-spec-group-title {
  border-top: none;
}

.askor-spec-label {
  width: 35%;
  font-weight: 600;
  color: #4c635b;
  font-size: 13.5px;
  padding: 11px 16px;
  border-bottom: 1px solid #eef4f0;
}

.askor-spec-val {
  color: #172d25;
  font-size: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid #eef4f0;
}

.askor-specs-table tbody tr:hover td {
  background-color: #fafcfb;
}

/* =========================================================
   7. Адаптивность для мобильных устройств
   ========================================================= */
@media (max-width: 991px) {
  .product-summary h1 {
    font-size: 23px;
  }
  .askor-gallery-main {
    min-height: 280px;
  }
  .askor-main-img {
    max-height: 270px;
  }
  .askor-gallery-thumbs .thumb {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 576px) {
  .product-gallery-wrap {
    padding: 16px !important;
  }
  .askor-gallery-main {
    min-height: 240px;
  }
  .askor-main-img {
    max-height: 230px;
  }
  .product-price-box-premium .price-current {
    font-size: 23px;
  }
  .btn-iherb-premium {
    width: 100%;
  }
  .askor-nav-tabs .nav-link {
    font-size: 13px;
    padding: 10px 12px;
  }
}
