/* =====================================================================
   Картка товару + модалка "Детальна інформація"
   Файл: catalog/view/theme/remember/stylesheet/one-click.css
   ===================================================================== */

/* ===== Кольори — міняйте тут під стиль сайту ===== */
:root {
  --oc-accent: #2f6f5e;
  --oc-accent-2: #3f8f78;
  --oc-accent-soft: #e8f3ef;
  --oc-text: #1f2a2e;
  --oc-muted: #6b7a80;
  --oc-border: #e3e8ea;
  --oc-error: #d14343;
}

/* ===================== КАРТКА ТОВАРУ ===================== */
.product-thumb.oc-card {
  border: 1px solid var(--oc-border);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  transition: box-shadow .3s, transform .3s;
}
.product-thumb.oc-card:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, .10);
  transform: translateY(-3px);
}
.product-thumb.oc-card .image { overflow: hidden; }
.product-thumb.oc-card .image img { transition: transform .5s ease; }
.product-thumb.oc-card:hover .image img { transform: scale(1.04); }

.product-thumb.oc-card .caption { padding: 14px 16px 4px; }
.product-thumb.oc-card .caption h4 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 10px;
}
.product-thumb.oc-card .caption h4 a { color: var(--oc-text); font-size: 17px; line-height: 1.35; }
@media (max-width: 767px) { .product-thumb.oc-card .caption h4 a { font-size: 16px; } }
.product-thumb.oc-card .caption h4 a:hover { color: var(--oc-accent); text-decoration: none; }

/* Рядок: ціна + іконка кошика */
.oc-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 10px;
  min-height: 46px;
}
.oc-price-row .price {
  margin: 0 !important;
  font-size: 20px;
  font-weight: 700;
  color: var(--oc-text);
}
.oc-price-row .price .price-new { color: var(--oc-error); }
.oc-price-row .price .price-old { font-size: 14px; font-weight: 400; color: var(--oc-muted); }
.oc-price-row .price .price-tax { display: none; }

.product-thumb .oc-cart-btn,
#product .oc-cart-btn {
  flex: 0 0 40px;
  width: 40px !important;
  height: 40px !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  color: #111 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: 0 !important;
  font-size: 0 !important;
  cursor: pointer;
  transition: color .2s, transform .2s;
}
.product-thumb .oc-cart-btn svg,
#product .oc-cart-btn svg {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 !important;
  flex-shrink: 0;
}
.product-thumb .oc-cart-btn:hover,
.product-thumb .oc-cart-btn:focus-visible,
#product .oc-cart-btn:hover,
#product .oc-cart-btn:focus-visible {
  color: var(--oc-accent) !important;
  transform: scale(1.12);
}
.oc-cart-btn.is-added { animation: oc-pop .45s ease; }

/* Приховуємо стару смугу "Купити" */
.product-thumb.oc-card .button-group .oc-hidden-cart { display: none !important; }

/* Низ картки */
.product-thumb.oc-card .button-group {
  border: 0 !important;
  background: none !important;
  padding: 0 16px 16px;
  overflow: visible;
}

/* Кнопка "Детальна інформація" */
.product-thumb .button-group a.toclick,
.product-thumb .button-group a.toclick:focus,
a.oc-detail-btn,
a.oc-detail-btn:focus {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  height: 48px;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(135deg, var(--oc-accent), var(--oc-accent-2)) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-transform: none !important;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(47, 111, 94, .25);
  transition: transform .15s, box-shadow .25s, filter .25s;
}
.product-thumb .button-group a.toclick:hover,
a.oc-detail-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(47, 111, 94, .35);
  filter: brightness(1.05);
}
.product-thumb .button-group a.toclick svg,
a.oc-detail-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===================== СТОРІНКА ТОВАРУ ===================== */
.oc-buy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin: 22px 0 18px;
}
.oc-buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-right: auto; }
.oc-buy-price__main { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--oc-text); }
.oc-buy-price__main.is-special { color: var(--oc-error); }
.oc-buy-price__old { font-size: 17px; color: var(--oc-muted); text-decoration: line-through; }

