/* Корзина — глобально (шапка, прайс, кабинет) */
.header-cart {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 10px;
  line-height: 1;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
}
.header-cart:hover,
.header-cart--has-items {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.4);
}
.header-cart svg { display: block; width: 22px; height: 22px; fill: currentColor; }
.header-cart__badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent, #ff8c3a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  z-index: 2;
}
.header-cart__badge.is-on { display: inline-flex !important; }

.side-menu__cart-badge {
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent, #ff8c3a);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.side-menu__cart-badge.is-on { display: inline-flex; }

.price-cart-actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.price-cart-actions input[type=number] {
  width: 64px; padding: 5px 6px; border: 1px solid var(--border, #ddd); border-radius: 8px; font-size: 0.85rem;
}
.btn--cart-sm {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: var(--primary, #1a365d); color: #fff; border: none; border-radius: 20px;
  cursor: pointer; font-size: 0.78rem; font-weight: 600;
}
.btn--cart-sm:hover { filter: brightness(1.08); }

.foton-cart-fab {
  position: fixed; right: 20px; bottom: 24px; z-index: 1190;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--accent, #ff8c3a); color: #fff; font-size: 1.35rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.foton-cart-fab--active { animation: foton-cart-pop .35s ease; }
@keyframes foton-cart-pop { 50% { transform: scale(1.08); } }
.foton-cart-fab #foton-cart-badge,
.foton-cart-fab .foton-cart-fab-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: #111; color: #fff;
  font-size: 0.7rem; font-weight: 700; align-items: center; justify-content: center;
  display: none;
}
.foton-cart-fab #foton-cart-badge.is-on,
.foton-cart-fab .foton-cart-fab-badge.is-on { display: inline-flex; }

.foton-cart-panel {
  position: fixed; top: 0; right: 0; width: min(380px, 100%); height: 100%;
  /* G1: выше sticky-шапки (200–201) и side-menu (1000), ниже auth-модалок (4000) */
  background: #fff; z-index: 1210; box-shadow: -8px 0 30px rgba(0,0,0,.15);
  transform: translateX(105%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.foton-cart-panel--open { transform: translateX(0); }
.foton-cart-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1200;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.foton-cart-panel__head {
  padding: 16px 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #e5e7eb; font-weight: 700; color: var(--primary, #1a365d);
}
.foton-cart-panel__body { flex: 1; overflow: auto; padding: 12px 16px; }
.foton-cart-panel__foot {
  padding: 14px 16px; border-top: 1px solid #e5e7eb; background: #fafafa;
}
.foton-cart-line {
  display: flex; gap: 10px; justify-content: space-between; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #eee;
}
.foton-cart-line__name { font-weight: 600; font-size: 0.9rem; color: #111; }
.foton-cart-line__tier { font-size: 0.75rem; color: #6b7280; }
.foton-cart-line__price { font-size: 0.85rem; color: var(--accent, #ff8c3a); font-weight: 600; margin-top: 4px; }
.foton-cart-line__controls { display: flex; align-items: center; gap: 6px; }
.foton-cart-qty { width: 64px; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; }
.foton-cart-remove {
  border: none; background: #fee2e2; color: #991b1b; width: 28px; height: 28px;
  border-radius: 6px; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.foton-cart-sum-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 10px; color: #111; }
.foton-cart-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foton-cart-actions .btn { flex: 1; text-align: center; text-decoration: none; }
.foton-cart-flash {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: #111; color: #fff; padding: 10px 16px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 1220; font-size: 0.9rem;
}
.foton-cart-flash--show { opacity: 1; transform: translateX(-50%) translateY(0); }

.profile-cart-card {
  margin-bottom: 20px;
}
.profile-cart-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.profile-cart-card__hint {
  color: #6b7280;
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.profile-cart-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
}
.profile-cart-card__stats {
  font-size: 0.95rem;
  color: #374151;
}
.profile-cart-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.profile-cart-card__actions .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}
@media (max-width: 600px) {
  .profile-cart-card__row { flex-direction: column; align-items: flex-start; }
}

#menuCartBtn.side-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: inherit;
}

.foton-cart-line__note-label {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}
.foton-cart-note {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  box-sizing: border-box;
}
.price-cart-actions {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn--cart-sm {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--primary, #1a365d);
  color: #fff !important;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn--cart-sm:hover { filter: brightness(1.08); }
.price-cart-actions input[type=number] {
  width: 64px;
  padding: 5px 6px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 0.85rem;
}

.foton-cart-files { margin-top: 8px; }
.foton-cart-files__list { list-style: none; margin: 0 0 6px; padding: 0; }
.foton-cart-files__list li {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: #374151; padding: 2px 0;
}
.foton-cart-files__name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px;
}
.foton-cart-file-remove {
  border: none; background: #fee2e2; color: #991b1b;
  width: 22px; height: 22px; border-radius: 4px; cursor: pointer; line-height: 1; flex-shrink: 0;
}
.foton-cart-files__add {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.78rem; font-weight: 600; color: var(--primary, #1a365d);
  cursor: pointer; padding: 4px 8px; border: 1px dashed #cbd5e1; border-radius: 6px;
}
.foton-cart-files__add input { display: none; }
.foton-cart-files__add:hover { background: #f1f5f9; }
.foton-cart-files__count { font-size: 0.72rem; color: #6b7280; margin-left: 6px; }
.foton-cart-panel__foot .foton-cart-files-hint {
  font-size: 0.72rem; color: #9ca3af; margin: 6px 0 0;
}

/* G6: счётчик хранения файлов в корзине */
.foton-cart-file-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 0.8rem; padding: 4px 0;
}
.foton-cart-file-name { flex: 1; min-width: 0; word-break: break-all; color: #374151; }
.foton-cart-file-ttl {
  font-size: 0.72rem; color: #b45309; background: #fffbeb;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.foton-cart-files__meta { font-size: 0.72rem; color: #6b7280; margin-left: 6px; }
