/* ============================================================
   Оптові ціни — візуалізація (картка, каталог, кошик, checkout)
   Тема deluxe. Тільки блоки оптових цін.
   ============================================================ */
:root{
  --opt-green:#4a9e2f;
  --opt-green-dark:#2f7d1c;
  --opt-green-bg:#eef8e9;
  --opt-green-border:#c7e6b8;
  --opt-old:#9aa0a6;
}

/* ---------- КАРТКА: «Ціна за штуку:» + прихований autocalc ---------- */
.opt-unit-label{
  font-size:19px;
  color:#333;
  font-weight:400;
  vertical-align:baseline;
  margin-right:4px;
}
/* autocalc живе тут прихованим: скрипти теми й клони для галереї працюють далі */
.opt-autocalc-hold{ display:none !important; }

/* ---------- КАРТКА ТОВАРУ: блок оптових цін (макет: білий фон + зелена рамка) ---------- */
.opt-prices-block{
  border:1px solid #b5d36a;
  border-radius:10px;
  padding:12px 18px;
  margin:12px 0;
  background:#fff;
}
.opt-prices-block .opt-prices-title{
  font-weight:700;
  margin-bottom:6px;
  color:#333;
}
.opt-prices-block .opt-price-row{
  display:flex;
  align-items:baseline;
  gap:6px;
  padding:3px 0;
  line-height:1.4;
}
.opt-prices-block .opt-price-row.is-active{
  font-weight:700;
}
.opt-prices-block .opt-price-val{
  font-weight:700;
  color:#333;
  white-space:nowrap;
}
.opt-prices-block .opt-price-from{
  color:var(--opt-green-dark);
  font-weight:600;
  white-space:nowrap;
}
.opt-prices-block .opt-price-row.is-active .opt-price-val{
  color:var(--opt-green-dark);
}

/* «Ви економите …» на картці */
.opt-you-save{
  display:none;
  align-items:center;
  gap:8px;
  margin:8px 0 4px;
  padding:8px 14px;
  border-radius:8px;
  background:var(--opt-green-bg);
  border:1px solid var(--opt-green-border);
  color:var(--opt-green-dark);
  font-weight:600;
}
.opt-you-save.is-visible{ display:inline-flex; }
.opt-you-save .opt-save-sum{ font-weight:800; }
.opt-you-save .fa{ color:var(--opt-green); }

/* ---------- БЕЙДЖ «опт» + стара/нова ціна (кошик/checkout) ---------- */
.opt-badge{
  display:inline-block;
  font-size:11px;
  line-height:1;
  font-weight:700;
  text-transform:uppercase;
  color:#fff;
  background:var(--opt-green);
  border-radius:4px;
  padding:3px 6px;
  vertical-align:middle;
  margin-left:6px;
}
.opt-old-price{
  color:var(--opt-old);
  text-decoration:line-through;
  margin-right:6px;
  font-weight:400;
  white-space:nowrap;
}
.opt-new-price{
  color:var(--opt-green-dark);
  font-weight:700;
  white-space:nowrap;
}
.opt-applied-note{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:6px 0;
  padding:9px 14px;
  border-radius:10px;
  background:var(--opt-green-bg);
  border:1px solid var(--opt-green-border);
  color:#444;
  font-size:13px;
  line-height:1.45;
  text-align:left;
}
.opt-applied-note .opt-applied-icon{ color:var(--opt-green); font-size:15px; margin-top:2px; }
.opt-applied-note .opt-applied-title{ color:var(--opt-green-dark); font-weight:700; display:block; }

/* переписана ціна товару в кошику/checkout: стара + нова + бейдж */
.opt-price-line{ white-space:nowrap; }
.opt-price-line .opt-new-price{ font-size:1.06em; }

/* рядок «Знижка за оптовою ціною» у таблиці totals (клон рідного рядка) */
tr.opt-discount-row td,
tr.opt-discount-row td strong{ color:var(--opt-green-dark) !important; font-weight:600; }
tr.opt-discount-row .opt-discount-value{ color:var(--opt-green-dark); font-weight:700; }

/* «Кількість: N шт» + «Детальніше про оптові ціни» у кошику-модалці (макет) */
.opt-qty-note{
  margin:7px 0 2px;
  font-size:13px;
  color:#333;
}
.opt-more-link{
  display:inline-block;
  margin:2px 0 4px;
  cursor:pointer;
  color:var(--opt-green-dark);
  font-weight:600;
  font-size:13px;
  background:none;
  border:none;
  padding:0;
  text-align:left;
}
.opt-more-link span{ border-bottom:1px dashed var(--opt-green-dark); }
.opt-more-link:hover{ color:var(--opt-green); }
.opt-more-link:hover span{ border-bottom-color:var(--opt-green); }
.opt-cart-item .opt-cat-table{ max-width:320px; }

/* підсумки кошика-модалки під макет: назви зліва, пунктир перед «Разом» */
.table_cartt td:first-child{ text-align:left !important; }
.table_cartt tr:last-child td{ border-top:1px dashed #d9d9d9 !important; }

/* банер «Ви заощаджуєте» (кошик/checkout) */
.opt-total-save{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:8px 0;
  padding:8px 16px;
  border-radius:8px;
  background:var(--opt-green-bg);
  border:1px solid var(--opt-green-border);
  color:var(--opt-green-dark);
  font-weight:700;
}
.opt-total-save .fa{ color:var(--opt-green); }
.opt-total-save .opt-total-save-sum{ font-weight:800; }

/* ---------- КАТАЛОГ: «Переглянути оптові ціни» ---------- */
/* holder часто потрапляє у flex-контейнер картки — робимо його на всю ширину,
   щоб таблиця не вилазила праворуч і не перекривала сусідні картки */
.opt-cat-holder{
  display:block;
  width:100%;
  flex-basis:100%;
  order:99;
  clear:both;
  margin-top:4px;
}
.opt-view-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin:6px 0 2px;
  cursor:pointer;
  color:var(--opt-green-dark);
  font-weight:600;
  text-decoration:none;
  background:none;
  border:none;
  padding:0;
  font-size:13px;
}
.opt-view-link span{ border-bottom:1px dashed var(--opt-green-dark); }
.opt-view-link .fa{ color:var(--opt-green); }
.opt-view-link:hover{ color:var(--opt-green); text-decoration:none; }
.opt-view-link:hover span{ border-bottom-color:var(--opt-green); }
.opt-cat-table{
  display:none;
  width:100%;
  box-sizing:border-box;
  margin:6px 0 4px;
  padding:8px 12px;
  border:1px solid var(--opt-green-border);
  border-radius:8px;
  background:var(--opt-green-bg);
}
.opt-cat-table.is-open{ display:block; }
.opt-cat-table .opt-cat-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:2px 0;
  font-size:13px;
  line-height:1.4;
}
.opt-cat-table .opt-cat-price{ font-weight:700; color:#333; }
.opt-cat-table .opt-cat-from{ color:var(--opt-green-dark); font-weight:600; }
.opt-cat-table .opt-cat-loading{ font-size:13px; color:#777; }
.opt-cat-table .opt-cat-empty{ font-size:13px; color:#777; }
