/* Корзина Гипостоп — изолированные стили (не зависят от main.css). */
#cart-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(120%);
  display: flex; align-items: center; gap: 16px; z-index: 1000;
  padding: 12px 14px 12px 20px; border-radius: 14px; background: #012570; color: #fff;
  box-shadow: 0 10px 30px rgba(1,37,112,.35); transition: transform .28s ease; max-width: 94vw;
}
#cart-bar.is-visible { transform: translateX(-50%) translateY(0); }
#cart-bar .cart-bar__info { font-size: 15px; font-weight: 600; white-space: nowrap; }
#cart-bar .cart-bar__btn {
  background: #ffd54a; color: #1a1300; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 10px 18px; border-radius: 10px; white-space: nowrap;
}
#cart-bar .cart-bar__btn:hover { background: #ffdf74; }

.cart-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(10px);
  background: #1b2430; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px;
  z-index: 1001; opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none;
  box-shadow: 0 8px 22px rgba(20,30,50,.25);
}
.cart-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- страница оформления заказа --- */
.checkout-wrap { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 920px; }
@media (min-width: 860px) { .checkout-wrap { grid-template-columns: 1.1fr .9fr; align-items: start; } }

.co-card { border: 1px solid #e3e6ea; border-radius: 14px; background: #fff; padding: 20px;
  box-shadow: 0 2px 14px rgba(20,30,50,.05); }
.co-card h2 { margin: 0 0 14px; font-size: 18px; }

.co-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #f0f2f5; }
.co-line:first-of-type { border-top: none; }
.co-line__name { flex: 1; font-size: 14px; line-height: 1.4; }
.co-line__name small { display: block; color: #8a93a0; }
.co-qty { display: flex; align-items: center; gap: 6px; }
.co-qty button { width: 28px; height: 28px; border: 1px solid #cfd5dd; background: #fff; border-radius: 7px;
  font-size: 16px; cursor: pointer; line-height: 1; }
.co-qty span { min-width: 26px; text-align: center; font-weight: 600; }
.co-line__sum { min-width: 86px; text-align: right; font-weight: 700; white-space: nowrap; }
.co-line__del { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 18px; line-height: 1; }

.co-totals { margin-top: 14px; border-top: 2px solid #eef0f3; padding-top: 12px; font-size: 15px; }
.co-totals .r { display: flex; justify-content: space-between; margin-top: 8px; }
.co-totals .r.grand { font-size: 19px; font-weight: 800; color: #012570; margin-top: 12px; }

.co-field { margin-bottom: 14px; position: relative; }
.co-field label { display: block; font-size: 13px; color: #5a6472; margin-bottom: 6px; }
.co-field input, .co-field textarea, .co-field select {
  width: 100%; box-sizing: border-box; padding: 11px 12px; font-size: 15px;
  border: 1px solid #cfd5dd; border-radius: 9px; background: #fff; color: #1b2430; }
.co-field input:focus, .co-field textarea:focus, .co-field select:focus {
  outline: none; border-color: #1f6fc0; box-shadow: 0 0 0 3px rgba(31,111,192,.12); }
.co-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff;
  border: 1px solid #cfd5dd; border-top: none; border-radius: 0 0 9px 9px; max-height: 240px;
  overflow: auto; box-shadow: 0 8px 20px rgba(20,30,50,.10); display: none; }
.co-suggest div { padding: 10px 12px; font-size: 14px; cursor: pointer; border-top: 1px solid #f0f2f5; }
.co-suggest div:hover, .co-suggest div.active { background: #eef4fb; }

.co-ship-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 13px; border: 1px solid #e3e6ea; border-radius: 10px; margin-top: 9px; cursor: pointer; }
.co-ship-opt.is-sel { border-color: #1f6fc0; box-shadow: 0 0 0 2px rgba(31,111,192,.14); }
.co-ship-opt .s-price { font-weight: 700; color: #1f6fc0; white-space: nowrap; }

.co-msg { margin-top: 12px; font-size: 14px; }
.co-msg.err { color: #c0392b; }
.co-msg.ok { color: #1e824c; }
.co-empty { text-align: center; color: #6a7482; padding: 40px 10px; }
.btn-block { display: block; width: 100%; text-align: center; }
.co-hint { font-size: 12px; color: #8a93a0; margin-top: 6px; }

/* ---- иконка корзины в шапке + бейдж-счётчик (2026-10-18) ---- */
.header-cart { position: relative; display: inline-flex; align-items: center; color: inherit; margin-left: 6px; }
.header-cart svg { display: block; }
.header-cart__count {
  position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e2001a; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; border-radius: 9px;
}
.header-cart__count[hidden] { display: none; }

/* ---- панель «Подробнее о продукте» на карточке (2026-10-18) ---- */
.product-more {
  margin-top: 8px; background: none; border: none; padding: 4px 0; cursor: pointer;
  color: #0a7d46; font: inherit; font-weight: 600; text-align: left;
}
.product-more:hover { text-decoration: underline; }
.product-detail {
  margin-top: 8px; padding-top: 10px; border-top: 1px solid #e6e6e6;
  font-size: 14px; line-height: 1.5; color: #333;
}
.product-detail[hidden] { display: none; }
.product-detail__desc { margin: 0 0 8px; white-space: pre-line; }
.product-detail__desc[hidden] { display: none; }
.product-detail__meta { margin: 0 0 8px; display: grid; gap: 4px; }
.product-detail__row { display: flex; gap: 6px; }
.product-detail__row[hidden] { display: none; }
.product-detail__row dt { margin: 0; font-weight: 600; color: #555; flex: none; }
.product-detail__row dd { margin: 0; }
.product-detail__note { margin: 6px 0 0; font-size: 12px; color: #888; }

/* ---- Карусель фото товара (2026-10-22) ---- */
.product-media { position: relative; cursor: pointer; }
.product-media .gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .15s;
}
.product-media .gallery-nav:hover { background: rgba(0,0,0,.72); }
.product-media .gallery-prev { left: 8px; }
.product-media .gallery-next { right: 8px; }
.product-media .gallery-dots {
  position: absolute; bottom: 8px; left: 0; right: 0; z-index: 2;
  display: flex; gap: 5px; justify-content: center;
}
.product-media .gallery-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.5);
}
.product-media .gallery-dot.is-active { background: #fff; }
.product-media .gallery-hint {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  font-size: 11px; color: #fff; background: rgba(0,0,0,.45);
  padding: 2px 8px; border-radius: 10px; pointer-events: none; transition: opacity .15s;
}
.product-media.is-placeholder .gallery-hint,
.product-media.is-placeholder .gallery-nav,
.product-media.is-placeholder .gallery-dots { display: none; }