/* Лічильник кількості */
.oc-qty {
  display: flex;
  align-items: stretch;
  height: 46px;
  border: 1px solid var(--oc-border);
  background: #fff;
}
.oc-qty__btn {
  width: 40px;
  border: 0;
  background: transparent;
  color: var(--oc-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.oc-qty__btn:hover { background: var(--oc-accent-soft); color: var(--oc-accent); }
#product .oc-qty input {
  width: 48px;
  height: 100%;
  border: 0 !important;
  border-left: 1px solid var(--oc-border) !important;
  border-right: 1px solid var(--oc-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--oc-text);
  background: #fff;
}
#product .oc-qty input:focus { outline: none; background: var(--oc-accent-soft); }

/* Кошик на сторінці товару — трохи більший */
#product .oc-cart-btn { flex: 0 0 46px; width: 46px !important; height: 46px !important; margin: 0 !important; }
#product .oc-cart-btn svg { width: 30px; height: 30px; }
.oc-cart-btn.is-loading { opacity: .35; pointer-events: none; }

/* Кнопка "Детальна інформація" на сторінці товару */
#product a.oc-detail-btn { height: 54px; font-size: 16px !important; margin-bottom: 14px !important; }

.oc-buy-extra { list-style: none; padding: 0; margin: -6px 0 16px; color: var(--oc-muted); font-size: 14px; }

@media (max-width: 480px) {
  .oc-buy-price { width: 100%; }
  .oc-buy-price__main { font-size: 26px; }
}

/* ===================== МОДАЛКА ===================== */
.oc-popup {
  position: relative;
  max-width: 720px;
  margin: 20px auto;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .25);
  display: grid;
  grid-template-columns: 42% 58%;
  color: var(--oc-text);
  font-family: inherit;
}
.oc-popup .mfp-close {
  top: 10px; right: 10px;
  width: 36px; height: 36px; line-height: 36px;
  border-radius: 0;
  background: rgba(255, 255, 255, .9);
  color: var(--oc-text);
  opacity: 1;
  font-size: 24px;
  transition: background .2s, transform .2s;
}
.oc-popup .mfp-close:hover { background: var(--oc-accent-soft); transform: rotate(90deg); }

.oc-popup__media {
  background: linear-gradient(160deg, var(--oc-accent-soft), #f7faf9);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.oc-popup__media img { max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 0; }

.oc-popup__body { padding: 34px 32px 30px; position: relative; min-height: 380px; }

.oc-popup__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 0;
  background: var(--oc-accent-soft); color: var(--oc-accent);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.oc-popup__badge svg { width: 14px; height: 14px; }
.oc-popup__title { margin: 14px 0 6px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.oc-popup__price { font-size: 22px; font-weight: 700; color: var(--oc-accent); margin-bottom: 14px; }
.oc-popup__price .price-old { font-size: 15px; color: var(--oc-muted); margin-left: 8px; font-weight: 400; }
.oc-popup__price .price-tax { display: none; }
.oc-popup__hint { color: var(--oc-muted); font-size: 14px; margin: 0 0 10px; line-height: 1.5; }

.oc-popup__list { list-style: none; padding: 0; margin: 0 0 16px; }
.oc-popup__list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--oc-text); margin-bottom: 6px;
}
.oc-popup__list svg { width: 16px; height: 16px; color: var(--oc-accent); flex-shrink: 0; }

/* Поле телефону */
.oc-field { position: relative; margin-bottom: 14px; }
.oc-field svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--oc-muted); pointer-events: none;
  transition: color .2s;
}
.oc-field input {
  width: 100%; height: 52px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--oc-border); border-radius: 0;
  font-size: 16px; color: var(--oc-text); background: #fff;
  outline: none; box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}
.oc-field input:focus { border-color: var(--oc-accent); box-shadow: 0 0 0 4px var(--oc-accent-soft); }
.oc-field input:focus ~ svg { color: var(--oc-accent); }
.oc-field.is-error input { border-color: var(--oc-error); box-shadow: 0 0 0 4px rgba(209, 67, 67, .12); }
.oc-field.is-error { animation: oc-shake .35s; }

.oc-hp { position: absolute !important; left: -9999px !important; opacity: 0; }

/* Кнопка відправки */
.oc-submit {
  position: relative;
  width: 100%; height: 52px;
  border: 0; border-radius: 0;
  background: linear-gradient(135deg, var(--oc-accent), var(--oc-accent-2));
  color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; overflow: hidden;
  box-shadow: 0 8px 20px rgba(47, 111, 94, .3);
  transition: transform .15s, box-shadow .25s;
}
.oc-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(47, 111, 94, .35); }
.oc-submit:active { transform: translateY(0); }
.oc-submit__text { display: inline-flex; align-items: center; gap: 8px; transition: opacity .2s; }
.oc-submit__text svg { width: 18px; height: 18px; transition: transform .25s; }
.oc-submit:hover .oc-submit__text svg { transform: translateX(4px); }
.oc-spinner {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  opacity: 0; animation: oc-spin .8s linear infinite;
}
.oc-submit.is-loading { pointer-events: none; }
.oc-submit.is-loading .oc-submit__text { opacity: 0; }
.oc-submit.is-loading .oc-spinner { opacity: 1; }

.oc-error { display: none; color: var(--oc-error); font-size: 13px; margin-top: 10px; }
.oc-note { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--oc-muted); }
.oc-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Кроки: форма ↔ успіх */
.oc-step { transition: opacity .4s ease, transform .4s ease; }
.oc-step--form.is-hidden { opacity: 0; transform: translateX(-30px); pointer-events: none; }
.oc-step--success {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  padding: 34px 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  opacity: 0; transform: translateX(30px); pointer-events: none;
}
.oc-step--success.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* Анімована галочка */
.oc-check { width: 84px; height: 84px; margin-bottom: 18px; }
.oc-check circle {
  fill: var(--oc-accent-soft); stroke: var(--oc-accent); stroke-width: 3;
  stroke-dasharray: 240; stroke-dashoffset: 240;
}
.oc-check path {
  fill: none; stroke: var(--oc-accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
}
.is-visible .oc-check circle { animation: oc-draw .6s ease forwards; }
.is-visible .oc-check path { animation: oc-draw .4s .5s ease forwards; }

.oc-success__title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.oc-success__text { color: var(--oc-muted); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.oc-success__phone { font-weight: 600; color: var(--oc-text); white-space: nowrap; }
.oc-success__info {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 0;
  background: var(--oc-accent-soft); color: var(--oc-accent);
  font-size: 13px; font-weight: 500; text-align: left; margin-bottom: 20px;
}
.oc-success__info svg { width: 20px; height: 20px; flex-shrink: 0; }
.oc-success__close {
  border: 1.5px solid var(--oc-border); background: #fff; color: var(--oc-text);
  padding: 10px 26px; border-radius: 0; font-weight: 600; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.oc-success__close:hover { border-color: var(--oc-accent); background: var(--oc-accent-soft); }

/* Анімація відкриття */
.mfp-oc.mfp-bg { background: #0d1a17; opacity: 0; transition: opacity .35s; }
.mfp-oc.mfp-bg.mfp-ready { opacity: .7; }
.mfp-oc.mfp-bg.mfp-removing { opacity: 0; }
.mfp-oc .oc-popup { opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .35s, transform .35s cubic-bezier(.2, .8, .3, 1.2); }
.mfp-oc.mfp-ready .oc-popup { opacity: 1; transform: none; }
.mfp-oc.mfp-removing .oc-popup { opacity: 0; transform: translateY(20px) scale(.97); }

@keyframes oc-spin { to { transform: rotate(360deg); } }
@keyframes oc-draw { to { stroke-dashoffset: 0; } }
@keyframes oc-pop { 0% { transform: scale(1); } 40% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes oc-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Мобільні */
@media (max-width: 640px) {
  .oc-popup { grid-template-columns: 1fr; margin: 10px; border-radius: 0; }
  .oc-popup__media { padding: 18px; }
  .oc-popup__media img { max-height: 150px; }
  .oc-popup__body { padding: 22px 20px 24px; min-height: 0; }
  .oc-step--success { padding: 22px 20px; }
  .oc-popup__title { font-size: 18px; }
}